mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 12:49:46 +00:00
dpkg: Fix patch to adjust for older code
The older version of dpkg uses subproc_wait_check() instead of the newer subproc_reap() (From OE-Core rev: 3e5632a02ee8f07705d5c34a57f36c6932a2e6cb) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
15892013ce
commit
c4ebd5d28b
@@ -16,11 +16,13 @@ place to avoid that kind of issue).
|
|||||||
Upsteam-Status: Inappropriate
|
Upsteam-Status: Inappropriate
|
||||||
RP 2015/3/27
|
RP 2015/3/27
|
||||||
|
|
||||||
Index: dpkg-1.17.21/dpkg-deb/build.c
|
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
||||||
|
|
||||||
|
Index: dpkg-1.17.4/dpkg-deb/build.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- dpkg-1.17.21.orig/dpkg-deb/build.c
|
--- dpkg-1.17.4.orig/dpkg-deb/build.c
|
||||||
+++ dpkg-1.17.21/dpkg-deb/build.c
|
+++ dpkg-1.17.4/dpkg-deb/build.c
|
||||||
@@ -398,7 +398,7 @@ do_build(const char *const *argv)
|
@@ -443,7 +443,7 @@ do_build(const char *const *argv)
|
||||||
bool subdir;
|
bool subdir;
|
||||||
char *tfbuf;
|
char *tfbuf;
|
||||||
int arfd;
|
int arfd;
|
||||||
@@ -29,26 +31,25 @@ Index: dpkg-1.17.21/dpkg-deb/build.c
|
|||||||
pid_t c1, c2;
|
pid_t c1, c2;
|
||||||
|
|
||||||
/* Decode our arguments. */
|
/* Decode our arguments. */
|
||||||
@@ -493,7 +493,9 @@ do_build(const char *const *argv)
|
@@ -536,7 +536,9 @@ do_build(const char *const *argv)
|
||||||
}
|
}
|
||||||
close(p1[0]);
|
close(p1[0]);
|
||||||
subproc_reap(c2, "gzip -9c", 0);
|
subproc_wait_check(c2, "gzip -9c", 0);
|
||||||
- subproc_reap(c1, "tar -cf", 0);
|
- subproc_wait_check(c1, "tar -cf", 0);
|
||||||
+ rc = subproc_reap(c1, "tar -cf", SUBPROC_RETERROR);
|
+ rc = subproc_wait_check(c1, "tar -cf", PROCNOERR);
|
||||||
+ if (rc && rc != 1)
|
+ if (rc && rc != 1)
|
||||||
+ ohshite(_("subprocess %s returned error exit status %d"), "tar -cf", rc);
|
+ ohshite(_("subprocess %s returned error exit status %d"), "tar -cf", rc);
|
||||||
|
|
||||||
if (lseek(gzfd, 0, SEEK_SET))
|
if (lseek(gzfd, 0, SEEK_SET))
|
||||||
ohshite(_("failed to rewind temporary file (%s)"), _("control member"));
|
ohshite(_("failed to rewind temporary file (%s)"), _("control member"));
|
||||||
@@ -581,7 +583,10 @@ do_build(const char *const *argv)
|
@@ -619,7 +621,9 @@ do_build(const char *const *argv)
|
||||||
/* All done, clean up wait for tar and gzip to finish their job. */
|
/* All done, clean up wait for tar and gzip to finish their job. */
|
||||||
close(p1[1]);
|
close(p1[1]);
|
||||||
subproc_reap(c2, _("<compress> from tar -cf"), 0);
|
subproc_wait_check(c2, _("<compress> from tar -cf"), 0);
|
||||||
- subproc_reap(c1, "tar -cf", 0);
|
- subproc_wait_check(c1, "tar -cf", 0);
|
||||||
+ rc = subproc_reap(c1, "tar -cf", SUBPROC_RETERROR);
|
+ rc = subproc_wait_check(c1, "tar -cf", PROCNOERR);
|
||||||
+ if (rc && rc != 1)
|
+ if (rc && rc != 1)
|
||||||
+ ohshite(_("subprocess %s returned error exit status %d"), "tar -cf", rc);
|
+ ohshite(_("subprocess %s returned error exit status %d"), "tar -cf", rc);
|
||||||
+
|
|
||||||
/* Okay, we have data.tar as well now, add it to the ar wrapper. */
|
/* Okay, we have data.tar as well now, add it to the ar wrapper. */
|
||||||
if (deb_format.major == 2) {
|
if (deb_format.major == 2) {
|
||||||
char datamember[16 + 1];
|
char datamember[16 + 1];
|
||||||
|
|||||||
Reference in New Issue
Block a user