94a151
- Configurable policy for prefered ELF (#235757)
@@ -0,0 +1,104 @@
|
|
1
|
+
--- rpm-4.4.2/lib/transaction.c.prefer32 2007-04-25 12:10:25.000000000 +0100
|
2
|
+
+++ rpm-4.4.2/lib/transaction.c 2007-04-25 12:38:32.000000000 +0100
|
3
|
+
@@ -122,6 +122,7 @@ static int handleInstInstalledFiles(cons
|
4
|
+
/*@modifies ts, fi, rpmGlobalMacroContext, fileSystem, internalState @*/
|
5
|
+
{
|
6
|
+
uint_32 tscolor = rpmtsColor(ts);
|
7
|
+
+ uint_32 prefcolor = rpmtsPrefColor(ts);
|
8
|
+
uint_32 otecolor, tecolor;
|
9
|
+
uint_32 oFColor, FColor;
|
10
|
+
const char * altNEVR = NULL;
|
11
|
+
@@ -199,11 +200,11 @@ static int handleInstInstalledFiles(cons
|
12
|
+
/* Resolve file conflicts to prefer Elf64 (if not forced). */
|
13
|
+
if (tscolor != 0 && FColor != 0 && FColor != oFColor)
|
14
|
+
{
|
15
|
+
- if (oFColor & 0x2) {
|
16
|
+
+ if (oFColor & prefcolor) {
|
17
|
+
fi->actions[fileNum] = FA_SKIPCOLOR;
|
18
|
+
rConflicts = 0;
|
19
|
+
} else
|
20
|
+
- if (FColor & 0x2) {
|
21
|
+
+ if (FColor & prefcolor) {
|
22
|
+
fi->actions[fileNum] = FA_CREATE;
|
23
|
+
rConflicts = 0;
|
24
|
+
}
|
25
|
+
@@ -458,6 +459,7 @@ static void handleOverlappedFiles(const
|
26
|
+
if (fi != NULL)
|
27
|
+
while ((i = rpmfiNext(fi)) >= 0) {
|
28
|
+
uint_32 tscolor = rpmtsColor(ts);
|
29
|
+
+ uint_32 prefcolor = rpmtsPrefColor(ts);
|
30
|
+
uint_32 oFColor, FColor;
|
31
|
+
struct fingerPrint_s * fiFps;
|
32
|
+
int otherPkgNum, otherFileNum;
|
33
|
+
@@ -570,19 +572,19 @@ assert(otherFi != NULL);
|
34
|
+
rConflicts = reportConflicts;
|
35
|
+
/* Resolve file conflicts to prefer Elf64 (if not forced) ... */
|
36
|
+
if (tscolor != 0) {
|
37
|
+
- if (FColor & 0x2) {
|
38
|
+
- /* ... last Elf64 file is installed ... */
|
39
|
+
+ if (FColor & prefcolor) {
|
40
|
+
+ /* ... last file of preferred colour is installed ... */
|
41
|
+
if (!XFA_SKIPPING(fi->actions[i])) {
|
42
|
+
/* XXX static helpers are order dependent. Ick. */
|
43
|
+
if (strcmp(fn, "/usr/sbin/libgcc_post_upgrade")
|
44
|
+
&& strcmp(fn, "/usr/sbin/glibc_post_upgrade"))
|
45
|
+
- otherFi->actions[otherFileNum] = FA_SKIP;
|
46
|
+
+ otherFi->actions[otherFileNum] = FA_SKIPCOLOR;
|
47
|
+
}
|
48
|
+
fi->actions[i] = FA_CREATE;
|
49
|
+
rConflicts = 0;
|
50
|
+
} else
|
51
|
+
- if (oFColor & 0x2) {
|
52
|
+
- /* ... first Elf64 file is installed ... */
|
53
|
+
+ if (oFColor & prefcolor) {
|
54
|
+
+ /* ... first file of preferred colour is installed ... */
|
55
|
+
if (XFA_SKIPPING(fi->actions[i]))
|
56
|
+
otherFi->actions[otherFileNum] = FA_CREATE;
|
57
|
+
fi->actions[i] = FA_SKIPCOLOR;
|
58
|
+
--- rpm-4.4.2/lib/rpmts.c.prefer32 2005-02-13 03:12:03.000000000 +0000
|
59
|
+
+++ rpm-4.4.2/lib/rpmts.c 2007-04-25 12:37:45.000000000 +0100
|
60
|
+
@@ -1475,6 +1475,11 @@ uint_32 rpmtsSetColor(rpmts ts, uint_32
|
61
|
+
return ocolor;
|
62
|
+
}
|
63
|
+
|
64
|
+
+uint_32 rpmtsPrefColor(rpmts ts)
|
65
|
+
+{
|
66
|
+
+ return (ts != NULL ? ts->prefcolor : 0);
|
67
|
+
+}
|
68
|
+
+
|
69
|
+
rpmop rpmtsOp(rpmts ts, rpmtsOpX opx)
|
70
|
+
{
|
71
|
+
rpmop op = NULL;
|
72
|
+
@@ -1554,6 +1559,7 @@ rpmts rpmtsCreate(void)
|
73
|
+
ts->delta = 5;
|
74
|
+
|
75
|
+
ts->color = rpmExpandNumeric("%{?_transaction_color}");
|
76
|
+
+ ts->prefcolor = rpmExpandNumeric("%{?_prefer_color}")?:2;
|
77
|
+
|
78
|
+
ts->numRemovedPackages = 0;
|
79
|
+
ts->allocedRemovedPackages = ts->delta;
|
80
|
+
--- rpm-4.4.2/lib/rpmts.h.prefer32 2005-01-04 16:35:05.000000000 +0000
|
81
|
+
+++ rpm-4.4.2/lib/rpmts.h 2007-04-25 12:33:39.000000000 +0100
|
82
|
+
@@ -309,6 +309,7 @@ struct rpmts_s {
|
83
|
+
int_32 tid; /*!< Transaction id. */
|
84
|
+
|
85
|
+
uint_32 color; /*!< Transaction color bits. */
|
86
|
+
+ uint_32 prefcolor; /*!< Preferred file color. */
|
87
|
+
|
88
|
+
rpmVSFlags vsflags; /*!< Signature/digest verification flags. */
|
89
|
+
|
90
|
+
@@ -983,6 +984,14 @@ uint_32 rpmtsColor(rpmts ts)
|
91
|
+
/*@*/;
|
92
|
+
|
93
|
+
/**
|
94
|
+
+ * Retrieve prefered file color
|
95
|
+
+ * @param ts transaction set
|
96
|
+
+ * @return color bits
|
97
|
+
+ */
|
98
|
+
+uint_32 rpmtsPrefColor(rpmts ts)
|
99
|
+
+ /*@*/;
|
100
|
+
+
|
101
|
+
+/**
|
102
|
+
* Set color bits of transaction set.
|
103
|
+
* @param ts transaction set
|
104
|
+
* @param color new color bits
|
@@ -17,7 +17,7 @@ Summary: The RPM package management system
|
|
17
17
|
Name: rpm
|
18
18
|
Version: 4.4.2
|
19
19
|
%{expand: %%define rpm_version %{version}}
|
20
|
-
Release:
|
20
|
+
Release: 46%{?dist}
|
21
21
|
Group: System Environment/Base
|
22
22
|
Url: http://www.rpm.org/
|
23
23
|
Source: rpm-%{rpm_version}.tar.gz
|
@@ -67,6 +67,7 @@ Patch40: rpm-4.4.2-forkfailed.patch
|
|
67
67
|
Patch41: rpm-4.4.2-cdiff.patch
|
68
68
|
Patch42: rpm-4.4.2-docflags.patch
|
69
69
|
Patch43: rpm-debugedit-incremental-fix.patch
|
70
|
+
Patch44: rpm-4.4.2-prefer-elf32.patch
|
70
71
|
License: GPL
|
71
72
|
Requires: patch > 2.5
|
72
73
|
Prereq: shadow-utils
|
@@ -212,6 +213,7 @@ shell-like rules.
|
|
212
213
|
%patch41 -p1 -b .cdiff
|
213
214
|
%patch42 -p1 -b .docflags
|
214
215
|
%patch43 -p1 -b .debugcan2
|
216
|
+
%patch44 -p1 -b .elfprefer
|
215
217
|
|
216
218
|
# rebuild configure for ipv6
|
217
219
|
autoconf
|
@@ -573,6 +575,9 @@ exit 0
|
|
573
575
|
%{__includedir}/popt.h
|
574
576
|
|
575
577
|
%changelog
|
578
|
+
* Tue May 01 2007 Paul Nasrat <pnasrat@redhat.com> - 4.4.2-46
|
579
|
+
- Configurable policy for prefered ELF (#235757)
|
580
|
+
|
576
581
|
* Mon Apr 23 2007 Paul Nasrat <pnasrat@redhat.com> - 4.4.2-45
|
577
582
|
- Fix debugedit for relative paths (#232222)
|
578
583
|
|