From: Roland Hieber <r.hieber@pengutronix.de>
To: distrokit@pengutronix.de, ptxdist@pengutronix.de,
Michael Olbrich <m.olbrich@pengutronix.de>
Subject: Re: [ptxdist] [DistroKit] Recent DistroKit with ptxdist 2018.10.0 fails to get host-coreutils
Date: Thu, 11 Oct 2018 22:05:56 +0200 [thread overview]
Message-ID: <20181011200556.37zl5xhcwr5vz5f5@pengutronix.de> (raw)
In-Reply-To: <20181011142843.fs35rq2h2ml5yuvi@pengutronix.de>
On Thu, Oct 11, 2018 at 04:28:43PM +0200, Roland Hieber wrote:
> On Wed, Oct 10, 2018 at 03:22:13PM +0200, Alexander Dahl wrote:
> > On Wed, Oct 10, 2018 at 02:21:48PM +0200, Roland Hieber wrote:
> > > On Wed, Oct 10, 2018 at 01:04:01PM +0200, Roland Hieber wrote:
> > [...] I set PTXCONF_SETUP_SRCDIR to
> > /mnt/trash/src first, and to the default ${PTXDIST_WORKSPACE}/src
> > then. The problem is reproducible for packages where you build the
> > host, but not the target package, e.g. FOO=n and HOST_FOO=y. For
> > DistroKit master that is the case for acl, coreutils and maybe more.
>
> Indeed, I can also reproduce this with ${PTXDIST_WORKSPACE}/src. I guess
> HOST_* packages are missing the mapping from the HOST_*_SOURCE to the
> *_SOURCE variables, but I cannot see right now where and when this
> broke. I'll try a bisect later today.
I did a git bisect run with a script that deletes $SRCDIR/coreutils*
followed by ptxdist get host-coreutils. It results in commit 400bee10 [a]
as the first commit which no longer downloads coreutils*tar.gz and only
prints "error: empty parameter to 'ptxd_make_get'". That commit
unfortunately landed in ptxdist-2018.10.0.
I'm not so versed in the inner workings of ptxd_lib_dgen.awk - mol, do
you have an idea what needs to be done here? It looks to me that if we
don't want to reintroduce the $(<PKG>_SOURCE) := <PKG> variables, we need to
teach the '$(SRCDIR)/%' target [b] how to infer the HOST_<PKG> prefix
from the source archive name, even if <pkg> is not selected. But I have
no idea how to do that.
- Roland
[b]: see https://git.pengutronix.de/cgit/ptxdist/tree/rules/post/ptxd_make_world_get.make#n16
[a]: this patch:
commit 400bee10bdb3f6ab29304365a19ce05929f09436
Author: Michael Olbrich <m.olbrich@pengutronix.de>
Date: 2018-09-28 19:02
ptxd_lib_dgen: make sure $(<PKG>_SOURCE) refers to the primary package
To get the package for a source archive we define for each package:
$(<PKG>_SOURCE) := <PKG>
With host and cross packages that share the source with the target package,
the same variable may be defined multiple times. Which one 'wins' is
undefined.
Avoid this by only defining the variable for the target package.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
diff --git a/scripts/lib/ptxd_lib_dgen.awk b/scripts/lib/ptxd_lib_dgen.awk
index 888d989ee..5437d497c 100644
--- a/scripts/lib/ptxd_lib_dgen.awk
+++ b/scripts/lib/ptxd_lib_dgen.awk
@@ -338,7 +338,13 @@ function write_deps_pkg_active(this_PKG, this_pkg, prefix) {
#
# default deps
#
+ if (prefix != "") {
+ target_PKG = gensub(/^HOST_|^CROSS_/, "", 1, this_PKG);
+ print "ifneq ($(" this_PKG "_SOURCE),$(" target_PKG "_SOURCE))" > DGEN_DEPS_POST;
+ }
print "$(if $(" this_PKG "_SOURCE),$(eval $(" this_PKG "_SOURCE) := " this_PKG "))" > DGEN_DEPS_POST;
+ if (prefix != "")
+ print "endif" > DGEN_DEPS_POST;
print "$(foreach src,$(" this_PKG "_SOURCES)," \
"$(eval $(STATEDIR)/" this_pkg ".get:" "$(STATEDIR)/" this_pkg ".$(notdir $(src)).stamp))" > DGEN_DEPS_POST;
print "$(STATEDIR)/" this_pkg ".extract: " "$(STATEDIR)/" this_pkg ".get" > DGEN_DEPS_POST;
--
Roland Hieber | r.hieber@pengutronix.de |
Pengutronix e.K. | https://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2018-10-11 20:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-10 8:05 [ptxdist] " Alexander Dahl
2018-10-10 11:04 ` Roland Hieber
2018-10-10 12:21 ` Roland Hieber
2018-10-10 13:22 ` Alexander Dahl
2018-10-11 14:28 ` [ptxdist] [DistroKit] " Roland Hieber
2018-10-11 20:05 ` Roland Hieber [this message]
2018-10-12 11:59 ` Michael Olbrich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181011200556.37zl5xhcwr5vz5f5@pengutronix.de \
--to=r.hieber@pengutronix.de \
--cc=distrokit@pengutronix.de \
--cc=m.olbrich@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox