[OE-core] [PATCH 06/26] recipetool: create: prevent attempting to unpack entire DL_DIR
Paul Eggleton
paul.eggleton at linux.intel.com
Tue Dec 22 04:02:59 UTC 2015
If you specify a URL ending in /, BitBake's fetcher returns a localpath
of ${DL_DIR}, and if you then try to unpack that it will attempt to copy
the entire DL_DIR contents to the destination - which at least on my
system filled my entire /tmp. Obviously we should fix the fetcher, but
at least detect and stop that from happening here for now.
Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
---
scripts/lib/scriptutils.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scripts/lib/scriptutils.py b/scripts/lib/scriptutils.py
index 4dd7ef2..69e76d8 100644
--- a/scripts/lib/scriptutils.py
+++ b/scripts/lib/scriptutils.py
@@ -86,6 +86,10 @@ def fetch_uri(d, uri, destdir, srcrev=None):
ud = fetcher.ud[u]
ud.ignore_checksums = True
fetcher.download()
+ for u in fetcher.ud:
+ ud = fetcher.ud[u]
+ if ud.localpath.rstrip(os.sep) == localdata.getVar('DL_DIR', True).rstrip(os.sep):
+ raise Exception('Local path is download directory - please check that the URI "%s" is correct' % uri)
fetcher.unpack(destdir)
for u in fetcher.ud:
ud = fetcher.ud[u]
--
2.5.0
More information about the Openembedded-core
mailing list