summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch47
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils_git.bb4
2 files changed, 50 insertions, 1 deletions
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 0000000000..4bcae49542
--- /dev/null
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch
@@ -0,0 +1,47 @@
1If a the number of hard links decreases or increases while creating
2the tar files used for an ipk package, tar fails with error code 1:
3
4| DEBUG: Executing python function do_package_ipk
5| tar: ./usr/src/debug/gperf/3.0.4-r0/gperf-3.0.4/src/main.cc: file changed as we read it
6NOTE: recipe gperf-3.0.4-r0: task do_package_write_ipk: Failed
7ERROR: Task 6539 (recipes-extended/gperf/gperf_3.0.4.bb, do_package_write_ipk) failed with exit code '1'
8
9
10We detect if the error code produced by tar is 1 and in this case ignore it.
11
12This a similar behavior to the one on dpkg:
13http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=40731942515ec8d80c727ad561174986d4f05818
14
15Upsteam-Status: Inappropriate
16
17Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
18
19
20Index: git/opkg-build
21===================================================================
22--- git.orig/opkg-build
23+++ git/opkg-build
24@@ -250,8 +250,21 @@ tmp_dir=$dest_dir/IPKG_BUILD.$$
25 mkdir $tmp_dir
26
27 echo $CONTROL > $tmp_dir/tarX
28-( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -cz $tarformat -f $tmp_dir/data.tar.gz . )
29-( cd $pkg_dir/$CONTROL && tar $ogargs -cz $tarformat -f $tmp_dir/control.tar.gz . )
30+
31+
32+# Ignore error code 1, caused by modifying the number of hard links while creating the tar file
33+rc=0
34+( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -cz $tarformat -f $tmp_dir/data.tar.gz . ) || rc=$?
35+if [[ $rc -ne 1 ]] && [[ $rc -ne 0 ]] ;then
36+ exit $rc
37+fi
38+
39+rc=0
40+( cd $pkg_dir/$CONTROL && tar $ogargs -cz $tarformat -f $tmp_dir/control.tar.gz . ) || rc=$?
41+if [[ $rc -ne 1 ]] && [[ $rc -ne 0 ]] ;then
42+ exit $rc
43+fi
44+
45 rm $tmp_dir/tarX
46
47 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 2800a5deb7..74b974daf1 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"
10SRCREV = "53274f087565fd45d8452c5367997ba6a682a37a" 10SRCREV = "53274f087565fd45d8452c5367997ba6a682a37a"
11PV = "0.1.8+git${SRCPV}" 11PV = "0.1.8+git${SRCPV}"
12 12
13SRC_URI = "git://git.yoctoproject.org/opkg-utils" 13SRC_URI = "git://git.yoctoproject.org/opkg-utils "
14
15SRC_URI_append_class-native = "file://tar_ignore_error.patch"
14 16
15S = "${WORKDIR}/git" 17S = "${WORKDIR}/git"
16 18