summaryrefslogtreecommitdiff
path: root/meta-extras/packages/yum/files/hacks.patch
blob: 61f477172ca7b0dd5644ccc398bb203193eb83f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
---
 rpmUtils/arch.py        |    3 +++
 rpmUtils/transaction.py |    1 +
 yum/constants.py        |    2 +-
 yum/depsolve.py         |    2 ++
 4 files changed, 7 insertions(+), 1 deletion(-)

Index: yum-3.2.18/rpmUtils/arch.py
===================================================================
--- yum-3.2.18.orig/rpmUtils/arch.py	2008-06-17 14:05:42.000000000 +0100
+++ yum-3.2.18/rpmUtils/arch.py	2008-10-02 22:09:19.000000000 +0100
@@ -275,6 +275,12 @@
     return arch
         
 def getCanonArch(skipRpmPlatform = 0):
+    import os
+    if 'YUM_ARCH_FORCE' in os.environ:
+        return os.environ['YUM_ARCH_FORCE']
+
+    sys.exit(1)
+
     if not skipRpmPlatform and os.access("/etc/rpm/platform", os.R_OK):
         try:
             f = open("/etc/rpm/platform", "r")
@@ -331,6 +338,12 @@
        base arch is the arch before noarch in the arches dict if myarch is not
        a key in the multilibArches."""
 
+    import os
+    if 'YUM_ARCH_FORCE' in os.environ:
+        return os.environ['YUM_ARCH_FORCE']
+
+    sys.exit(1)
+
     if not myarch:
         myarch = canonArch
 
Index: yum-3.2.18/rpmUtils/transaction.py
===================================================================
--- yum-3.2.18.orig/rpmUtils/transaction.py	2008-06-17 14:05:42.000000000 +0100
+++ yum-3.2.18/rpmUtils/transaction.py	2008-10-02 17:09:57.000000000 +0100
@@ -43,6 +43,7 @@
                          'clean']
         self.tsflags = []
         self.open = True
+        self.ts.setProbFilter(rpm.RPMPROB_FILTER_IGNOREOS | rpm.RPMPROB_FILTER_IGNOREARCH)
 
     def __del__(self):
         # Automatically close the rpm transaction when the reference is lost
Index: yum-3.2.18/yum/constants.py
===================================================================
--- yum-3.2.18.orig/yum/constants.py	2008-07-21 16:56:54.000000000 +0100
+++ yum-3.2.18/yum/constants.py	2008-10-02 17:09:57.000000000 +0100
@@ -17,7 +17,7 @@
 """
 
 #Constants
-YUM_PID_FILE = '/var/run/yum.pid'
+YUM_PID_FILE = '/var/run2/yum.pid'
 
 #transaction set states
 TS_UPDATE = 10
Index: yum-3.2.18/yum/depsolve.py
===================================================================
--- yum-3.2.18.orig/yum/depsolve.py	2008-08-06 17:05:16.000000000 +0100
+++ yum-3.2.18/yum/depsolve.py	2008-10-02 17:09:57.000000000 +0100
@@ -141,9 +141,14 @@
             else:
                 self.logger.critical(_('Invalid tsflag in config file: %s'), flag)
 
+        self._ts.addTsFlag(rpm.RPMTRANS_FLAG_NOPOST)
+        self._ts.addTsFlag(rpm.RPMTRANS_FLAG_NOTRIGGERS)
+
         probfilter = 0
         for flag in self.tsInfo.probFilterFlags:
             probfilter |= flag
+        probfilter |= rpm.RPMPROB_FILTER_IGNOREOS
+        probfilter |= rpm.RPMPROB_FILTER_IGNOREARCH
         self._ts.setProbFilter(probfilter)
 
     def whatProvides(self, name, flags, version):