diff options
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.patch | 26 |
1 files changed, 13 insertions, 13 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 index 9ca7262eb9..75ae848264 100644 --- 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 | |||
@@ -12,14 +12,14 @@ ALIMON 2016/05/26 | |||
12 | ALIMON 2017/02/21 | 12 | ALIMON 2017/02/21 |
13 | KKang 2019/02/20 | 13 | KKang 2019/02/20 |
14 | --- | 14 | --- |
15 | src/script.c | 53 +++------------------------------------------------- | 15 | src/main/script.c | 54 +++-------------------------------------------- |
16 | 1 file changed, 3 insertions(+), 50 deletions(-) | 16 | 1 file changed, 3 insertions(+), 51 deletions(-) |
17 | 17 | ||
18 | diff --git a/src/script.c b/src/script.c | 18 | diff --git a/src/main/script.c b/src/main/script.c |
19 | index abe65b6f7..621ff9b27 100644 | 19 | index abe65b6..0edb8f1 100644 |
20 | --- a/src/script.c | 20 | --- a/src/main/script.c |
21 | +++ b/src/script.c | 21 | +++ b/src/main/script.c |
22 | @@ -96,58 +96,11 @@ setexecute(const char *path, struct stat *stab) | 22 | @@ -96,58 +96,10 @@ setexecute(const char *path, struct stat *stab) |
23 | static const char * | 23 | static const char * |
24 | maintscript_pre_exec(struct command *cmd) | 24 | maintscript_pre_exec(struct command *cmd) |
25 | { | 25 | { |
@@ -49,9 +49,7 @@ index abe65b6f7..621ff9b27 100644 | |||
49 | - "using --force-script-chrootless?")); | 49 | - "using --force-script-chrootless?")); |
50 | - else if (rc) | 50 | - else if (rc) |
51 | - ohshite(_("failed to chroot to '%.250s'"), instdir); | 51 | - ohshite(_("failed to chroot to '%.250s'"), instdir); |
52 | + if (*instdir) { | 52 | - } |
53 | + setenv("D", instdir, 1); | ||
54 | } | ||
55 | - /* Switch to a known good directory to give the maintainer script | 53 | - /* Switch to a known good directory to give the maintainer script |
56 | - * a saner environment, also needed after the chroot(). */ | 54 | - * a saner environment, also needed after the chroot(). */ |
57 | - if (chdir(changedir)) | 55 | - if (chdir(changedir)) |
@@ -68,19 +66,21 @@ index abe65b6f7..621ff9b27 100644 | |||
68 | - debug(dbg_scripts, "fork/exec %s (%s )", cmd->filename, | 66 | - debug(dbg_scripts, "fork/exec %s (%s )", cmd->filename, |
69 | - args.buf); | 67 | - args.buf); |
70 | - varbuf_destroy(&args); | 68 | - varbuf_destroy(&args); |
71 | - } | 69 | + if (*instdir) { |
70 | + setenv("D", instdir, 1); | ||
71 | } | ||
72 | - if (instdirlen == 0 || in_force(FORCE_SCRIPT_CHROOTLESS)) | 72 | - if (instdirlen == 0 || in_force(FORCE_SCRIPT_CHROOTLESS)) |
73 | - return cmd->filename; | 73 | - return cmd->filename; |
74 | - | 74 | - |
75 | - if (strlen(cmd->filename) < instdirlen) | 75 | - if (strlen(cmd->filename) < instdirlen) |
76 | - internerr("maintscript name '%s' length < instdir length %zd", | 76 | - internerr("maintscript name '%s' length < instdir length %zd", |
77 | - cmd->filename, instdirlen); | 77 | - cmd->filename, instdirlen); |
78 | 78 | - | |
79 | - return cmd->filename + instdirlen; | 79 | - return cmd->filename + instdirlen; |
80 | + return cmd->filename; | 80 | + return cmd->filename; |
81 | } | 81 | } |
82 | 82 | ||
83 | /** | 83 | /** |
84 | -- | 84 | -- |
85 | 2.17.1 | 85 | 2.25.1 |
86 | 86 | ||