[oe-commits] [openembedded-core] 05/16: sstate.bbclass: Don't create symlinks, download to the correct location
git at git.openembedded.org
git at git.openembedded.org
Tue May 24 09:15:52 UTC 2016
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 29c137cf108de048d251234e22cf84f40a058c7f
Author: Randy Witt <randy.e.witt at linux.intel.com>
AuthorDate: Mon May 23 14:57:00 2016 -0700
sstate.bbclass: Don't create symlinks, download to the correct location
Previously the sstate was all downloaded to the same directory and then
symlinks were added in the directories that pointed to the siginfo and
sstate in the parent directory.
This change makes it so that now the files are just downloaded to the
correct location without the need for symlinks.
Signed-off-by: Randy Witt <randy.e.witt at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/sstate.bbclass | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 22ce1ee..6bf94b0 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -623,10 +623,10 @@ def pstaging_fetch(sstatefetch, sstatepkg, d):
# Try a fetch from the sstate mirror, if it fails just return and
# we will build the package
- uris = ['file://{0}'.format(sstatefetch),
- 'file://{0}.siginfo'.format(sstatefetch)]
+ uris = ['file://{0};downloadfilename={0}'.format(sstatefetch),
+ 'file://{0}.siginfo;downloadfilename={0}.siginfo'.format(sstatefetch)]
if bb.utils.to_boolean(d.getVar("SSTATE_VERIFY_SIG", True), False):
- uris += ['file://{0}.sig'.format(sstatefetch)]
+ uris += ['file://{0}.sig;downloadfilename={0}.sig'.format(sstatefetch)]
for srcuri in uris:
localdata.setVar('SRC_URI', srcuri)
@@ -634,12 +634,6 @@ def pstaging_fetch(sstatefetch, sstatepkg, d):
fetcher = bb.fetch2.Fetch([srcuri], localdata, cache=False)
fetcher.download()
- # Need to optimise this, if using file:// urls, the fetcher just changes the local path
- # For now work around by symlinking
- localpath = bb.data.expand(fetcher.localpath(srcuri), localdata)
- if localpath != sstatepkg and os.path.exists(localpath) and not os.path.exists(sstatepkg):
- os.symlink(localpath, sstatepkg)
-
except bb.fetch2.BBFetchException:
break
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list