diff options
author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2016-12-30 18:38:11 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-14 14:42:16 +0000 |
commit | 27d56eeebd8197e359aae0a7ccac74cb55ff794d (patch) | |
tree | b3cade20da193ee39424a6e410ddfcdd62bc38c8 /meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch | |
parent | 381c8e634c22321f9c27fae5b6f35e4204840719 (diff) | |
download | poky-27d56eeebd8197e359aae0a7ccac74cb55ff794d.tar.gz |
rpm: add a 4.x recipe
The dnf stack is written and tested against rpm 4.x. So if we want to use dnf for packaging,
we should also use rpm 4 - there's simply too much work involved in making rpm 5 work with it due
to significant API differences, and supporting that going forward.
(From OE-Core rev: 2358e786ec8d1199d90e181eb5d8d00816f669b4)
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/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 | 37 |
1 files changed, 37 insertions, 0 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 new file mode 100644 index 0000000000..2be3cb5af3 --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From a6f269f879221f2777169c5f7291322afe6b661b Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Tue, 17 Jan 2017 14:07:17 +0200 | ||
4 | Subject: [PATCH] When cross-installing, execute package scriptlets without | ||
5 | chrooting into destination rootfs | ||
6 | |||
7 | This is triggered only when RPM_NO_CHROOT_FOR_SCRIPTS environment variable is defined. | ||
8 | Otherwise they will trigger an explosion of failures, obviously. | ||
9 | |||
10 | Upstream-Status: Inappropriate [oe-core specific] | ||
11 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
12 | --- | ||
13 | lib/rpmscript.c | 8 +++++++- | ||
14 | 1 file changed, 7 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/lib/rpmscript.c b/lib/rpmscript.c | ||
17 | index 98d3f420d..b95b5d606 100644 | ||
18 | --- a/lib/rpmscript.c | ||
19 | +++ b/lib/rpmscript.c | ||
20 | @@ -467,7 +467,13 @@ rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd, | ||
21 | |||
22 | if (rc != RPMRC_FAIL) { | ||
23 | if (script_type & RPMSCRIPTLET_EXEC) { | ||
24 | - rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc); | ||
25 | + if (getenv("RPM_NO_CHROOT_FOR_SCRIPTS") != NULL) { | ||
26 | + rpmChrootOut(); | ||
27 | + rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc); | ||
28 | + rpmChrootIn(); | ||
29 | + } else { | ||
30 | + rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc); | ||
31 | + } | ||
32 | } else { | ||
33 | rc = runLuaScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc); | ||
34 | } | ||
35 | -- | ||
36 | 2.11.0 | ||
37 | |||