summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch
diff options
context:
space:
mode:
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.patch24
1 files changed, 13 insertions, 11 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 fc6d7e0d29..b71156fe12 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
@@ -24,15 +24,18 @@ Amended 2018-07-03 by Olof Johansson <olofjn@axis.com>:
24 24
25Upstream-Status: Inappropriate [oe-core specific] 25Upstream-Status: Inappropriate [oe-core specific]
26Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 26Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
27
28Rebased to 4.20.1
29Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
27--- 30---
28 lib/rpmscript.c | 11 ++++++++--- 31 lib/rpmscript.c | 9 +++++++--
29 1 file changed, 8 insertions(+), 3 deletions(-) 32 1 file changed, 7 insertions(+), 2 deletions(-)
30 33
31diff --git a/lib/rpmscript.c b/lib/rpmscript.c 34diff --git a/lib/rpmscript.c b/lib/rpmscript.c
32index 097c9055a..060fd8124 100644 35index eb14870b3..1785e8f30 100644
33--- a/lib/rpmscript.c 36--- a/lib/rpmscript.c
34+++ b/lib/rpmscript.c 37+++ b/lib/rpmscript.c
35@@ -447,8 +447,7 @@ exit: 38@@ -456,8 +456,7 @@ exit:
36 Fclose(out); /* XXX dup'd STDOUT_FILENO */ 39 Fclose(out); /* XXX dup'd STDOUT_FILENO */
37 40
38 if (fn) { 41 if (fn) {
@@ -42,18 +45,17 @@ index 097c9055a..060fd8124 100644
42 free(fn); 45 free(fn);
43 } 46 }
44 free(mline); 47 free(mline);
45@@ -482,7 +481,13 @@ rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd, 48@@ -491,7 +490,13 @@ rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd,
46 49
47 if (rc != RPMRC_FAIL) { 50 if (rc != RPMRC_FAIL) {
48 if (script_type & RPMSCRIPTLET_EXEC) { 51 if (script_type & RPMSCRIPTLET_EXEC) {
49- rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, script->nextFileFunc);
50+ if (getenv("RPM_NO_CHROOT_FOR_SCRIPTS") != NULL) { 52+ if (getenv("RPM_NO_CHROOT_FOR_SCRIPTS") != NULL) {
51+ rpmChrootOut(); 53+ rpmChrootOut();
52+ rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, script->nextFileFunc); 54 rc = runExtScript(plugins, prefixes, script, lvl, scriptFd, &args, arg1, arg2);
53+ rpmChrootIn(); 55+ rpmChrootIn();
54+ } else { 56+ } else {
55+ rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, script->nextFileFunc); 57+ rc = runExtScript(plugins, prefixes, script, lvl, scriptFd, &args, arg1, arg2);
56+ } 58+ }
57 } else { 59 } else {
58 rc = runLuaScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, script->nextFileFunc); 60 rc = runLuaScript(plugins, prefixes, script, lvl, scriptFd, &args, arg1, arg2);
59 } 61 }