Patchwork classes: tar 1.32 fixes

login
register
mail settings
Submitter Richard Purdie
Date Oct. 11, 2013, 10:01 p.m.
Message ID <1381528914.29912.188.camel@ted>
Download mbox | patch
Permalink /patch/59709/
State Accepted
Commit d3846f06d1e3faedcbc3c28e22c427bb0088683d
Headers show

Comments

Richard Purdie - Oct. 11, 2013, 10:01 p.m.
tar version 1.32 returns:

tar: --same-order option cannot be used with -c

with the commandlines we have been using. We can remove the -s option (which
is --same-order) to remove the error.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
Richard Purdie - Oct. 11, 2013, 10:15 p.m.
On Fri, 2013-10-11 at 23:01 +0100, Richard Purdie wrote:
> tar version 1.32 returns:

This should be 1.27, no idea why I wrote 32 in these two patches but
I'll fix that on branch before it goes in...

Cheers,

Richard

> tar: --same-order option cannot be used with -c
> 
> with the commandlines we have been using. We can remove the -s option (which
> is --same-order) to remove the error.
> 
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
> index fd06c4a..40c3138 100644
> --- a/meta/classes/libc-package.bbclass
> +++ b/meta/classes/libc-package.bbclass
> @@ -96,14 +96,14 @@ do_prep_locale_tree() {
>  	treedir=${WORKDIR}/locale-tree
>  	rm -rf $treedir
>  	mkdir -p $treedir/${base_bindir} $treedir/${base_libdir} $treedir/${datadir} $treedir/${localedir}
> -	tar -cf - -C ${LOCALETREESRC}${datadir} -ps i18n | tar -xf - -C $treedir/${datadir}
> +	tar -cf - -C ${LOCALETREESRC}${datadir} -p i18n | tar -xf - -C $treedir/${datadir}
>  	# unzip to avoid parsing errors
>  	for i in $treedir/${datadir}/i18n/charmaps/*gz; do 
>  		gunzip $i
>  	done
> -	tar -cf - -C ${LOCALETREESRC}${base_libdir} -ps . | tar -xf - -C $treedir/${base_libdir}
> +	tar -cf - -C ${LOCALETREESRC}${base_libdir} -p . | tar -xf - -C $treedir/${base_libdir}
>  	if [ -f ${STAGING_DIR_NATIVE}${prefix_native}/lib/libgcc_s.* ]; then
> -		tar -cf - -C ${STAGING_DIR_NATIVE}/${prefix_native}/${base_libdir} -ps libgcc_s.* | tar -xf - -C $treedir/${base_libdir}
> +		tar -cf - -C ${STAGING_DIR_NATIVE}/${prefix_native}/${base_libdir} -p libgcc_s.* | tar -xf - -C $treedir/${base_libdir}
>  	fi
>  	install -m 0755 ${LOCALETREESRC}${bindir}/localedef $treedir/${base_bindir}
>  }
> @@ -113,7 +113,7 @@ do_collect_bins_from_locale_tree() {
>  
>  	parent=$(dirname ${localedir})
>  	mkdir -p ${PKGD}/$parent
> -	tar -cf - -C $treedir/$parent -ps $(basename ${localedir}) | tar -xf - -C ${PKGD}$parent
> +	tar -cf - -C $treedir/$parent -p $(basename ${localedir}) | tar -xf - -C ${PKGD}$parent
>  }
>  
>  inherit qemu
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index 189d9fd..b0f44c7 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -463,7 +463,7 @@ python perform_packagecopy () {
>      # Start by package population by taking a copy of the installed
>      # files to operate on
>      # Preserve sparse files and hard links
> -    cmd = 'tar -cf - -C %s -ps . | tar -xf - -C %s' % (dest, dvar)
> +    cmd = 'tar -cf - -C %s -p . | tar -xf - -C %s' % (dest, dvar)
>      (retval, output) = oe.utils.getstatusoutput(cmd)
>      if retval:
>          bb.fatal("file copy failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
> diff --git a/meta/classes/populate_sdk_deb.bbclass b/meta/classes/populate_sdk_deb.bbclass
> index ec116ab..ebb842b 100644
> --- a/meta/classes/populate_sdk_deb.bbclass
> +++ b/meta/classes/populate_sdk_deb.bbclass
> @@ -13,7 +13,7 @@ populate_sdk_post_deb () {
>  	local target_rootfs=$1
>  
>  	mkdir -p ${target_rootfs}/etc
> -	tar -cf - -C ${STAGING_ETCDIR_NATIVE} -ps apt | tar -xf - -C ${target_rootfs}/etc
> +	tar -cf - -C ${STAGING_ETCDIR_NATIVE} -p apt | tar -xf - -C ${target_rootfs}/etc
>  }
>  
>  populate_sdk_deb () {
> diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
> index ac9028c..814f7bc 100644
> --- a/meta/classes/staging.bbclass
> +++ b/meta/classes/staging.bbclass
> @@ -13,7 +13,7 @@ sysroot_stage_dir() {
>  	# However we always want to stage a $src itself, even if it's empty
>  	mkdir -p "$dest"
>  	if [ -d "$src" ]; then
> -		tar -cf - -C "$src" -ps . | tar -xf - -C "$dest"
> +		tar -cf - -C "$src" -p . | tar -xf - -C "$dest"
>  	fi
>  }
>  
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Anders Darander - Oct. 25, 2013, 1:21 p.m.
* Richard Purdie <richard.purdie@linuxfoundation.org> [131012 00:16]:
> > tar: --same-order option cannot be used with -c

> > with the commandlines we have been using. We can remove the -s option (which
> > is --same-order) to remove the error.

> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Could we backport this patch to dora?

I'm experiencing this issue on a couple of buildboxes that was recently
updated.

Cheers,
Anders
Martin Jansa - Oct. 25, 2013, 1:59 p.m.
Gentoo is also installing 1.32 version by default now, so I would also like
to see it in dora later.


On Fri, Oct 25, 2013 at 3:21 PM, Anders Darander <anders@chargestorm.se>wrote:

> * Richard Purdie <richard.purdie@linuxfoundation.org> [131012 00:16]:
> > > tar: --same-order option cannot be used with -c
>
> > > with the commandlines we have been using. We can remove the -s option
> (which
> > > is --same-order) to remove the error.
>
> > > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>
> Could we backport this patch to dora?
>
> I'm experiencing this issue on a couple of buildboxes that was recently
> updated.
>
> Cheers,
> Anders
>
> --
> Anders Darander
> ChargeStorm AB / eStorm AB
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

Patch

diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
index fd06c4a..40c3138 100644
--- a/meta/classes/libc-package.bbclass
+++ b/meta/classes/libc-package.bbclass
@@ -96,14 +96,14 @@  do_prep_locale_tree() {
 	treedir=${WORKDIR}/locale-tree
 	rm -rf $treedir
 	mkdir -p $treedir/${base_bindir} $treedir/${base_libdir} $treedir/${datadir} $treedir/${localedir}
-	tar -cf - -C ${LOCALETREESRC}${datadir} -ps i18n | tar -xf - -C $treedir/${datadir}
+	tar -cf - -C ${LOCALETREESRC}${datadir} -p i18n | tar -xf - -C $treedir/${datadir}
 	# unzip to avoid parsing errors
 	for i in $treedir/${datadir}/i18n/charmaps/*gz; do 
 		gunzip $i
 	done
-	tar -cf - -C ${LOCALETREESRC}${base_libdir} -ps . | tar -xf - -C $treedir/${base_libdir}
+	tar -cf - -C ${LOCALETREESRC}${base_libdir} -p . | tar -xf - -C $treedir/${base_libdir}
 	if [ -f ${STAGING_DIR_NATIVE}${prefix_native}/lib/libgcc_s.* ]; then
-		tar -cf - -C ${STAGING_DIR_NATIVE}/${prefix_native}/${base_libdir} -ps libgcc_s.* | tar -xf - -C $treedir/${base_libdir}
+		tar -cf - -C ${STAGING_DIR_NATIVE}/${prefix_native}/${base_libdir} -p libgcc_s.* | tar -xf - -C $treedir/${base_libdir}
 	fi
 	install -m 0755 ${LOCALETREESRC}${bindir}/localedef $treedir/${base_bindir}
 }
@@ -113,7 +113,7 @@  do_collect_bins_from_locale_tree() {
 
 	parent=$(dirname ${localedir})
 	mkdir -p ${PKGD}/$parent
-	tar -cf - -C $treedir/$parent -ps $(basename ${localedir}) | tar -xf - -C ${PKGD}$parent
+	tar -cf - -C $treedir/$parent -p $(basename ${localedir}) | tar -xf - -C ${PKGD}$parent
 }
 
 inherit qemu
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 189d9fd..b0f44c7 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -463,7 +463,7 @@  python perform_packagecopy () {
     # Start by package population by taking a copy of the installed
     # files to operate on
     # Preserve sparse files and hard links
-    cmd = 'tar -cf - -C %s -ps . | tar -xf - -C %s' % (dest, dvar)
+    cmd = 'tar -cf - -C %s -p . | tar -xf - -C %s' % (dest, dvar)
     (retval, output) = oe.utils.getstatusoutput(cmd)
     if retval:
         bb.fatal("file copy failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
diff --git a/meta/classes/populate_sdk_deb.bbclass b/meta/classes/populate_sdk_deb.bbclass
index ec116ab..ebb842b 100644
--- a/meta/classes/populate_sdk_deb.bbclass
+++ b/meta/classes/populate_sdk_deb.bbclass
@@ -13,7 +13,7 @@  populate_sdk_post_deb () {
 	local target_rootfs=$1
 
 	mkdir -p ${target_rootfs}/etc
-	tar -cf - -C ${STAGING_ETCDIR_NATIVE} -ps apt | tar -xf - -C ${target_rootfs}/etc
+	tar -cf - -C ${STAGING_ETCDIR_NATIVE} -p apt | tar -xf - -C ${target_rootfs}/etc
 }
 
 populate_sdk_deb () {
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index ac9028c..814f7bc 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -13,7 +13,7 @@  sysroot_stage_dir() {
 	# However we always want to stage a $src itself, even if it's empty
 	mkdir -p "$dest"
 	if [ -d "$src" ]; then
-		tar -cf - -C "$src" -ps . | tar -xf - -C "$dest"
+		tar -cf - -C "$src" -p . | tar -xf - -C "$dest"
 	fi
 }