mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] configure_helper: allow passing --force to ptxdist
@ 2020-01-13 13:55 Roland Hieber
  2020-01-13 13:59 ` [ptxdist] [PATCH v2] " Roland Hieber
  0 siblings, 1 reply; 2+ messages in thread
From: Roland Hieber @ 2020-01-13 13:55 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 scripts/configure_helper.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/scripts/configure_helper.py b/scripts/configure_helper.py
index 3af7b416a4f7..a29d80ecf0f3 100755
--- a/scripts/configure_helper.py
+++ b/scripts/configure_helper.py
@@ -163,7 +163,7 @@ def abort(message):
 	print("\nSee '%s --help' for more details." % cmd)
 	exit(1)
 
-def ask_ptxdist(pkg):
+def ask_ptxdist(pkg, force):
 	ptxdist = os.environ.get("PTXDIST", os.environ.get("ptxdist", "ptxdist"))
 	cmdline = [ ptxdist, "-k", "make",
 		"/print-%s_DIR" % pkg,
@@ -174,6 +174,9 @@ def ask_ptxdist(pkg):
 		"/print-CROSS_MESON_USR",
 		"/print-CROSS_AUTOCONF_USR",
 		"/print-PTXDIST_SYSROOT_HOST" ]
+	if force:
+		cmdline.insert(1, "--force")
+
 	try:
 		p = subprocess.Popen(cmdline,
 			stdout=subprocess.PIPE,
@@ -485,6 +488,8 @@ parser.add_argument("-s", "--only-src", help="the only source directory",
 	dest="only")
 parser.add_argument("--sort", help="sort the options before comparing",
 	dest="sort", action="store_true")
+parser.add_argument("-f", "--force", help="pass --force when calling ptxdist",
+	dest="force", action="store_true")
 
 args = parser.parse_args()
 
@@ -512,7 +517,7 @@ ptx_pkg_conf_opt = []
 pkg_subdir = ""
 tool = None
 if args.pkg:
-	(tool, d, pkg_subdir, pkg_conf_opt, sysroot_host) = ask_ptxdist(ptx_PKG)
+	(tool, d, pkg_subdir, pkg_conf_opt, sysroot_host) = ask_ptxdist(ptx_PKG, args.force)
 	ptx_pkg_label = "rules/%s.make" % ptx_pkg
 	if tool == "autoconf":
 		parsed_pkg_conf_opt = parse_configure_args(pkg_conf_opt, [])
-- 
2.25.0.rc1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-13 13:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-13 13:55 [ptxdist] [PATCH] configure_helper: allow passing --force to ptxdist Roland Hieber
2020-01-13 13:59 ` [ptxdist] [PATCH v2] " Roland Hieber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox