summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/dpkg/dpkg/preinst.patch
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2013-07-29 11:11:09 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-03 10:33:10 +0100
commitc342715965ae173879fd6f8366dc60c093a393f7 (patch)
tree015620bb535705ab8fca774792ca855adee42787 /meta/recipes-devtools/dpkg/dpkg/preinst.patch
parent46e50e3703c822b4c2d7beb6873f3835274f4302 (diff)
downloadpoky-c342715965ae173879fd6f8366dc60c093a393f7.tar.gz
dpkg: upgrade to 1.17.1
Rebased patches and removed mips related arch triptlet patch due to being upstreamed (From OE-Core rev: 6d4257217f8c5c61ae9bc02b6607d1066168c03a) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/dpkg/dpkg/preinst.patch')
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/preinst.patch30
1 files changed, 14 insertions, 16 deletions
diff --git a/meta/recipes-devtools/dpkg/dpkg/preinst.patch b/meta/recipes-devtools/dpkg/dpkg/preinst.patch
index f9cb4089fb..0549121ef1 100644
--- a/meta/recipes-devtools/dpkg/dpkg/preinst.patch
+++ b/meta/recipes-devtools/dpkg/dpkg/preinst.patch
@@ -6,17 +6,13 @@ Upstream-Status: Inappropriate [OE Specific]
6 6
7RP 2011/12/07 7RP 2011/12/07
8 8
9Index: dpkg-1.16.8/src/script.c 9Index: dpkg-1.17.1/src/script.c
10=================================================================== 10===================================================================
11--- dpkg-1.16.8.orig/src/script.c 11--- dpkg-1.17.1.orig/src/script.c
12+++ dpkg-1.16.8/src/script.c 12+++ dpkg-1.17.1/src/script.c
13@@ -102,38 +102,10 @@ setexecute(const char *path, struct stat 13@@ -111,36 +111,9 @@ preexecscript(struct command *cmd)
14 static const char * 14 size_t instdirl = strlen(instdir);
15 preexecscript(struct command *cmd) 15
16 {
17- const char *admindir = dpkg_db_get_dir();
18- size_t instdirl = strlen(instdir);
19-
20 if (*instdir) { 16 if (*instdir) {
21- if (strncmp(admindir, instdir, instdirl) != 0) 17- if (strncmp(admindir, instdir, instdirl) != 0)
22- ohshit(_("admindir must be inside instdir for dpkg to work properly")); 18- ohshit(_("admindir must be inside instdir for dpkg to work properly"));
@@ -25,10 +21,11 @@ Index: dpkg-1.16.8/src/script.c
25- 21-
26- if (chroot(instdir)) 22- if (chroot(instdir))
27- ohshite(_("failed to chroot to `%.250s'"), instdir); 23- ohshite(_("failed to chroot to `%.250s'"), instdir);
28- if (chdir("/")) 24- }
29- ohshite(_("failed to chdir to `%.255s'"), "/"); 25- /* Switch to a known good directory to give the maintainer script
30+ setenv("D", instdir, 1); 26- * a saner environment, also needed after the chroot(). */
31 } 27- if (chdir("/"))
28- ohshite(_("failed to chdir to `%.255s'"), "/");
32- if (debug_has_flag(dbg_scripts)) { 29- if (debug_has_flag(dbg_scripts)) {
33- struct varbuf args = VARBUF_INIT; 30- struct varbuf args = VARBUF_INIT;
34- const char **argv = cmd->argv; 31- const char **argv = cmd->argv;
@@ -41,7 +38,8 @@ Index: dpkg-1.16.8/src/script.c
41- debug(dbg_scripts, "fork/exec %s (%s )", cmd->filename, 38- debug(dbg_scripts, "fork/exec %s (%s )", cmd->filename,
42- args.buf); 39- args.buf);
43- varbuf_destroy(&args); 40- varbuf_destroy(&args);
44- } 41+ setenv("D", instdir, 1);
42 }
45- if (!instdirl) 43- if (!instdirl)
46- return cmd->filename; 44- return cmd->filename;
47- 45-
@@ -50,4 +48,4 @@ Index: dpkg-1.16.8/src/script.c
50+ return cmd->filename; 48+ return cmd->filename;
51 } 49 }
52 50
53 static int 51 /**