summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2015-08-28 15:18:51 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-01 11:44:03 +0100
commite444e84935f5a25799e1a7c88e886fa6e8a9b9d4 (patch)
tree8590fca8ce102c6544641d35f077c38bf1190e6b /meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
parenteb45cd659bf06fdf1ba4c377db2aac268ecf6e31 (diff)
downloadpoky-e444e84935f5a25799e1a7c88e886fa6e8a9b9d4.tar.gz
dpkg: update to 1.18.2
check_snprintf.patch has been dropped, because it seems to fix a problem that doesn't anymore exist, and doesn't have any description of what the problem was and how was it fixed. tarfix.patch has been merged upstream. The rest of the patches have been rebased to the new upstream release (From OE-Core rev: c11b2be13a6d5e34f2baed4b8ee8ccd66438c1de) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch')
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch b/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
new file mode 100644
index 0000000000..9f77c6c991
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
@@ -0,0 +1,60 @@
1From 24229971492515b64c81e8c6392e5dfbdc22b44c Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 26 Aug 2015 16:25:45 +0300
4Subject: [PATCH 3/5] Our pre/postinsts expect $D to be set when running in a
5 sysroot and don't expect a chroot. This matches up our system expectations
6 with what dpkg does.
7
8Upstream-Status: Inappropriate [OE Specific]
9
10RP 2011/12/07
11---
12 src/script.c | 31 ++-----------------------------
13 1 file changed, 2 insertions(+), 29 deletions(-)
14
15diff --git a/src/script.c b/src/script.c
16index a958145..24c49f9 100644
17--- a/src/script.c
18+++ b/src/script.c
19@@ -100,36 +100,9 @@ maintscript_pre_exec(struct command *cmd)
20 size_t instdirl = strlen(instdir);
21
22 if (*instdir) {
23- if (strncmp(admindir, instdir, instdirl) != 0)
24- ohshit(_("admindir must be inside instdir for dpkg to work properly"));
25- if (setenv("DPKG_ADMINDIR", admindir + instdirl, 1) < 0)
26- ohshite(_("unable to setenv for subprocesses"));
27-
28- if (chroot(instdir))
29- ohshite(_("failed to chroot to '%.250s'"), instdir);
30- }
31- /* Switch to a known good directory to give the maintainer script
32- * a saner environment, also needed after the chroot(). */
33- if (chdir("/"))
34- ohshite(_("failed to chdir to '%.255s'"), "/");
35- if (debug_has_flag(dbg_scripts)) {
36- struct varbuf args = VARBUF_INIT;
37- const char **argv = cmd->argv;
38-
39- while (*++argv) {
40- varbuf_add_char(&args, ' ');
41- varbuf_add_str(&args, *argv);
42- }
43- varbuf_end_str(&args);
44- debug(dbg_scripts, "fork/exec %s (%s )", cmd->filename,
45- args.buf);
46- varbuf_destroy(&args);
47+ setenv("D", instdir, 1);
48 }
49- if (!instdirl)
50- return cmd->filename;
51-
52- assert(strlen(cmd->filename) >= instdirl);
53- return cmd->filename + instdirl;
54+ return cmd->filename;
55 }
56
57 /**
58--
592.1.4
60