diff options
Diffstat (limited to 'meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch')
-rw-r--r-- | meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch b/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch index 2a0069cafe..bd3314a90f 100644 --- a/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch +++ b/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch | |||
@@ -28,9 +28,11 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | |||
28 | lib/rpmscript.c | 11 ++++++++--- | 28 | lib/rpmscript.c | 11 ++++++++--- |
29 | 1 file changed, 8 insertions(+), 3 deletions(-) | 29 | 1 file changed, 8 insertions(+), 3 deletions(-) |
30 | 30 | ||
31 | --- a/lib/rpmscript.c | 31 | Index: git/lib/rpmscript.c |
32 | +++ b/lib/rpmscript.c | 32 | =================================================================== |
33 | @@ -17,7 +17,7 @@ | 33 | --- git.orig/lib/rpmscript.c |
34 | +++ git/lib/rpmscript.c | ||
35 | @@ -18,7 +18,7 @@ | ||
34 | #include "rpmio/rpmio_internal.h" | 36 | #include "rpmio/rpmio_internal.h" |
35 | 37 | ||
36 | #include "lib/rpmplugins.h" /* rpm plugins hooks */ | 38 | #include "lib/rpmplugins.h" /* rpm plugins hooks */ |
@@ -39,7 +41,7 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | |||
39 | #include "debug.h" | 41 | #include "debug.h" |
40 | 42 | ||
41 | struct scriptNextFileFunc_s { | 43 | struct scriptNextFileFunc_s { |
42 | @@ -391,8 +391,7 @@ exit: | 44 | @@ -427,8 +427,7 @@ exit: |
43 | Fclose(out); /* XXX dup'd STDOUT_FILENO */ | 45 | Fclose(out); /* XXX dup'd STDOUT_FILENO */ |
44 | 46 | ||
45 | if (fn) { | 47 | if (fn) { |
@@ -49,18 +51,18 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | |||
49 | free(fn); | 51 | free(fn); |
50 | } | 52 | } |
51 | free(mline); | 53 | free(mline); |
52 | @@ -426,7 +425,13 @@ rpmRC rpmScriptRun(rpmScript script, int | 54 | @@ -462,7 +461,13 @@ rpmRC rpmScriptRun(rpmScript script, int |
53 | 55 | ||
54 | if (rc != RPMRC_FAIL) { | 56 | if (rc != RPMRC_FAIL) { |
55 | if (script_type & RPMSCRIPTLET_EXEC) { | 57 | if (script_type & RPMSCRIPTLET_EXEC) { |
56 | - rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc); | 58 | - rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, script->nextFileFunc); |
57 | + if (getenv("RPM_NO_CHROOT_FOR_SCRIPTS") != NULL) { | 59 | + if (getenv("RPM_NO_CHROOT_FOR_SCRIPTS") != NULL) { |
58 | + rpmChrootOut(); | 60 | + rpmChrootOut(); |
59 | + rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc); | 61 | + rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, script->nextFileFunc); |
60 | + rpmChrootIn(); | 62 | + rpmChrootIn(); |
61 | + } else { | 63 | + } else { |
62 | + rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc); | 64 | + rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, script->nextFileFunc); |
63 | + } | 65 | + } |
64 | } else { | 66 | } else { |
65 | rc = runLuaScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc); | 67 | rc = runLuaScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, script->nextFileFunc); |
66 | } | 68 | } |