From: Martin Jansa <martin.jansa@gmail.com>
To: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/1] opkg-build: Ignore tar error due to hardlinks issue when creating ipk files
Date: Mon, 6 Jul 2015 22:10:18 +0200 [thread overview]
Message-ID: <20150706201018.GD2436@jama> (raw)
In-Reply-To: <41e68bf09d809269524babaae2911a7c41e38351.1436177709.git.alejandro.hernandez@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 4060 bytes --]
On Mon, Jul 06, 2015 at 10:17:19AM +0000, Alejandro Hernandez wrote:
> If a the number of hard links decreases or increases while creating
> the tar files used for an ipk package, tar fails with error code 1,
> if this is the case we ignore the error and continue to create the ipk file
>
> [YOCTO #7933]
>
> Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
> ---
> .../opkg-utils/opkg-utils/tar_ignore_error.patch | 47 ++++++++++++++++++++++
> meta/recipes-devtools/opkg-utils/opkg-utils_git.bb | 4 +-
> 2 files changed, 50 insertions(+), 1 deletion(-)
> create mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch
>
> diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch
> new file mode 100644
> index 0000000..4bcae4954
> --- /dev/null
> +++ b/meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch
> @@ -0,0 +1,47 @@
> +If a the number of hard links decreases or increases while creating
> +the tar files used for an ipk package, tar fails with error code 1:
> +
> +| DEBUG: Executing python function do_package_ipk
> +| tar: ./usr/src/debug/gperf/3.0.4-r0/gperf-3.0.4/src/main.cc: file changed as we read it
> +NOTE: recipe gperf-3.0.4-r0: task do_package_write_ipk: Failed
> +ERROR: Task 6539 (recipes-extended/gperf/gperf_3.0.4.bb, do_package_write_ipk) failed with exit code '1'
> +
> +
> +We detect if the error code produced by tar is 1 and in this case ignore it.
> +
> +This a similar behavior to the one on dpkg:
> +http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=40731942515ec8d80c727ad561174986d4f05818
> +
> +Upsteam-Status: Inappropriate
Typo and why is it inappropriate? Looks like bugfix to me, even for
issue which usually happens in OE way of using opkg-build.
> +
> +Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
> +
> +
> +Index: git/opkg-build
> +===================================================================
> +--- git.orig/opkg-build
> ++++ git/opkg-build
> +@@ -250,8 +250,21 @@ tmp_dir=$dest_dir/IPKG_BUILD.$$
> + mkdir $tmp_dir
> +
> + echo $CONTROL > $tmp_dir/tarX
> +-( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -cz $tarformat -f $tmp_dir/data.tar.gz . )
> +-( cd $pkg_dir/$CONTROL && tar $ogargs -cz $tarformat -f $tmp_dir/control.tar.gz . )
> ++
> ++
> ++# Ignore error code 1, caused by modifying the number of hard links while creating the tar file
> ++rc=0
> ++( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -cz $tarformat -f $tmp_dir/data.tar.gz . ) || rc=$?
> ++if [[ $rc -ne 1 ]] && [[ $rc -ne 0 ]] ;then
> ++ exit $rc
> ++fi
> ++
> ++rc=0
> ++( cd $pkg_dir/$CONTROL && tar $ogargs -cz $tarformat -f $tmp_dir/control.tar.gz . ) || rc=$?
> ++if [[ $rc -ne 1 ]] && [[ $rc -ne 0 ]] ;then
> ++ exit $rc
> ++fi
> ++
> + rm $tmp_dir/tarX
> +
> + echo "2.0" > $tmp_dir/debian-binary
> diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
> index 2800a5d..74b974d 100644
> --- a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
> +++ b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
> @@ -10,7 +10,9 @@ PROVIDES += "virtual/update-alternatives"
> SRCREV = "53274f087565fd45d8452c5367997ba6a682a37a"
> PV = "0.1.8+git${SRCPV}"
>
> -SRC_URI = "git://git.yoctoproject.org/opkg-utils"
> +SRC_URI = "git://git.yoctoproject.org/opkg-utils "
> +
> +SRC_URI_append_class-native = "file://tar_ignore_error.patch"
Add leading space in append not in original SRC_URI variable.
Why is it applied only for native anyway?
>
> S = "${WORKDIR}/git"
>
> --
> 1.8.4.5
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]
next prev parent reply other threads:[~2015-07-06 20:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1436177709.git.alejandro.hernandez@linux.intel.com>
2015-07-06 10:17 ` [PATCH 1/1] opkg-build: Ignore tar error due to hardlinks issue when creating ipk files Alejandro Hernandez
2015-07-06 20:10 ` Martin Jansa [this message]
2015-07-06 21:10 ` Alejandro Hernandez
2015-07-06 21:16 ` Gary Thomas
2015-07-06 21:20 ` Otavio Salvador
2015-07-06 21:31 ` Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150706201018.GD2436@jama \
--to=martin.jansa@gmail.com \
--cc=alejandro.hernandez@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.