From: Roland Hieber <rhi@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <rhi@pengutronix.de>
Subject: [ptxdist] [RFC 2/2] ptxd_lib_dgen: recompile when certain global kconfig options change
Date: Thu, 14 Jan 2021 23:51:49 +0100 [thread overview]
Message-ID: <20210114225149.3181-2-rhi@pengutronix.de> (raw)
In-Reply-To: <20210114225149.3181-1-rhi@pengutronix.de>
There are certain variables in the menu which influence the build
environment for all packages:
* enabling dev packages
* enabling debug packages
* changing the reproducible date (only influences target packages)
* (probably more, but this is all which I could come up with right now)
Add those settings to the respective package hashes, so the hash changes
when those variables are changed, and the respective packages are
rebuilt.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
A similar case exists for GLOBAL_IPV6_OPTION, but it only affects the
packages that are using it, and not the whole userspace.
---
scripts/lib/ptxd_lib_dgen.awk | 22 ++++++++++++++++++++++
scripts/lib/ptxd_make_pkghash.awk | 13 +++++++++++++
2 files changed, 35 insertions(+)
diff --git a/scripts/lib/ptxd_lib_dgen.awk b/scripts/lib/ptxd_lib_dgen.awk
index 17748111b5ea..2fe358a6825e 100644
--- a/scripts/lib/ptxd_lib_dgen.awk
+++ b/scripts/lib/ptxd_lib_dgen.awk
@@ -202,6 +202,28 @@ $1 ~ /^PTX_MAP_._SOURCE/ {
#
# parse the ptx- and platformconfig
+#
+$1 ~ /^PTXCONF_PROJECT_CREATE_DEVPKGS/ {
+ if (PTXDIST_OLD_MAKE)
+ print "VAR: " $0 >> PTXDIST_HASHLIST;
+ else {
+ print "ifdef PTXDIST_SETUP_ONCE" > DGEN_DEPS_POST;
+ print "$(file >>" PTXDIST_HASHLIST ",VAR: " $1 "=$(" $1 "))" > DGEN_DEPS_POST;
+ print "endif" > DGEN_DEPS_POST;
+ }
+}
+
+$1 ~ /^PTXCONF_(DEBUG_PACKAGES|REPRODUCIBLE_TIMESTAMP)/ {
+ if (PTXDIST_OLD_MAKE)
+ print "TARGETVAR: " $0 >> PTXDIST_HASHLIST;
+ else {
+ print "ifdef PTXDIST_SETUP_ONCE" > DGEN_DEPS_POST;
+ print "$(file >>" PTXDIST_HASHLIST ",TARGETVAR: " $1 "=$(" $1 "))" > DGEN_DEPS_POST;
+ print "endif" > DGEN_DEPS_POST;
+ }
+}
+
+#
# record yes and module packages
#
$1 ~ /^PTXCONF_/ {
diff --git a/scripts/lib/ptxd_make_pkghash.awk b/scripts/lib/ptxd_make_pkghash.awk
index 2ecae47b48f5..461bb152318c 100755
--- a/scripts/lib/ptxd_make_pkghash.awk
+++ b/scripts/lib/ptxd_make_pkghash.awk
@@ -9,6 +9,8 @@
BEGIN {
PTXDIST_TEMPDIR = ENVIRON["PTXDIST_TEMPDIR"];
dirs = ""
+ vars = ""
+ targetvars = ""
}
$1 == "PATCHES:" {
@@ -30,6 +32,14 @@ $1 == "RULES:" {
rules[pkg] = rules[pkg] " " rule
}
+$1 == "VAR:" {
+ vars = $2 " " vars
+}
+
+$1 == "TARGETVAR:" {
+ targetvars = $2 " " targetvars
+}
+
function dump_file(src, dst, tmp) {
if (!src)
return
@@ -46,6 +56,9 @@ function dump_file(src, dst, tmp) {
END {
for (pkg in rules) {
f1 = PTXDIST_TEMPDIR "/pkghash-" pkg
+ printf vars "\n" >> f1
+ if ( pkg !~ /^HOST_/ )
+ printf targetvars "\n" >> f1
n = split(rules[pkg], cfgs)
for (rule = 1; rule <= n; rule++) {
dump_file(cfgs[rule], f1)
--
2.30.0
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
next prev parent reply other threads:[~2021-01-14 22:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-14 22:51 [ptxdist] [RFC 1/2] ptxdist: print a note when calling ptxdist inside 'ptxdist bash' Roland Hieber
2021-01-14 22:51 ` Roland Hieber [this message]
2021-01-15 7:02 ` [ptxdist] [RFC 2/2] ptxd_lib_dgen: recompile when certain global kconfig options change Michael Olbrich
2021-01-15 10:09 ` Roland Hieber
2021-01-15 6:35 ` [ptxdist] [RFC 1/2] ptxdist: print a note when calling ptxdist inside 'ptxdist bash' Michael Olbrich
2021-01-15 6:43 ` Michael Olbrich
2021-06-06 13:53 ` [ptxdist] [PATCH v1] " Roland Hieber
2021-06-16 10:35 ` [ptxdist] [APPLIED] " 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=20210114225149.3181-2-rhi@pengutronix.de \
--to=rhi@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