[elbe-devel] [PATCH] hdimg: fixup copying files to loop partition
Manuel Traut
manuel.traut at linutronix.de
Thu Apr 5 11:06:39 CEST 2018
On Thu, Apr 05, 2018 at 10:59:33AM +0200, John Ogness wrote:
> The current implementation uses '*' to copy files to the loop
> partition. This has 2 problems:
>
> 1. it will miss hidden files
> 2. if the directory is empty, cp returns an error
>
> Fix both of these issues by copying '.' instead of '*'.
>
> Signed-off-by: John Ogness <john.ogness at linutronix.de>
Reviewed-by: Manuel Traut <manut at linutronix.de>
applied to devel/elbe-3.0, thanks!
Manuel
> ---
> elbepack/hdimg.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/elbepack/hdimg.py b/elbepack/hdimg.py
> index e0aab938..3627c030 100644
> --- a/elbepack/hdimg.py
> +++ b/elbepack/hdimg.py
> @@ -465,7 +465,7 @@ def create_label(outf, disk, part, ppart, fslabel, target, grub):
>
> outf.do('mount /dev/loop0 %s' % os.path.join(target, "imagemnt"))
> outf.do(
> - 'cp -a "%s"/* "%s"' %
> + 'cp -a "%s/." "%s/"' %
> (os.path.join(
> target, "filesystems", entry.id), os.path.join(
> target, "imagemnt")), allow_fail=True)
> --
> 2.11.0
>
>
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel
More information about the elbe-devel
mailing list