* [ptxdist] Recent DistroKit with ptxdist 2018.10.0 fails to get host-coreutils @ 2018-10-10 8:05 Alexander Dahl 2018-10-10 11:04 ` Roland Hieber 0 siblings, 1 reply; 7+ messages in thread From: Alexander Dahl @ 2018-10-10 8:05 UTC (permalink / raw) To: distrokit; +Cc: ptxdist [-- Attachment #1.1: Type: text/plain, Size: 1251 bytes --] Hei hei, while I could build current ptxdist-2018.10.0 based DistroKit on one host, I have problems building the very same BSP (DistroKit @ DistroKit-2018.03.0-30-g78f0dbf) on another, quite similar host (Debian GNU/Linux 9 (stretch), amd64). There seems to be a problem with the host-coreutils package (selected by systemd). Note: the coreutils-package itself is not selected. See: ----------------------------- target: coreutils-8.29.tar.xz ----------------------------- error: empty parameter to 'ptxd_make_get' make: *** [/mnt/trash/src/coreutils-8.29.tar.xz] Error 1 /usr/local/lib/ptxdist-2018.10.0/rules/post/ptxd_make_world_get.make:17: recipe for target '/mnt/trash/src/coreutils-8.29.tar.xz' failed Calling ptxdist with -v gives no more output. How can I debug this? The host, where I could build DistroKit has coreutils-8.29.tar.xz already downloaded, the host where it fails has not. Greets Alex -- /"\ ASCII RIBBON | »With the first link, the chain is forged. The first \ / CAMPAIGN | speech censured, the first thought forbidden, the X AGAINST | first freedom denied, chains us all irrevocably.« / \ HTML MAIL | (Jean-Luc Picard, quoting Judge Aaron Satie) [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] [-- Attachment #2: Type: text/plain, Size: 91 bytes --] _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] Recent DistroKit with ptxdist 2018.10.0 fails to get host-coreutils 2018-10-10 8:05 [ptxdist] Recent DistroKit with ptxdist 2018.10.0 fails to get host-coreutils Alexander Dahl @ 2018-10-10 11:04 ` Roland Hieber 2018-10-10 12:21 ` Roland Hieber 0 siblings, 1 reply; 7+ messages in thread From: Roland Hieber @ 2018-10-10 11:04 UTC (permalink / raw) To: distrokit, ptxdist Ohai, I set my source download folder to ./src/ and I can reproduce this with various other packages as well (kernel, coreutils, systemd, networkmanager), and even on PTXdist 2018.01.0…?! I added some debug echos to ptxdist/rules/post/ptxd_make_world_get.make: ------------------------------------------------ 8<--------------------- --- a/rules/post/ptxd_make_world_get.make +++ b/rules/post/ptxd_make_world_get.make @@ -15,7 +15,8 @@ # $(SRCDIR)/%: →@$(call targetinfo) - →@$(call get, $($@)) + →echo target '$$(SRCDIR)/%'; echo params: $@; echo $$($$@) = $($@); set -x; \ + →$(call get, $($@)) ifneq ($(call remove_quotes, $(PTXCONF_PROJECT_DEVPKGDIR)),) $(call remove_quotes, $(PTXCONF_PROJECT_DEVPKGDIR))/%-dev.tar.gz: ------------------------------------------------ >8--------------------- With this, I get the following output: $ ptxdist get networkmanager ----------------------------------- target: NetworkManager-1.8.4.tar.xz ----------------------------------- echo target '$(SRCDIR)/%'; echo params: src/NetworkManager-1.8.4.tar.xz; echo $($@) = ; set -x; \ ptxd_make_get_mirror=http://www.pengutronix.de/software/ptxdist/temporary-src ptxd_make_get "" "" target $(SRCDIR)/% params: src/NetworkManager-1.8.4.tar.xz = + ptxd_make_get_mirror=http://www.pengutronix.de/software/ptxdist/temporary-src + ptxd_make_get '' '' + local -a argv + local ptxmirror_url + local path= + shift + local -a orig_argv + orig_argv=("${@}") + '[' -z '' ']' + echo + echo 'error: empty parameter to '\''ptxd_make_get'\''' + echo + exit 1 error: empty parameter to 'ptxd_make_get' /ptx/work/dude/WORK_B/rhi/ptxdist/rules/post/ptxd_make_world_get.make:17: recipe for target 'src/NetworkManager-1.8.4.tar.xz' failed make: *** [src/NetworkManager-1.8.4.tar.xz] Error 1 I think that the $($@) expression should result in "NETWORKMANAGER", so ptxd_make_get knows about what package to download. As far as I understand, this should be a generated rule in DistroKit/platform-$name/state/ptxd_dgen_deps.post, but I cannot find it there... I'll try a bisect on ptxdist to find out where it first went wrong. - Roland On Wed, Oct 10, 2018 at 10:05:20AM +0200, Alexander Dahl wrote: > Hei hei, > > while I could build current ptxdist-2018.10.0 based DistroKit on one > host, I have problems building the very same BSP (DistroKit @ > DistroKit-2018.03.0-30-g78f0dbf) on another, quite similar host > (Debian GNU/Linux 9 (stretch), amd64). There seems to be a problem > with the host-coreutils package (selected by systemd). Note: the coreutils-package itself is > not selected. See: > > ----------------------------- > target: coreutils-8.29.tar.xz > ----------------------------- > > > error: empty parameter to 'ptxd_make_get' > > make: *** [/mnt/trash/src/coreutils-8.29.tar.xz] Error 1 > /usr/local/lib/ptxdist-2018.10.0/rules/post/ptxd_make_world_get.make:17: recipe for target '/mnt/trash/src/coreutils-8.29.tar.xz' failed > > Calling ptxdist with -v gives no more output. How can I debug this? > > The host, where I could build DistroKit has coreutils-8.29.tar.xz > already downloaded, the host where it fails has not. > > Greets > Alex > > -- > /"\ ASCII RIBBON | »With the first link, the chain is forged. The first > \ / CAMPAIGN | speech censured, the first thought forbidden, the > X AGAINST | first freedom denied, chains us all irrevocably.« > / \ HTML MAIL | (Jean-Luc Picard, quoting Judge Aaron Satie) > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de -- 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] Recent DistroKit with ptxdist 2018.10.0 fails to get host-coreutils 2018-10-10 11:04 ` Roland Hieber @ 2018-10-10 12:21 ` Roland Hieber 2018-10-10 13:22 ` Alexander Dahl 0 siblings, 1 reply; 7+ messages in thread From: Roland Hieber @ 2018-10-10 12:21 UTC (permalink / raw) To: distrokit, ptxdist On Wed, Oct 10, 2018 at 01:04:01PM +0200, Roland Hieber wrote: > Ohai, > > I set my source download folder to ./src/ and I can reproduce this with > various other packages as well (kernel, coreutils, systemd, > networkmanager), and even on PTXdist 2018.01.0…?! > > I added some debug echos to ptxdist/rules/post/ptxd_make_world_get.make: > > ------------------------------------------------ 8<--------------------- > --- a/rules/post/ptxd_make_world_get.make > +++ b/rules/post/ptxd_make_world_get.make > @@ -15,7 +15,8 @@ > # > $(SRCDIR)/%: > →@$(call targetinfo) > - →@$(call get, $($@)) > + →echo target '$$(SRCDIR)/%'; echo params: $@; echo $$($$@) = $($@); set -x; \ > + →$(call get, $($@)) > > ifneq ($(call remove_quotes, $(PTXCONF_PROJECT_DEVPKGDIR)),) > $(call remove_quotes, $(PTXCONF_PROJECT_DEVPKGDIR))/%-dev.tar.gz: > ------------------------------------------------ >8--------------------- > > With this, I get the following output: > > $ ptxdist get networkmanager > > ----------------------------------- > target: NetworkManager-1.8.4.tar.xz > ----------------------------------- > > echo target '$(SRCDIR)/%'; echo params: src/NetworkManager-1.8.4.tar.xz; echo $($@) = ; set -x; \ > ptxd_make_get_mirror=http://www.pengutronix.de/software/ptxdist/temporary-src ptxd_make_get "" "" > target $(SRCDIR)/% > params: src/NetworkManager-1.8.4.tar.xz Ah, there is the crux in the matter: I set PTXCONF_SETUP_SRCDIR=./src, but the ./ is missing here, because make internally transforms the name. Everything works fine if I set the source directory to /tmp/src. - Roland > = > + ptxd_make_get_mirror=http://www.pengutronix.de/software/ptxdist/temporary-src > + ptxd_make_get '' '' > + local -a argv > + local ptxmirror_url > + local path= > + shift > + local -a orig_argv > + orig_argv=("${@}") > + '[' -z '' ']' > + echo > + echo 'error: empty parameter to '\''ptxd_make_get'\''' > + echo > + exit 1 > > error: empty parameter to 'ptxd_make_get' > > /ptx/work/dude/WORK_B/rhi/ptxdist/rules/post/ptxd_make_world_get.make:17: recipe for target 'src/NetworkManager-1.8.4.tar.xz' failed > make: *** [src/NetworkManager-1.8.4.tar.xz] Error 1 > > > I think that the $($@) expression should result in "NETWORKMANAGER", so > ptxd_make_get knows about what package to download. As far as I > understand, this should be a generated rule in > DistroKit/platform-$name/state/ptxd_dgen_deps.post, but I cannot find it > there... I'll try a bisect on ptxdist to find out where it first went > wrong. > > - Roland > > > On Wed, Oct 10, 2018 at 10:05:20AM +0200, Alexander Dahl wrote: > > Hei hei, > > > > while I could build current ptxdist-2018.10.0 based DistroKit on one > > host, I have problems building the very same BSP (DistroKit @ > > DistroKit-2018.03.0-30-g78f0dbf) on another, quite similar host > > (Debian GNU/Linux 9 (stretch), amd64). There seems to be a problem > > with the host-coreutils package (selected by systemd). Note: the coreutils-package itself is > > not selected. See: > > > > ----------------------------- > > target: coreutils-8.29.tar.xz > > ----------------------------- > > > > > > error: empty parameter to 'ptxd_make_get' > > > > make: *** [/mnt/trash/src/coreutils-8.29.tar.xz] Error 1 > > /usr/local/lib/ptxdist-2018.10.0/rules/post/ptxd_make_world_get.make:17: recipe for target '/mnt/trash/src/coreutils-8.29.tar.xz' failed > > > > Calling ptxdist with -v gives no more output. How can I debug this? > > > > The host, where I could build DistroKit has coreutils-8.29.tar.xz > > already downloaded, the host where it fails has not. > > > > Greets > > Alex > > > > -- > > /"\ ASCII RIBBON | »With the first link, the chain is forged. The first > > \ / CAMPAIGN | speech censured, the first thought forbidden, the > > X AGAINST | first freedom denied, chains us all irrevocably.« > > / \ HTML MAIL | (Jean-Luc Picard, quoting Judge Aaron Satie) > > > > > _______________________________________________ > > ptxdist mailing list > > ptxdist@pengutronix.de > > > -- > 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 -- 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] Recent DistroKit with ptxdist 2018.10.0 fails to get host-coreutils 2018-10-10 12:21 ` Roland Hieber @ 2018-10-10 13:22 ` Alexander Dahl 2018-10-11 14:28 ` [ptxdist] [DistroKit] " Roland Hieber 0 siblings, 1 reply; 7+ messages in thread From: Alexander Dahl @ 2018-10-10 13:22 UTC (permalink / raw) To: Roland Hieber; +Cc: distrokit, ptxdist [-- Attachment #1.1: Type: text/plain, Size: 3505 bytes --] Hei hei, 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: > > Ohai, > > > > I set my source download folder to ./src/ and I can reproduce this with > > various other packages as well (kernel, coreutils, systemd, > > networkmanager), and even on PTXdist 2018.01.0…?! I don't think that is the same problem. 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. > > I added some debug echos to ptxdist/rules/post/ptxd_make_world_get.make: > > > > ------------------------------------------------ 8<--------------------- > > --- a/rules/post/ptxd_make_world_get.make > > +++ b/rules/post/ptxd_make_world_get.make > > @@ -15,7 +15,8 @@ > > # > > $(SRCDIR)/%: > > →@$(call targetinfo) > > - →@$(call get, $($@)) > > + →echo target '$$(SRCDIR)/%'; echo params: $@; echo $$($$@) = $($@); set -x; \ > > + →$(call get, $($@)) > > > > ifneq ($(call remove_quotes, $(PTXCONF_PROJECT_DEVPKGDIR)),) > > $(call remove_quotes, $(PTXCONF_PROJECT_DEVPKGDIR))/%-dev.tar.gz: > > ------------------------------------------------ >8--------------------- Nice. Let me show you two example outputs from my side, first is from a usual target only package, second triggers the problem: -------------------------- target: glib-2.56.1.tar.xz -------------------------- echo target '$(SRCDIR)/%'; echo params: /home/alex/src/DistroKit/src/glib-2.56.1.tar.xz; echo $($@) = GLIB; set -x; \ ptxd_make_get_mirror=http://www.pengutronix.de/software/ptxdist/temporary-src ptxd_make_get "/home/alex/src/DistroKit/src/glib-2.56.1.tar.xz" "http://ftp.gnome.o rg/pub/GNOME/sources/glib/2.56/glib-2.56.1.tar.xz" target $(SRCDIR)/% params: /home/alex/src/DistroKit/src/glib-2.56.1.tar.xz = GLIB ----------------------------- target: acl-2.2.52.src.tar.gz ----------------------------- echo target '$(SRCDIR)/%'; echo params: /home/alex/src/DistroKit/src/acl-2.2.52.src.tar.gz; echo $($@) = ; set -x; \ ptxd_make_get_mirror=http://www.pengutronix.de/software/ptxdist/temporary-src ptxd_make_get "" "" target $(SRCDIR)/% params: /home/alex/src/DistroKit/src/acl-2.2.52.src.tar.gz = > > I think that the $($@) expression should result in "NETWORKMANAGER", so > > ptxd_make_get knows about what package to download. As far as I > > understand, this should be a generated rule in > > DistroKit/platform-$name/state/ptxd_dgen_deps.post, but I cannot find it > > there... I'll try a bisect on ptxdist to find out where it first went > > wrong. If I compare the above output, the same happens here. In the second case ACL is missing while in the first case GLIB is there. I could reproduce this on another build host. So to say it clear again: download of a tarball fails, if the host package is selected, but the normal target package is not. If the tarball is already there, build is successful. Greets Alex -- /"\ ASCII RIBBON | »With the first link, the chain is forged. The first \ / CAMPAIGN | speech censured, the first thought forbidden, the X AGAINST | first freedom denied, chains us all irrevocably.« / \ HTML MAIL | (Jean-Luc Picard, quoting Judge Aaron Satie) [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] [-- Attachment #2: Type: text/plain, Size: 91 bytes --] _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] [DistroKit] Recent DistroKit with ptxdist 2018.10.0 fails to get host-coreutils 2018-10-10 13:22 ` Alexander Dahl @ 2018-10-11 14:28 ` Roland Hieber 2018-10-11 20:05 ` Roland Hieber 0 siblings, 1 reply; 7+ messages in thread From: Roland Hieber @ 2018-10-11 14:28 UTC (permalink / raw) To: distrokit, ptxdist On Wed, Oct 10, 2018 at 03:22:13PM +0200, Alexander Dahl wrote: > Hei hei, > > 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: > > > Ohai, > > > > > > I set my source download folder to ./src/ and I can reproduce this with > > > various other packages as well (kernel, coreutils, systemd, > > > networkmanager), and even on PTXdist 2018.01.0…?! > > I don't think that is the same problem. 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. - Roland > > > > I added some debug echos to ptxdist/rules/post/ptxd_make_world_get.make: > > > > > > ------------------------------------------------ 8<--------------------- > > > --- a/rules/post/ptxd_make_world_get.make > > > +++ b/rules/post/ptxd_make_world_get.make > > > @@ -15,7 +15,8 @@ > > > # > > > $(SRCDIR)/%: > > > →@$(call targetinfo) > > > - →@$(call get, $($@)) > > > + →echo target '$$(SRCDIR)/%'; echo params: $@; echo $$($$@) = $($@); set -x; \ > > > + →$(call get, $($@)) > > > > > > ifneq ($(call remove_quotes, $(PTXCONF_PROJECT_DEVPKGDIR)),) > > > $(call remove_quotes, $(PTXCONF_PROJECT_DEVPKGDIR))/%-dev.tar.gz: > > > ------------------------------------------------ >8--------------------- > > Nice. Let me show you two example outputs from my side, first is from > a usual target only package, second triggers the problem: > > -------------------------- > target: glib-2.56.1.tar.xz > -------------------------- > > echo target '$(SRCDIR)/%'; echo params: /home/alex/src/DistroKit/src/glib-2.56.1.tar.xz; echo $($@) = GLIB; set -x; \ > ptxd_make_get_mirror=http://www.pengutronix.de/software/ptxdist/temporary-src ptxd_make_get "/home/alex/src/DistroKit/src/glib-2.56.1.tar.xz" "http://ftp.gnome.o > rg/pub/GNOME/sources/glib/2.56/glib-2.56.1.tar.xz" > target $(SRCDIR)/% > params: /home/alex/src/DistroKit/src/glib-2.56.1.tar.xz > = GLIB > > > ----------------------------- > target: acl-2.2.52.src.tar.gz > ----------------------------- > > echo target '$(SRCDIR)/%'; echo params: /home/alex/src/DistroKit/src/acl-2.2.52.src.tar.gz; echo $($@) = ; set -x; \ > ptxd_make_get_mirror=http://www.pengutronix.de/software/ptxdist/temporary-src ptxd_make_get "" "" > target $(SRCDIR)/% > params: /home/alex/src/DistroKit/src/acl-2.2.52.src.tar.gz > = > > > > I think that the $($@) expression should result in "NETWORKMANAGER", so > > > ptxd_make_get knows about what package to download. As far as I > > > understand, this should be a generated rule in > > > DistroKit/platform-$name/state/ptxd_dgen_deps.post, but I cannot find it > > > there... I'll try a bisect on ptxdist to find out where it first went > > > wrong. > > If I compare the above output, the same happens here. In the second > case ACL is missing while in the first case GLIB is there. > > I could reproduce this on another build host. > > So to say it clear again: download of a tarball fails, if the host > package is selected, but the normal target package is not. If the > tarball is already there, build is successful. > > Greets > Alex > > -- > /"\ ASCII RIBBON | »With the first link, the chain is forged. The first > \ / CAMPAIGN | speech censured, the first thought forbidden, the > X AGAINST | first freedom denied, chains us all irrevocably.« > / \ HTML MAIL | (Jean-Luc Picard, quoting Judge Aaron Satie) > _______________________________________________ > DistroKit mailing list > DistroKit@pengutronix.de -- 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] [DistroKit] Recent DistroKit with ptxdist 2018.10.0 fails to get host-coreutils 2018-10-11 14:28 ` [ptxdist] [DistroKit] " Roland Hieber @ 2018-10-11 20:05 ` Roland Hieber 2018-10-12 11:59 ` Michael Olbrich 0 siblings, 1 reply; 7+ messages in thread From: Roland Hieber @ 2018-10-11 20:05 UTC (permalink / raw) To: distrokit, ptxdist, Michael Olbrich 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] [DistroKit] Recent DistroKit with ptxdist 2018.10.0 fails to get host-coreutils 2018-10-11 20:05 ` Roland Hieber @ 2018-10-12 11:59 ` Michael Olbrich 0 siblings, 0 replies; 7+ messages in thread From: Michael Olbrich @ 2018-10-12 11:59 UTC (permalink / raw) To: ptxdist, distrokit On Thu, Oct 11, 2018 at 10:05:56PM +0200, Roland Hieber wrote: > 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. The problem is, that '$(<PKG>_SOURCE) := <PKG>' is not set for the target package because it's disabled. And it's not set for the host package because they share the source (that condition was introduced in the commit you found). The solution is to define '$(<PKG>_SOURCE) := <PKG>' for the host package if the target package is disabled. This should be fixed in master. Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-10-12 11:59 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-10-10 8:05 [ptxdist] Recent DistroKit with ptxdist 2018.10.0 fails to get host-coreutils 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 2018-10-12 11:59 ` Michael Olbrich
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox