diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/dpkg/dpkg/0001-build.c-ignore-return-of-1-from-tar-cf.patch | 52 | ||||
-rw-r--r-- | meta/recipes-devtools/dpkg/dpkg_1.20.0.bb | 2 |
2 files changed, 54 insertions, 0 deletions
diff --git a/meta/recipes-devtools/dpkg/dpkg/0001-build.c-ignore-return-of-1-from-tar-cf.patch b/meta/recipes-devtools/dpkg/dpkg/0001-build.c-ignore-return-of-1-from-tar-cf.patch new file mode 100644 index 0000000000..7c35407364 --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/0001-build.c-ignore-return-of-1-from-tar-cf.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From 450fece894fce750502be8accabfd88c585bda4c Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Eggleton <paul.eggleton@linux.microsoft.com> | ||
3 | Date: Tue, 16 Jun 2020 03:57:25 +0000 | ||
4 | Subject: [PATCH] build.c: ignore return of 1 from tar -cf | ||
5 | |||
6 | When running do_package_write_deb, we have trees of hardlinked files | ||
7 | such as the dbg source files in ${PN}-dbg. If something makes another | ||
8 | copy of one of those files (or deletes one), the number of links a file | ||
9 | has changes and tar can notice this, e.g.: | ||
10 | |||
11 | | DEBUG: Executing python function do_package_deb | ||
12 | | dpkg-deb: building package `sed-ptest' in `/media/build1/poky/build/tmp/work/i586-poky-linux/sed/4.2.2-r0/deploy-debs/i586/sed-ptest_4.2.2-r0.3_i386.deb'. | ||
13 | | tar: ./usr/lib/sed/ptest/testsuite/tst-regex2: file changed as we read it | ||
14 | | dpkg-deb: error: subprocess tar -cf returned error exit status 1 | ||
15 | |||
16 | Tar returns an error of 1 when files 'change' and other errors codes | ||
17 | in other error cases. We tweak dpkg-deb here so that it ignores an exit | ||
18 | code of 1 from tar. The files don't really change (and we have locking in | ||
19 | place to avoid that kind of issue). | ||
20 | |||
21 | Upstream-Status: Inappropriate [OE specific] | ||
22 | |||
23 | Original patch by RP 2015/3/27, rebased by Paul Eggleton | ||
24 | |||
25 | Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> | ||
26 | --- | ||
27 | dpkg-deb/build.c | 5 ++++- | ||
28 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
29 | |||
30 | diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c | ||
31 | index a3d1912..1de7f9c 100644 | ||
32 | --- a/dpkg-deb/build.c | ||
33 | +++ b/dpkg-deb/build.c | ||
34 | @@ -427,6 +427,7 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder, | ||
35 | { | ||
36 | int pipe_filenames[2], pipe_tarball[2]; | ||
37 | pid_t pid_tar, pid_comp; | ||
38 | + int rc; | ||
39 | |||
40 | /* Fork off a tar. We will feed it a list of filenames on stdin later. */ | ||
41 | m_pipe(pipe_filenames); | ||
42 | @@ -477,7 +478,9 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder, | ||
43 | /* All done, clean up wait for tar and <compress> to finish their job. */ | ||
44 | close(pipe_filenames[1]); | ||
45 | subproc_reap(pid_comp, _("<compress> from tar -cf"), 0); | ||
46 | - subproc_reap(pid_tar, "tar -cf", 0); | ||
47 | + rc = subproc_reap(pid_tar, "tar -cf", SUBPROC_RETERROR); | ||
48 | + if (rc && rc != 1) | ||
49 | + ohshite(_("subprocess %s returned error exit status %d"), "tar -cf", rc); | ||
50 | } | ||
51 | |||
52 | static time_t | ||
diff --git a/meta/recipes-devtools/dpkg/dpkg_1.20.0.bb b/meta/recipes-devtools/dpkg/dpkg_1.20.0.bb index d539c57522..c98a9e58e2 100644 --- a/meta/recipes-devtools/dpkg/dpkg_1.20.0.bb +++ b/meta/recipes-devtools/dpkg/dpkg_1.20.0.bb | |||
@@ -16,5 +16,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/${BPN}_${PV}.tar.xz \ | |||
16 | file://0001-Add-support-for-riscv32-CPU.patch \ | 16 | file://0001-Add-support-for-riscv32-CPU.patch \ |
17 | " | 17 | " |
18 | 18 | ||
19 | SRC_URI_append_class-native = " file://0001-build.c-ignore-return-of-1-from-tar-cf.patch" | ||
20 | |||
19 | SRC_URI[md5sum] = "f88f077236a3ff3decae3b25c989893d" | 21 | SRC_URI[md5sum] = "f88f077236a3ff3decae3b25c989893d" |
20 | SRC_URI[sha256sum] = "b633cc2b0e030efb61e11029d8a3fb1123f719864c9992da2e52b471c96d0900" | 22 | SRC_URI[sha256sum] = "b633cc2b0e030efb61e11029d8a3fb1123f719864c9992da2e52b471c96d0900" |