[bitbake-devel] [PATCH krogoth+] fetch2: fix unpack of symbolic links

akuster akuster at mvista.com
Wed Jun 22 15:49:42 UTC 2016


Does the "Krogoth+" mean "master" too?

- armin

On 06/22/2016 02:34 AM, Stefan Christ wrote:
> Files in the download directory can be symbolic links to the real file.
> The fetcher must copy the real file instead of copying the symbolic
> link. Otherwise other tasks will fail, like patching, or the recipe will
> modify files in the download directory.
> 
> This patch fixes commit 865d2fef ("bitbake: fetch2: fixes copying of
> file://dir; subdir=foo, bug 6128 and bug 6129").
> 
> Signed-off-by: Stefan Christ <s.christ at phytec.de>
> ---
>  bitbake/lib/bb/fetch2/__init__.py | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
> index e8fbe89..a1819e7 100644
> --- a/bitbake/lib/bb/fetch2/__init__.py
> +++ b/bitbake/lib/bb/fetch2/__init__.py
> @@ -1423,7 +1423,9 @@ class FetchMethod(object):
>                      if urlpath.find("/") != -1:
>                          destdir = urlpath.rsplit("/", 1)[0] + '/'
>                          bb.utils.mkdirhier("%s/%s" % (unpackdir, destdir))
> -                cmd = 'cp -fpPR %s %s' % (file, destdir)
> +                # Use -L to always resolve symbolic links. Files in download
> +                # directory can be links to the real file.
> +                cmd = 'cp -fpLR %s %s' % (file, destdir)
>  
>          if not cmd:
>              return
> 



More information about the bitbake-devel mailing list