[bitbake-devel] [PATCH] fetch2/svn: adds svn --ignore-externals option
Krzysztof Zawadzki
mr.k.zawadzki at gmail.com
Fri Feb 15 03:25:39 UTC 2019
With this option we can force users to provide all used sources in recipe.
Without this there is possibility that repositories which are using svn:externals
can point to source code from HEAD or to nonexisting repository.
This can cause attempt to reproduce build after some time impossible.
Signed-off-by: Krzysztof Zawadzki <mr.k.zawadzki at gmail.com>
---
lib/bb/fetch2/svn.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lib/bb/fetch2/svn.py b/lib/bb/fetch2/svn.py
index 9dcf3eb0..f4a07be3 100644
--- a/lib/bb/fetch2/svn.py
+++ b/lib/bb/fetch2/svn.py
@@ -97,13 +97,20 @@ class Svn(FetchMethod):
if ud.pswd:
options.append("--password %s" % ud.pswd)
-
+
if command == "info":
svncmd = "%s info %s %s://%s/%s/" % (ud.basecmd, " ".join(options), proto, svnroot, ud.module)
elif command == "log1":
svncmd = "%s log --limit 1 %s %s://%s/%s/" % (ud.basecmd, " ".join(options), proto, svnroot, ud.module)
else:
suffix = ""
+
+ if "externals" in ud.parm:
+ if ud.parm["externals"] == "ignore":
+ options.append("--ignore-externals")
+ else:
+ raise FetchError("Invalid value for 'externals': expected 'ignore'")
+
if ud.revision:
options.append("-r %s" % ud.revision)
suffix = "@%s" % (ud.revision)
--
2.20.1
More information about the bitbake-devel
mailing list