[elbe-devel] [PATCH] Copy usr files before corresponding [s]bin and lib
Torben Hohn
torben.hohn at linutronix.de
Wed Dec 4 18:08:53 CET 2019
On Tue, Dec 03, 2019 at 01:35:06AM +0100, bage at linutronix.de wrote:
> From: Bastian Germann <bage at linutronix.de>
>
> Sorting the file list that is copied from chroot to target has the following
> effect: The files from /bin, /lib, and /sbin fail to copy on buster targets
> because they are dangling symlinks to the /usr/... hierarchy at the copy time.
>
> Change the order to fix the problem.
I am not happy with this.
No comment explains, why this shall happen.
Its already not obvious, that the sorting is there
to make sure, that all the directories are created, before files are
copied.
Why do we have these problem in the first place ?
Do some packages contain files in /lib ?
The proper fix would be to fix copy_filelist to make it handle the
symlinks.
>
> Signed-off-by: Bastian Germann <bage at linutronix.de>
> ---
> elbepack/efilesystem.py | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/elbepack/efilesystem.py b/elbepack/efilesystem.py
> index ef26c21bd..8d7ccd3b2 100644
> --- a/elbepack/efilesystem.py
> +++ b/elbepack/efilesystem.py
> @@ -78,7 +78,8 @@ def extract_target(src, xml, dst, cache):
> "var/lib/dpkg/info/%s:%s.conffiles" %
> (line, arch))
>
> - file_list = list(sorted(set(file_list)))
> + file_list = sorted(set(file_list),
> + key = lambda k: k[4:] if k.startswith('/usr') else k)
> copy_filelist(src, file_list, dst)
> else:
> # first copy most diretories
> --
> 2.20.1
>
>
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel
--
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99
Hinweise zum Datenschutz finden Sie hier (Informations on data privacy
can be found here): https://linutronix.de/kontakt/Datenschutz.php
Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen |
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner
More information about the elbe-devel
mailing list