mirror of
https://git.yoctoproject.org/git/poky
synced 2026-01-04 16:10:04 +00:00
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>
This commit is contained in:
parent
caca77eb17
commit
4c3191f9ab
|
|
@ -85,6 +85,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]
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user