summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/dpkg/dpkg
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-07 15:48:14 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-08 15:24:27 +0000
commit87377c2b5788b86c6aecaf47f9cef511c23edc12 (patch)
tree0d9ebdd1bec507afcb9dc60615714b3bcdee4ee9 /meta/recipes-devtools/dpkg/dpkg
parentf6d649826917dfd7074a9cb6060b7634c9b4e2e1 (diff)
downloadast2050-yocto-poky-87377c2b5788b86c6aecaf47f9cef511c23edc12.zip
ast2050-yocto-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/recipes-devtools/dpkg/dpkg')
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/preinst.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-devtools/dpkg/dpkg/preinst.patch b/meta/recipes-devtools/dpkg/dpkg/preinst.patch
new file mode 100644
index 0000000..06d2aac
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/preinst.patch
@@ -0,0 +1,46 @@
+Our pre/postinsts expect $D to be set when running in a sysroot and
+don't expect a chroot. This matches up our system expectations with
+what dpkg does.
+
+Upstream-Status: Inappropriate [OE Specific]
+
+RP 2011/12/07
+
+Index: dpkg-1.15.8.7/src/help.c
+===================================================================
+--- dpkg-1.15.8.7.orig/src/help.c 2010-12-20 01:25:36.000000000 +0000
++++ dpkg-1.15.8.7/src/help.c 2011-12-07 14:51:02.783461487 +0000
+@@ -181,30 +181,9 @@
+ * FIXME: none of the stuff here will work if admindir isn't inside
+ * instdir as expected.
+ */
+- size_t instdirl;
+-
+- if (*instdir) {
+- if (chroot(instdir)) ohshite(_("failed to chroot to `%.250s'"),instdir);
+- if (chdir("/"))
+- ohshite(_("failed to chdir to `%.255s'"), "/");
+- }
+- if (f_debug & dbg_scripts) {
+- struct varbuf args = VARBUF_INIT;
+- const char **argv = cmd->argv;
+-
+- while (*++argv) {
+- varbufaddc(&args, ' ');
+- varbufaddstr(&args, *argv);
+- }
+- varbufaddc(&args, '\0');
+- debug(dbg_scripts, "fork/exec %s (%s )", cmd->filename, args.buf);
+- varbuf_destroy(&args);
+- }
+- instdirl= strlen(instdir);
+- if (!instdirl)
+- return cmd->filename;
+- assert(strlen(cmd->filename) >= instdirl);
+- return cmd->filename + instdirl;
++ if (*instdir)
++ setenv("D", instdir, 1);
++ return cmd->filename;
+ }
+
+ void
OpenPOWER on IntegriCloud