* [PATCH 0/1] sstate fetch symlink removal
@ 2016-05-23 21:56 Randy Witt
2016-05-23 21:57 ` [PATCH 1/1] sstate.bbclass: Don't create symlinks, download to the correct location Randy Witt
0 siblings, 1 reply; 4+ messages in thread
From: Randy Witt @ 2016-05-23 21:56 UTC (permalink / raw)
To: openembedded-core
This change removes the clutter of symlinks when sstate comes from a mirror
rather than being created on the host.
The following changes since commit c7e614c438706fb3ed7520b4990ebb3973366942:
useradd: Fix infinite build loop (2016-05-23 10:33:45 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib rewitt/sstate-symlink
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=rewitt/sstate-symlink
Randy Witt (1):
sstate.bbclass: Don't create symlinks, download to the correct
location
meta/classes/sstate.bbclass | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
--
2.5.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] sstate.bbclass: Don't create symlinks, download to the correct location
2016-05-23 21:56 [PATCH 0/1] sstate fetch symlink removal Randy Witt
@ 2016-05-23 21:57 ` Randy Witt
2016-05-23 22:29 ` Christopher Larson
2016-05-24 19:51 ` [PATCH v2] " Randy Witt
0 siblings, 2 replies; 4+ messages in thread
From: Randy Witt @ 2016-05-23 21:57 UTC (permalink / raw)
To: openembedded-core
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@linux.intel.com>
---
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..6d5411f 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={1}'.format(sstatefetch, sstatefetch),
+ 'file://{0}.siginfo;downloadfilename={1}.siginfo'.format(sstatefetch, sstatefetch)]
if bb.utils.to_boolean(d.getVar("SSTATE_VERIFY_SIG", True), False):
- uris += ['file://{0}.sig'.format(sstatefetch)]
+ uris += ['file://{0}.sig;downloadfilename={1}.sig'.format(sstatefetch, 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
--
2.5.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] sstate.bbclass: Don't create symlinks, download to the correct location
2016-05-23 21:57 ` [PATCH 1/1] sstate.bbclass: Don't create symlinks, download to the correct location Randy Witt
@ 2016-05-23 22:29 ` Christopher Larson
2016-05-24 19:51 ` [PATCH v2] " Randy Witt
1 sibling, 0 replies; 4+ messages in thread
From: Christopher Larson @ 2016-05-23 22:29 UTC (permalink / raw)
To: Randy Witt; +Cc: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 1837 bytes --]
On Mon, May 23, 2016 at 2:57 PM, Randy Witt <randy.e.witt@linux.intel.com>
wrote:
> 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@linux.intel.com>
> ---
> 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..6d5411f 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={1}'.format(sstatefetch,
> sstatefetch),
> +
> 'file://{0}.siginfo;downloadfilename={1}.siginfo'.format(sstatefetch,
> sstatefetch)]
> if bb.utils.to_boolean(d.getVar("SSTATE_VERIFY_SIG", True), False):
> - uris += ['file://{0}.sig'.format(sstatefetch)]
> + uris +=
> ['file://{0}.sig;downloadfilename={1}.sig'.format(sstatefetch, sstatefetch)]
>
The use of {1} and passing the argument a second time is not needed. This
isn't the old style formatting with %s. Just use the existing argument:
file://{0};downloadfilename={0}'.format(sstatefetch)
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
[-- Attachment #2: Type: text/html, Size: 2653 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] sstate.bbclass: Don't create symlinks, download to the correct location
2016-05-23 21:57 ` [PATCH 1/1] sstate.bbclass: Don't create symlinks, download to the correct location Randy Witt
2016-05-23 22:29 ` Christopher Larson
@ 2016-05-24 19:51 ` Randy Witt
1 sibling, 0 replies; 4+ messages in thread
From: Randy Witt @ 2016-05-24 19:51 UTC (permalink / raw)
To: openembedded-core
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@linux.intel.com>
---
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
--
2.5.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-05-24 19:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-23 21:56 [PATCH 0/1] sstate fetch symlink removal Randy Witt
2016-05-23 21:57 ` [PATCH 1/1] sstate.bbclass: Don't create symlinks, download to the correct location Randy Witt
2016-05-23 22:29 ` Christopher Larson
2016-05-24 19:51 ` [PATCH v2] " Randy Witt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox