summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-06-11 13:18:53 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-12 11:10:35 +0100
commitbc4a29df84542f0ef905a2e20d8533a0ea7cb613 (patch)
treed0261f05a3ec020eb2c46dd36d22d1ee19be2a82 /meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch
parentb2381b63b94604fdc0e1a7591c854dc1df3ca8f4 (diff)
downloadpoky-bc4a29df84542f0ef905a2e20d8533a0ea7cb613.tar.gz
rpm: Upgrade RPM to 5.4.9
Beside upreving RPM, add necessary integration patches to libzypp. Also change the configuration of RPM to support PACKAGECONFIG flags. RPM is highly configurable, the default configuration is good for minimal OE-Core use. (From OE-Core rev: bf94103d4c532ffdfdcdcc6d27c9f65f7824f8f8) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch')
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch33
1 files changed, 17 insertions, 16 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch b/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch
index e4db0e4211..8a9e712acf 100644
--- a/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch
+++ b/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch
@@ -12,10 +12,11 @@ Upstream-Status: Pending
12 12
13Signed-off-by: Mark Hatle <mark.hatle@windriver.com> 13Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
14 14
15diff -ur rpm-5.4.0.orig/lib/psm.c rpm-5.4.0/lib/psm.c 15Index: rpm-5.4.9/lib/psm.c
16--- rpm-5.4.0.orig/lib/psm.c 2010-12-29 07:42:11.000000000 -0600 16===================================================================
17+++ rpm-5.4.0/lib/psm.c 2011-11-08 13:38:48.132791154 -0600 17--- rpm-5.4.9.orig/lib/psm.c
18@@ -792,6 +792,10 @@ 18+++ rpm-5.4.9/lib/psm.c
19@@ -801,6 +801,10 @@ static rpmRC runScript(rpmpsm psm, Heade
19 int xx; 20 int xx;
20 int i; 21 int i;
21 22
@@ -26,23 +27,23 @@ diff -ur rpm-5.4.0.orig/lib/psm.c rpm-5.4.0/lib/psm.c
26 if (psm->sstates != NULL && ix >= 0 && ix < RPMSCRIPT_MAX) 27 if (psm->sstates != NULL && ix >= 0 && ix < RPMSCRIPT_MAX)
27 ssp = psm->sstates + ix; 28 ssp = psm->sstates + ix;
28 if (ssp != NULL) 29 if (ssp != NULL)
29@@ -858,14 +862,29 @@ 30@@ -867,14 +871,29 @@ assert(he->p.str != NULL);
30 (F_ISSET(psm, UNORDERED) ? "a" : "")); 31 (F_ISSET(psm, UNORDERED) ? "a" : ""));
31 32
32 if (Phe->p.argv == NULL) { 33 if (Phe->p.argv == NULL) {
33- argv = alloca(5 * sizeof(*argv)); 34- argv = (const char **) alloca(5 * sizeof(*argv));
34- argv[0] = "/bin/sh"; 35- argv[0] = "/bin/sh";
35- argc = 1; 36- argc = 1;
36+ argv = alloca(7 * sizeof(*argv)); 37+ argv = (const char **) alloca(7 * sizeof(*argv));
37+ argc = 0; 38+ argc = 0;
38+ } else { 39+ } else {
39+ argv = alloca((Phe->c + 6) * sizeof(*argv)); 40+ argv = (const char **) alloca((Phe->c + 6) * sizeof(*argv));
40+ argc = 0; 41+ argc = 0;
41+ } 42+ }
42+ 43+
43+#ifdef RPM_VENDOR_POKY 44+#ifdef RPM_VENDOR_POKY
44+ if (scriptletWrapper && *scriptletWrapper) { 45+ if (scriptletWrapper && *scriptletWrapper) {
45+ argv[argc++] = scriptletWrapper; 46+ argv[argc++] = scriptletWrapper;
46+ argv[argc] = rpmtsRootDir(ts); 47+ argv[argc] = rpmtsRootDir(ts);
47+ if (!argv[argc] || !*argv[argc]) 48+ if (!argv[argc] || !*argv[argc])
48+ argv[argc] = "/"; 49+ argv[argc] = "/";
@@ -51,10 +52,10 @@ diff -ur rpm-5.4.0.orig/lib/psm.c rpm-5.4.0/lib/psm.c
51+#endif 52+#endif
52+ 53+
53+ if (Phe->p.argv == NULL) { 54+ if (Phe->p.argv == NULL) {
54+ argv[argc++] = "/bin/sh"; 55+ argv[argc++] = "/bin/sh";
55 ldconfig_done = 0; 56 ldconfig_done = 0;
56 } else { 57 } else {
57- argv = alloca((Phe->c + 4) * sizeof(*argv)); 58- argv = (const char **) alloca((Phe->c + 4) * sizeof(*argv));
58- memcpy(argv, Phe->p.argv, Phe->c * sizeof(*argv)); 59- memcpy(argv, Phe->p.argv, Phe->c * sizeof(*argv));
59- argc = Phe->c; 60- argc = Phe->c;
60+ memcpy((argv + argc), Phe->p.argv, Phe->c * sizeof(*argv)); 61+ memcpy((argv + argc), Phe->p.argv, Phe->c * sizeof(*argv));
@@ -62,7 +63,7 @@ diff -ur rpm-5.4.0.orig/lib/psm.c rpm-5.4.0/lib/psm.c
62 ldconfig_done = (ldconfig_path && !strcmp(argv[0], ldconfig_path) 63 ldconfig_done = (ldconfig_path && !strcmp(argv[0], ldconfig_path)
63 ? 1 : 0); 64 ? 1 : 0);
64 } 65 }
65@@ -916,7 +935,12 @@ 66@@ -925,7 +944,12 @@ assert(he->p.str != NULL);
66 goto exit; 67 goto exit;
67 68
68 if (rpmIsDebug() && 69 if (rpmIsDebug() &&
@@ -76,7 +77,7 @@ diff -ur rpm-5.4.0.orig/lib/psm.c rpm-5.4.0/lib/psm.c
76 { 77 {
77 static const char set_x[] = "set -x\n"; 78 static const char set_x[] = "set -x\n";
78 nw = Fwrite(set_x, sizeof(set_x[0]), sizeof(set_x)-1, fd); 79 nw = Fwrite(set_x, sizeof(set_x[0]), sizeof(set_x)-1, fd);
79@@ -1051,12 +1075,22 @@ 80@@ -1060,12 +1084,22 @@ assert(he->p.str != NULL);
80 81
81 { const char * rootDir = rpmtsRootDir(ts); 82 { const char * rootDir = rpmtsRootDir(ts);
82 if (!rpmtsChrootDone(ts) && rootDir != NULL && 83 if (!rpmtsChrootDone(ts) && rootDir != NULL &&
@@ -99,7 +100,7 @@ diff -ur rpm-5.4.0.orig/lib/psm.c rpm-5.4.0/lib/psm.c
99 xx = Chdir("/"); 100 xx = Chdir("/");
100 rpmlog(RPMLOG_DEBUG, D_("%s: %s(%s)\texecv(%s) pid %d\n"), 101 rpmlog(RPMLOG_DEBUG, D_("%s: %s(%s)\texecv(%s) pid %d\n"),
101 psm->stepName, sln, NVRA, 102 psm->stepName, sln, NVRA,
102@@ -2961,6 +2995,13 @@ 103@@ -2977,6 +3011,13 @@ assert(psm->te != NULL);
103 case PSM_SCRIPT: /* Run current package scriptlets. */ 104 case PSM_SCRIPT: /* Run current package scriptlets. */
104 /* XXX running %verifyscript/%sanitycheck doesn't have psm->te */ 105 /* XXX running %verifyscript/%sanitycheck doesn't have psm->te */
105 { rpmtxn _parent = (psm && psm->te ? psm->te->txn : NULL); 106 { rpmtxn _parent = (psm && psm->te ? psm->te->txn : NULL);
@@ -113,7 +114,7 @@ diff -ur rpm-5.4.0.orig/lib/psm.c rpm-5.4.0/lib/psm.c
113 xx = rpmtxnBegin(rpmtsGetRdb(ts), _parent, NULL); 114 xx = rpmtxnBegin(rpmtsGetRdb(ts), _parent, NULL);
114 rc = runInstScript(psm); 115 rc = runInstScript(psm);
115 if (rc) 116 if (rc)
116@@ -2968,11 +3009,24 @@ 117@@ -2984,11 +3025,24 @@ assert(psm->te != NULL);
117 else 118 else
118 xx = rpmtxnCommit(rpmtsGetRdb(ts)->db_txn); 119 xx = rpmtxnCommit(rpmtsGetRdb(ts)->db_txn);
119 rpmtsGetRdb(ts)->db_txn = NULL; 120 rpmtsGetRdb(ts)->db_txn = NULL;
@@ -138,7 +139,7 @@ diff -ur rpm-5.4.0.orig/lib/psm.c rpm-5.4.0/lib/psm.c
138 break; 139 break;
139 case PSM_IMMED_TRIGGERS: 140 case PSM_IMMED_TRIGGERS:
140 /* Run triggers in this package other package(s) set off. */ 141 /* Run triggers in this package other package(s) set off. */
141@@ -2982,7 +3036,18 @@ 142@@ -2998,7 +3052,18 @@ assert(psm->te != NULL);
142 F_SET(psm, GOTTRIGGERS); 143 F_SET(psm, GOTTRIGGERS);
143 } 144 }
144 if (psm->triggers != NULL) 145 if (psm->triggers != NULL)