summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-12-22 17:02:59 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-15 15:51:40 +0000
commit4c3191f9abe889f1ef4b29be1f659dffb03cf1ce (patch)
tree0bd01718dfa8aa21c6424943fee910c76f1674f0 /scripts
parentcaca77eb1795a7bbc37008861f3e80714fcc1d0e (diff)
downloadpoky-4c3191f9abe889f1ef4b29be1f659dffb03cf1ce.tar.gz
recipetool: create: prevent attempting to unpack entire DL_DIR
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. (From OE-Core master rev: 7e63a672517518644a37ce006e05b5494c29cf6e) (From OE-Core rev: 623e59b103c1edf3211384d26cc0c83cfd424587) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/scriptutils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/lib/scriptutils.py b/scripts/lib/scriptutils.py
index 3366882635..e79a195b1f 100644
--- a/scripts/lib/scriptutils.py
+++ b/scripts/lib/scriptutils.py
@@ -85,6 +85,10 @@ def fetch_uri(d, uri, destdir, srcrev=None):
85 ud = fetcher.ud[u] 85 ud = fetcher.ud[u]
86 ud.ignore_checksums = True 86 ud.ignore_checksums = True
87 fetcher.download() 87 fetcher.download()
88 for u in fetcher.ud:
89 ud = fetcher.ud[u]
90 if ud.localpath.rstrip(os.sep) == localdata.getVar('DL_DIR', True).rstrip(os.sep):
91 raise Exception('Local path is download directory - please check that the URI "%s" is correct' % uri)
88 fetcher.unpack(destdir) 92 fetcher.unpack(destdir)
89 for u in fetcher.ud: 93 for u in fetcher.ud:
90 ud = fetcher.ud[u] 94 ud = fetcher.ud[u]