diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-12-07 15:48:14 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-12-08 15:24:27 +0000 |
commit | 87377c2b5788b86c6aecaf47f9cef511c23edc12 (patch) | |
tree | 0d9ebdd1bec507afcb9dc60615714b3bcdee4ee9 /meta | |
parent | f6d649826917dfd7074a9cb6060b7634c9b4e2e1 (diff) | |
download | poky-87377c2b5788b86c6aecaf47f9cef511c23edc12.tar.gz |
dpkg: Fix preinst execution
Add a patch to fix exeuction of pre/post install scripts. See the patch
header for more details.
(From OE-Core rev: dc433b556f5b44a6d818a81df6be484ad59daebd)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/dpkg/dpkg/preinst.patch | 46 | ||||
-rw-r--r-- | meta/recipes-devtools/dpkg/dpkg_1.15.8.7.bb | 5 |
2 files changed, 49 insertions, 2 deletions
diff --git a/meta/recipes-devtools/dpkg/dpkg/preinst.patch b/meta/recipes-devtools/dpkg/dpkg/preinst.patch new file mode 100644 index 0000000000..06d2aacf3f --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/preinst.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | Our pre/postinsts expect $D to be set when running in a sysroot and | ||
2 | don't expect a chroot. This matches up our system expectations with | ||
3 | what dpkg does. | ||
4 | |||
5 | Upstream-Status: Inappropriate [OE Specific] | ||
6 | |||
7 | RP 2011/12/07 | ||
8 | |||
9 | Index: dpkg-1.15.8.7/src/help.c | ||
10 | =================================================================== | ||
11 | --- dpkg-1.15.8.7.orig/src/help.c 2010-12-20 01:25:36.000000000 +0000 | ||
12 | +++ dpkg-1.15.8.7/src/help.c 2011-12-07 14:51:02.783461487 +0000 | ||
13 | @@ -181,30 +181,9 @@ | ||
14 | * FIXME: none of the stuff here will work if admindir isn't inside | ||
15 | * instdir as expected. | ||
16 | */ | ||
17 | - size_t instdirl; | ||
18 | - | ||
19 | - if (*instdir) { | ||
20 | - if (chroot(instdir)) ohshite(_("failed to chroot to `%.250s'"),instdir); | ||
21 | - if (chdir("/")) | ||
22 | - ohshite(_("failed to chdir to `%.255s'"), "/"); | ||
23 | - } | ||
24 | - if (f_debug & dbg_scripts) { | ||
25 | - struct varbuf args = VARBUF_INIT; | ||
26 | - const char **argv = cmd->argv; | ||
27 | - | ||
28 | - while (*++argv) { | ||
29 | - varbufaddc(&args, ' '); | ||
30 | - varbufaddstr(&args, *argv); | ||
31 | - } | ||
32 | - varbufaddc(&args, '\0'); | ||
33 | - debug(dbg_scripts, "fork/exec %s (%s )", cmd->filename, args.buf); | ||
34 | - varbuf_destroy(&args); | ||
35 | - } | ||
36 | - instdirl= strlen(instdir); | ||
37 | - if (!instdirl) | ||
38 | - return cmd->filename; | ||
39 | - assert(strlen(cmd->filename) >= instdirl); | ||
40 | - return cmd->filename + instdirl; | ||
41 | + if (*instdir) | ||
42 | + setenv("D", instdir, 1); | ||
43 | + return cmd->filename; | ||
44 | } | ||
45 | |||
46 | void | ||
diff --git a/meta/recipes-devtools/dpkg/dpkg_1.15.8.7.bb b/meta/recipes-devtools/dpkg/dpkg_1.15.8.7.bb index f1a0eebcd5..f1030faf94 100644 --- a/meta/recipes-devtools/dpkg/dpkg_1.15.8.7.bb +++ b/meta/recipes-devtools/dpkg/dpkg_1.15.8.7.bb | |||
@@ -4,10 +4,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | |||
4 | SRC_URI += "file://noman.patch \ | 4 | SRC_URI += "file://noman.patch \ |
5 | file://check_snprintf.patch \ | 5 | file://check_snprintf.patch \ |
6 | file://check_version.patch \ | 6 | file://check_version.patch \ |
7 | file://perllibdir.patch" | 7 | file://perllibdir.patch \ |
8 | file://preinst.patch" | ||
8 | 9 | ||
9 | SRC_URI[md5sum] = "d1731d4147c1ea3b537a4d094519a6dc" | 10 | SRC_URI[md5sum] = "d1731d4147c1ea3b537a4d094519a6dc" |
10 | SRC_URI[sha256sum] = "1ec1376471b04717a4497e5d7a27cd545248c92116898ce0c53ced8ea94267b5" | 11 | SRC_URI[sha256sum] = "1ec1376471b04717a4497e5d7a27cd545248c92116898ce0c53ced8ea94267b5" |
11 | 12 | ||
12 | PR = "${INC_PR}.1" | 13 | PR = "${INC_PR}.3" |
13 | 14 | ||