Compare commits
7 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
320eb08f02 | ||
|
|
8f197b29bb | ||
|
|
def97a88e7 | ||
|
|
9fd43cbd36 | ||
|
|
3c03ef1d70 | ||
|
|
47a1d95d38 | ||
|
|
370664a622 |
8 changed files with 736 additions and 1 deletions
98
BZ-701744-collapse-libc.patch
Normal file
98
BZ-701744-collapse-libc.patch
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
commit 043e869b08126c1b24e392f809c9f6871344c60d
|
||||
Author: Seth Vidal <skvidal@fedoraproject.org>
|
||||
Date: Wed May 4 09:43:52 2011 -0400
|
||||
|
||||
make sure we use rpm ver cmp for the sort of the glibc requires
|
||||
|
||||
when we're doing collapse_libc_requires.
|
||||
ultimately what's causing: https://bugzilla.redhat.com/show_bug.cgi?id=701744
|
||||
|
||||
diff --git a/rpmUtils/miscutils.py b/rpmUtils/miscutils.py
|
||||
index cdb1cb6..aea4550 100644
|
||||
--- a/rpmUtils/miscutils.py
|
||||
+++ b/rpmUtils/miscutils.py
|
||||
@@ -54,6 +54,10 @@ def compareEVR((e1, v1, r1), (e2, v2, r2)):
|
||||
#print '%s, %s, %s vs %s, %s, %s = %s' % (e1, v1, r1, e2, v2, r2, rc)
|
||||
return rc
|
||||
|
||||
+def compareVerOnly(v1, v2):
|
||||
+ """compare version strings only using rpm vercmp"""
|
||||
+ return compareEVR(('', v1, ''), ('', v2, ''))
|
||||
+
|
||||
def checkSig(ts, package):
|
||||
"""Takes a transaction set and a package, check it's sigs,
|
||||
return 0 if they are all fine
|
||||
diff --git a/yum/packages.py b/yum/packages.py
|
||||
index 264aa9a..e745a1a 100644
|
||||
--- a/yum/packages.py
|
||||
+++ b/yum/packages.py
|
||||
@@ -31,11 +31,12 @@ import warnings
|
||||
from subprocess import Popen, PIPE
|
||||
from rpmUtils import RpmUtilsError
|
||||
import rpmUtils.miscutils
|
||||
-from rpmUtils.miscutils import flagToString, stringToVersion
|
||||
+from rpmUtils.miscutils import flagToString, stringToVersion, compareVerOnly
|
||||
import Errors
|
||||
import errno
|
||||
import struct
|
||||
from constants import *
|
||||
+from operator import itemgetter
|
||||
|
||||
import urlparse
|
||||
urlparse.uses_fragment.append("media")
|
||||
@@ -1139,7 +1140,11 @@ class YumAvailablePackage(PackageObject, RpmBase):
|
||||
if hasattr(self, '_collapse_libc_requires') and self._collapse_libc_requires:
|
||||
libc_requires = filter(lambda x: x[0].startswith('libc.so.6'), mylist)
|
||||
if libc_requires:
|
||||
- best = sorted(libc_requires)[-1]
|
||||
+ print libc_requires
|
||||
+ rest = sorted(libc_requires, cmp=compareVerOnly, key=itemgetter(0))
|
||||
+ best = rest.pop()
|
||||
+ if best[0].startswith('libc.so.6()'):
|
||||
+ best = rest.pop()
|
||||
newlist = []
|
||||
for i in mylist:
|
||||
if i[0].startswith('libc.so.6') and i != best:
|
||||
commit 6bf7ca012bfb3d674df3f196f2f9e3eaabef0c91
|
||||
Author: Seth Vidal <skvidal@fedoraproject.org>
|
||||
Date: Wed May 4 10:21:55 2011 -0400
|
||||
|
||||
remove a debug print
|
||||
add an explanation of why we skip libc.so.6()
|
||||
|
||||
diff --git a/yum/packages.py b/yum/packages.py
|
||||
index e745a1a..95c50a1 100644
|
||||
--- a/yum/packages.py
|
||||
+++ b/yum/packages.py
|
||||
@@ -1140,10 +1140,9 @@ class YumAvailablePackage(PackageObject, RpmBase):
|
||||
if hasattr(self, '_collapse_libc_requires') and self._collapse_libc_requires:
|
||||
libc_requires = filter(lambda x: x[0].startswith('libc.so.6'), mylist)
|
||||
if libc_requires:
|
||||
- print libc_requires
|
||||
rest = sorted(libc_requires, cmp=compareVerOnly, key=itemgetter(0))
|
||||
best = rest.pop()
|
||||
- if best[0].startswith('libc.so.6()'):
|
||||
+ if best[0].startswith('libc.so.6()'): # rpmvercmp will sort this one as 'highest' so we need to remove it from the list
|
||||
best = rest.pop()
|
||||
newlist = []
|
||||
for i in mylist:
|
||||
commit 5f99d07ffc01a7d5f39c62153efd6f48691c911d
|
||||
Author: Seth Vidal <skvidal@fedoraproject.org>
|
||||
Date: Tue Jun 21 14:04:36 2011 -0400
|
||||
|
||||
add check to make sure rest in the libc collapsing is not a single item
|
||||
list.
|
||||
|
||||
diff --git a/yum/packages.py b/yum/packages.py
|
||||
index d8043f9..5ef9951 100644
|
||||
--- a/yum/packages.py
|
||||
+++ b/yum/packages.py
|
||||
@@ -1186,7 +1186,7 @@ class YumAvailablePackage(PackageObject, RpmBase):
|
||||
if libc_requires:
|
||||
rest = sorted(libc_requires, cmp=compareVerOnly, key=itemgetter(0))
|
||||
best = rest.pop()
|
||||
- if best[0].startswith('libc.so.6()'): # rpmvercmp will sort this one as 'highest' so we need to remove it from the list
|
||||
+ if len(rest) > 0 and best[0].startswith('libc.so.6()'): # rpmvercmp will sort this one as 'highest' so we need to remove it from the list
|
||||
best = rest.pop()
|
||||
newlist = []
|
||||
for i in mylist:
|
||||
18
BZ-720088-progress-ctrl-m-fix.patch
Normal file
18
BZ-720088-progress-ctrl-m-fix.patch
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
commit fce611847370974d131ec50a4eb689ae462c20c0
|
||||
Author: Zdeněk Pavlas <zpavlas@redhat.com>
|
||||
Date: Mon Jul 11 10:33:48 2011 +0200
|
||||
|
||||
Do not output '\r' unless to a tty. BZ 720088
|
||||
|
||||
diff --git a/output.py b/output.py
|
||||
index b6aa277..94cbc64 100755
|
||||
--- a/output.py
|
||||
+++ b/output.py
|
||||
@@ -2366,6 +2366,7 @@ class YumCliRPMCallBack(RPMBaseCallback):
|
||||
|
||||
if self.output and (sys.stdout.isatty() or te_current == te_total):
|
||||
(fmt, wid1, wid2) = self._makefmt(percent, ts_current, ts_total,
|
||||
+ progress=sys.stdout.isatty(),
|
||||
pkgname=pkgname, wid1=wid1)
|
||||
msg = fmt % (utf8_width_fill(process, wid1, wid1),
|
||||
utf8_width_fill(pkgname, wid2, wid2))
|
||||
19
arm-basearch.patch
Normal file
19
arm-basearch.patch
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
commit 4d587cf37c8976e6f1b2f3b33b181e52190e8eb7
|
||||
Author: Dennis Gilmore <dennis@ausil.us>
|
||||
Date: Thu May 26 15:36:32 2011 -0500
|
||||
|
||||
we need to set the basearch on arm hardware to arm.
|
||||
|
||||
diff --git a/rpmUtils/arch.py b/rpmUtils/arch.py
|
||||
index 72cba60..6082005 100644
|
||||
--- a/rpmUtils/arch.py
|
||||
+++ b/rpmUtils/arch.py
|
||||
@@ -359,6 +359,8 @@ def getBaseArch(myarch=None):
|
||||
return "sparc"
|
||||
elif myarch.startswith("ppc64"):
|
||||
return "ppc"
|
||||
+ elif myarch.startswith("arm"):
|
||||
+ return "arm"
|
||||
|
||||
if isMultiLibArch(arch=myarch):
|
||||
if myarch in multilibArches:
|
||||
24
pulp-repostorage-fix.patch
Normal file
24
pulp-repostorage-fix.patch
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
commit 3d7c28d4ec579b97e30b75364d4662ec360d70ca
|
||||
Author: James Antill <james@and.org>
|
||||
Date: Thu Jun 2 10:28:50 2011 -0400
|
||||
|
||||
Fix for pulp directly using RepoStorage() without a YumBase().
|
||||
|
||||
diff --git a/yum/repos.py b/yum/repos.py
|
||||
index 4ea4961..3793bad 100644
|
||||
--- a/yum/repos.py
|
||||
+++ b/yum/repos.py
|
||||
@@ -110,7 +110,12 @@ class RepoStorage:
|
||||
repoobj.quick_enable_disable = self.quick_enable_disable
|
||||
else:
|
||||
self._cache_enabled_repos = None
|
||||
- repoobj._override_sigchecks = self.ayum._override_sigchecks
|
||||
+ # At least pulp reuses RepoStorage but doesn't have a "real" YumBase()
|
||||
+ # so we can't guarantee new YumBase() attrs. exist.
|
||||
+ if not hasattr(self.ayum, '_override_sigchecks'):
|
||||
+ repoobj._override_sigchecks = False
|
||||
+ else:
|
||||
+ repoobj._override_sigchecks = self.ayum._override_sigchecks
|
||||
|
||||
def delete(self, repoid):
|
||||
if repoid in self.repos:
|
||||
262
skip-broken-rel-eng.patch
Normal file
262
skip-broken-rel-eng.patch
Normal file
|
|
@ -0,0 +1,262 @@
|
|||
commit eeadab5beb419c6e884f30c04fda58ed1d05b538
|
||||
Author: Tim Lauridsen <timlau@fedoraproject.org>
|
||||
Date: Sat Mar 5 13:55:09 2011 +0100
|
||||
|
||||
Add a unit test to make skip-broken go into endless loop when an installed
|
||||
package conflict with an update.
|
||||
Fix the cause by in depsolve by putting the conflicting po into the problem
|
||||
tuple, so skip-broken knows what to remove from the transaction.
|
||||
Also show the full package in the conflict message and not just the name.
|
||||
|
||||
diff --git a/test/skipbroken-tests.py b/test/skipbroken-tests.py
|
||||
index 31482bc..36a4a6d 100644
|
||||
--- a/test/skipbroken-tests.py
|
||||
+++ b/test/skipbroken-tests.py
|
||||
@@ -1,8 +1,11 @@
|
||||
import unittest
|
||||
import logging
|
||||
import sys
|
||||
+import re
|
||||
from testbase import *
|
||||
|
||||
+REGEX_PKG = re.compile(r"(\d*):?(.*)-(.*)-(.*)\.(.*)$")
|
||||
+
|
||||
class SkipBrokenTests(DepsolveTests):
|
||||
''' Test cases to test skip-broken'''
|
||||
|
||||
@@ -20,6 +23,36 @@ class SkipBrokenTests(DepsolveTests):
|
||||
po = FakePackage(name, version, release, epoch, arch, repo=self.repo)
|
||||
self.rpmdb.addPackage(po)
|
||||
return po
|
||||
+
|
||||
+ def _pkgstr_to_nevra(self, pkg_str):
|
||||
+ '''
|
||||
+ Get a nevra from from a epoch:name-version-release.arch string
|
||||
+ @param pkg_str: package string
|
||||
+ '''
|
||||
+ res = REGEX_PKG.search(pkg_str)
|
||||
+ if res:
|
||||
+ (e,n,v,r,a) = res.groups()
|
||||
+ if e == "":
|
||||
+ e = "0"
|
||||
+ return (n,e,v,r,a)
|
||||
+ else:
|
||||
+ raise AttributeError("Illegal package string : %s" % pkg_str)
|
||||
+
|
||||
+ def repoString(self, pkg_str):
|
||||
+ '''
|
||||
+ Add an available package from a epoch:name-version-release.arch string
|
||||
+ '''
|
||||
+ (n,e,v,r,a) = self._pkgstr_to_nevra(pkg_str)
|
||||
+ return self.repoPackage(n,v,r,e,a)
|
||||
+
|
||||
+
|
||||
+ def instString(self, pkg_str):
|
||||
+ '''
|
||||
+ Add an installed package from a epoch:name-version-release.arch string
|
||||
+ '''
|
||||
+ (n,e,v,r,a) = self._pkgstr_to_nevra(pkg_str)
|
||||
+ return self.instPackage(n,v,r,e,a)
|
||||
+
|
||||
|
||||
def testMissingReqNoSkip(self):
|
||||
''' install fails, because of missing req.
|
||||
@@ -671,6 +704,35 @@ class SkipBrokenTests(DepsolveTests):
|
||||
# uncomment this line and the test will fail and you can see the output
|
||||
# self.assertResult([i1])
|
||||
|
||||
+ def test_conflict_looping(self):
|
||||
+ '''
|
||||
+ Skip-broken is looping
|
||||
+ https://bugzilla.redhat.com/show_bug.cgi?id=681806
|
||||
+ '''
|
||||
+ members = [] # the result after the transaction
|
||||
+ # Installed package conflicts with u1
|
||||
+ i0 = self.instString('kde-l10n-4.6.0-3.fc15.1.noarch')
|
||||
+ i0.addConflicts('kdepim', 'GT', ('6', '4.5.9', '0'))
|
||||
+ members.append(i0)
|
||||
+ i1 = self.instString('6:kdepim-4.5.94.1-1.fc14.x86_64')
|
||||
+ u1 = self.repoString('7:kdepim-4.4.10-1.fc15.x86_64')
|
||||
+ self.tsInfo.addUpdate(u1, oldpo=i1)
|
||||
+ # u1 should be removed, because of the conflict
|
||||
+ members.append(i1)
|
||||
+ i2 = self.instString('6:kdepim-libs-4.5.94.1-1.fc14.x86_64')
|
||||
+ u2 = self.repoString('7:kdepim-libs-4.4.10-1.fc15.x86_64')
|
||||
+ self.tsInfo.addUpdate(u2, oldpo=i2)
|
||||
+ members.append(u2)
|
||||
+ i3 = self.instString('kdepim-runtime-libs-4.5.94.1-2.fc14.x86_64')
|
||||
+ u3 = self.repoString('1:kdepim-runtime-libs-4.4.10-2.fc15.x86_64')
|
||||
+ self.tsInfo.addUpdate(u3, oldpo=i3)
|
||||
+ members.append(u3)
|
||||
+ i4 = self.instString('kdepim-runtime-4.5.94.1-2.fc14.x86_64')
|
||||
+ u4 = self.repoString('1:kdepim-runtime-4.4.10-2.fc15.x86_64')
|
||||
+ self.tsInfo.addUpdate(u4, oldpo=i4)
|
||||
+ members.append(u4)
|
||||
+ self.assertEquals('ok', *self.resolveCode(skip=True))
|
||||
+ self.assertResult(members)
|
||||
|
||||
|
||||
def resolveCode(self,skip = False):
|
||||
diff --git a/yum/depsolve.py b/yum/depsolve.py
|
||||
index 8f18ccc..388811d 100644
|
||||
--- a/yum/depsolve.py
|
||||
+++ b/yum/depsolve.py
|
||||
@@ -680,11 +680,12 @@ class Depsolve(object):
|
||||
if len(self.tsInfo) != length and txmbrs:
|
||||
return CheckDeps, errormsgs
|
||||
|
||||
- msg = '%s conflicts with %s' % (name, conflicting_po.name)
|
||||
+ msg = '%s conflicts with %s' % (name, str(conflicting_po))
|
||||
errormsgs.append(msg)
|
||||
self.verbose_logger.log(logginglevels.DEBUG_1, msg)
|
||||
CheckDeps = False
|
||||
- self.po_with_problems.add((po,None,errormsgs[-1]))
|
||||
+ # report the conflicting po, so skip-broken can remove it
|
||||
+ self.po_with_problems.add((po,conflicting_po,errormsgs[-1]))
|
||||
return CheckDeps, errormsgs
|
||||
|
||||
def _undoDepInstalls(self):
|
||||
commit e07978f754d4268ce7637af036fc0bde9f16c0b4
|
||||
Author: Tim Lauridsen <timlau@fedoraproject.org>
|
||||
Date: Thu Mar 31 10:20:58 2011 +0200
|
||||
|
||||
Fix bugs in the skip-broken code, this should fix some of the weird cases where skip-broken fails today
|
||||
|
||||
diff --git a/test/skipbroken-tests.py b/test/skipbroken-tests.py
|
||||
index 36a4a6d..812785a 100644
|
||||
--- a/test/skipbroken-tests.py
|
||||
+++ b/test/skipbroken-tests.py
|
||||
@@ -733,6 +733,82 @@ class SkipBrokenTests(DepsolveTests):
|
||||
members.append(u4)
|
||||
self.assertEquals('ok', *self.resolveCode(skip=True))
|
||||
self.assertResult(members)
|
||||
+
|
||||
+ def test_skipbroken_001(self):
|
||||
+ '''
|
||||
+ this will pass
|
||||
+ https://bugzilla.redhat.com/show_bug.cgi?id=656057
|
||||
+ '''
|
||||
+ members = []
|
||||
+ # Installed package conflicts with ux1
|
||||
+ ix0 = self.instString('1:libguestfs-1.6.0-1.fc14.1.i686')
|
||||
+ ix0.addRequires('/usr/lib/.libssl.so.1.0.0a.hmac')
|
||||
+ members.append(ix0)
|
||||
+ ix1 = self.instString('openssl-1.0.0a-2.fc14.i686')
|
||||
+ ix1.addFile("/usr/lib/.libssl.so.1.0.0a.hmac")
|
||||
+ ux1 = self.repoString('openssl-1.0.0b-1.fc14.i686')
|
||||
+ ux1.addFile("/usr/lib/.libssl.so.1.0.0b.hmac")
|
||||
+ self.tsInfo.addUpdate(ux1, oldpo=ix1)
|
||||
+ members.append(ix1)
|
||||
+ self.assertEquals('empty', *self.resolveCode(skip=True))
|
||||
+ self.assertResult(members)
|
||||
+
|
||||
+
|
||||
+ def test_skipbroken_002(self):
|
||||
+ '''
|
||||
+ this will pass
|
||||
+ https://bugzilla.redhat.com/show_bug.cgi?id=656057
|
||||
+ '''
|
||||
+ members = []
|
||||
+ # Installed package conflicts with ux1
|
||||
+ ix0 = self.instString('1:libguestfs-1.6.0-1.fc14.1.i686')
|
||||
+ ix0.addRequires('/usr/lib/.libssl.so.1.0.0a.hmac')
|
||||
+ members.append(ix0)
|
||||
+ ix1 = self.instString('openssl-1.0.0a-2.fc14.i686')
|
||||
+ ix1.addFile("/usr/lib/.libssl.so.1.0.0a.hmac")
|
||||
+ ux1 = self.repoString('openssl-1.0.0b-1.fc14.i686')
|
||||
+ ux1.addFile("/usr/lib/.libssl.so.1.0.0b.hmac")
|
||||
+ self.tsInfo.addUpdate(ux1, oldpo=ix1)
|
||||
+ members.append(ix1)
|
||||
+ # this is just junk to make the transaction big
|
||||
+ i1 = self.instString('afoobar-0.4.12-2.fc12.noarch')
|
||||
+ u1 = self.repoString('afoobar-0.4.14-1.fc14.noarch')
|
||||
+ self.tsInfo.addUpdate(u1, oldpo=i1)
|
||||
+ members.append(u1)
|
||||
+ self.assertEquals('ok', *self.resolveCode(skip=True))
|
||||
+ self.assertResult(members)
|
||||
+
|
||||
+ def test_skipbroken_003(self):
|
||||
+ '''
|
||||
+ this will fail, because of a bug in the skip-broken code.
|
||||
+ it will remove the wrong package (zfoobar) instead of openssl.
|
||||
+ the problem is that self._working_po is not set with the right value
|
||||
+ when checking file requires for installed packages after the transaction
|
||||
+ if resolved. (_resolveRequires)
|
||||
+ if fails because self._working_po contains the last package processed in the transaction
|
||||
+ zfoobar, so it will be removed.
|
||||
+ https://bugzilla.redhat.com/show_bug.cgi?id=656057
|
||||
+
|
||||
+ This should not fail anymore, after the the self._working_po is reset in depsolver
|
||||
+ '''
|
||||
+ members = []
|
||||
+ # Installed package conflicts with ux1
|
||||
+ ix0 = self.instString('1:libguestfs-1.6.0-1.fc14.1.i686')
|
||||
+ ix0.addRequires('/usr/lib/.libssl.so.1.0.0a.hmac')
|
||||
+ members.append(ix0)
|
||||
+ ix1 = self.instString('openssl-1.0.0a-2.fc14.i686')
|
||||
+ ix1.addFile("/usr/lib/.libssl.so.1.0.0a.hmac")
|
||||
+ ux1 = self.repoString('openssl-1.0.0b-1.fc14.i686')
|
||||
+ ux1.addFile("/usr/lib/.libssl.so.1.0.0b.hmac")
|
||||
+ self.tsInfo.addUpdate(ux1, oldpo=ix1)
|
||||
+ members.append(ix1)
|
||||
+ # this is just junk to make the transaction big
|
||||
+ i1 = self.instString('zfoobar-0.4.12-2.fc12.noarch')
|
||||
+ u1 = self.repoString('zfoobar-0.4.14-1.fc14.noarch')
|
||||
+ self.tsInfo.addUpdate(u1, oldpo=i1)
|
||||
+ members.append(u1)
|
||||
+ self.assertEquals('ok', *self.resolveCode(skip=True))
|
||||
+ self.assertResult(members)
|
||||
|
||||
|
||||
def resolveCode(self,skip = False):
|
||||
diff --git a/yum/__init__.py b/yum/__init__.py
|
||||
index 60c572d..cf4d827 100644
|
||||
--- a/yum/__init__.py
|
||||
+++ b/yum/__init__.py
|
||||
@@ -1125,6 +1125,9 @@ class YumBase(depsolve.Depsolve):
|
||||
self.rpmdb.transactionReset()
|
||||
self.installedFileRequires = None # Kind of hacky
|
||||
self.verbose_logger.debug("SKIPBROKEN: ########### Round %i ################" , count)
|
||||
+ if count == 30: # Failsafe, to avoid endless looping
|
||||
+ self.verbose_logger.debug('SKIPBROKEN: Too many loops ')
|
||||
+ break
|
||||
self._printTransaction()
|
||||
depTree = self._buildDepTree()
|
||||
startTs = set(self.tsInfo)
|
||||
@@ -1140,7 +1143,7 @@ class YumBase(depsolve.Depsolve):
|
||||
for skip in skipped:
|
||||
skipped_po.add(skip)
|
||||
# make sure we get the compat arch packages skip from pkgSack and up too.
|
||||
- if skip not in removed_from_sack and skip.repoid == 'installed':
|
||||
+ if skip not in removed_from_sack and skip.repoid != 'installed':
|
||||
_remove_from_sack(skip)
|
||||
# Nothing was removed, so we still got a problem
|
||||
# the first time we get here we reset the resolved members of
|
||||
diff --git a/yum/depsolve.py b/yum/depsolve.py
|
||||
index 388811d..44ccfd7 100644
|
||||
--- a/yum/depsolve.py
|
||||
+++ b/yum/depsolve.py
|
||||
@@ -350,6 +350,7 @@ class Depsolve(object):
|
||||
providers = self.rpmdb.getProvides(needname, needflags, needversion)
|
||||
|
||||
for inst_po in providers:
|
||||
+ self._working_po = inst_po # store the last provider
|
||||
inst_str = '%s.%s %s:%s-%s' % inst_po.pkgtup
|
||||
(i_n, i_a, i_e, i_v, i_r) = inst_po.pkgtup
|
||||
self.verbose_logger.log(logginglevels.DEBUG_2,
|
||||
@@ -753,6 +754,7 @@ class Depsolve(object):
|
||||
|
||||
|
||||
# check global FileRequires
|
||||
+ self._working_po = None # reset the working po
|
||||
if CheckRemoves:
|
||||
CheckRemoves = False
|
||||
for po, dep in self._checkFileRequires():
|
||||
@@ -766,6 +768,7 @@ class Depsolve(object):
|
||||
continue
|
||||
|
||||
# check Conflicts
|
||||
+ self._working_po = None # reset the working po
|
||||
if CheckInstalls:
|
||||
CheckInstalls = False
|
||||
for conflict in self._checkConflicts():
|
||||
54
yum-arm-hfp-support.patch
Normal file
54
yum-arm-hfp-support.patch
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
diff -uNr yum-3.2.29-orig/rpmUtils/arch.py yum-3.2.29/rpmUtils/arch.py
|
||||
--- yum-3.2.29-orig/rpmUtils/arch.py 2011-11-30 19:34:43.000000000 -0600
|
||||
+++ yum-3.2.29/rpmUtils/arch.py 2011-11-30 19:36:10.000000000 -0600
|
||||
@@ -2,6 +2,7 @@
|
||||
#
|
||||
|
||||
import os
|
||||
+import rpm
|
||||
|
||||
# dict mapping arch -> ( multicompat, best personality, biarch personality )
|
||||
multilibArches = { "x86_64": ( "athlon", "x86_64", "athlon" ),
|
||||
@@ -61,6 +62,10 @@
|
||||
"armv5tejl": "armv5tel",
|
||||
"armv5tel": "noarch",
|
||||
|
||||
+ #arm hardware floating point
|
||||
+ "armv7hnl": "armv7hl",
|
||||
+ "armv7hl": "noarch",
|
||||
+
|
||||
# super-h
|
||||
"sh4a": "sh4",
|
||||
"sh4": "noarch",
|
||||
@@ -231,6 +236,13 @@
|
||||
|
||||
return arch
|
||||
|
||||
+def getCanonARMArch(arch):
|
||||
+ # the %{_target_arch} macro in rpm will let us know the abi we are using
|
||||
+ target = rpm.expandMacro('%{_target_cpu}')
|
||||
+ if target.startswith('armv7h'):
|
||||
+ return target
|
||||
+ return arch
|
||||
+
|
||||
def getCanonPPCArch(arch):
|
||||
# FIXME: should I do better handling for mac, etc?
|
||||
if arch != "ppc64":
|
||||
@@ -308,6 +320,8 @@
|
||||
if (len(arch) == 4 and arch[0] == "i" and arch[2:4] == "86"):
|
||||
return getCanonX86Arch(arch)
|
||||
|
||||
+ if arch.startswith("arm"):
|
||||
+ return getCanonARMArch(arch)
|
||||
if arch.startswith("ppc"):
|
||||
return getCanonPPCArch(arch)
|
||||
if arch.startswith("sparc"):
|
||||
@@ -359,6 +373,8 @@
|
||||
return "sparc"
|
||||
elif myarch.startswith("ppc64"):
|
||||
return "ppc"
|
||||
+ elif myarch.startswith("armv7h"):
|
||||
+ return "armhfp"
|
||||
elif myarch.startswith("arm"):
|
||||
return "arm"
|
||||
|
||||
223
yum-createrepo-sqlite-update-fixes.patch
Normal file
223
yum-createrepo-sqlite-update-fixes.patch
Normal file
|
|
@ -0,0 +1,223 @@
|
|||
commit f964c35723285981459474f7afe194b079ac28ed
|
||||
Author: James Antill <james@and.org>
|
||||
Date: Mon Feb 21 11:34:29 2011 -0500
|
||||
|
||||
Don't preload summary/desc/url/source, also _needed_ for pkgtup only pkgs.
|
||||
|
||||
diff --git a/yum/packages.py b/yum/packages.py
|
||||
index 15eeeaa..8ffe51e 100644
|
||||
--- a/yum/packages.py
|
||||
+++ b/yum/packages.py
|
||||
@@ -1246,18 +1246,32 @@ class YumHeaderPackage(YumAvailablePackage):
|
||||
self.ver = self.version
|
||||
self.rel = self.release
|
||||
self.pkgtup = (self.name, self.arch, self.epoch, self.version, self.release)
|
||||
- # Summaries "can be" empty, which rpm return [], see BZ 473239, *sigh*
|
||||
- self.summary = self.hdr['summary'] or ''
|
||||
- self.summary = misc.share_data(self.summary.replace('\n', ''))
|
||||
- self.description = self.hdr['description'] or ''
|
||||
- self.description = misc.share_data(self.description)
|
||||
+ self._loaded_summary = None
|
||||
+ self._loaded_description = None
|
||||
self.pkgid = self.hdr[rpm.RPMTAG_SHA1HEADER]
|
||||
if not self.pkgid:
|
||||
self.pkgid = "%s.%s" %(self.hdr['name'], self.hdr['buildtime'])
|
||||
self.packagesize = self.hdr['size']
|
||||
self.__mode_cache = {}
|
||||
self.__prcoPopulated = False
|
||||
-
|
||||
+
|
||||
+ def _loadSummary(self):
|
||||
+ # Summaries "can be" empty, which rpm return [], see BZ 473239, *sigh*
|
||||
+ if self._loaded_summary is None:
|
||||
+ summary = self._get_hdr()['summary'] or ''
|
||||
+ summary = misc.share_data(summary.replace('\n', ''))
|
||||
+ self._loaded_summary = summary
|
||||
+ return self._loaded_summary
|
||||
+ summary = property(lambda x: x._loadSummary())
|
||||
+
|
||||
+ def _loadDescription(self):
|
||||
+ if self._loaded_description is None:
|
||||
+ description = self._get_hdr()['description'] or ''
|
||||
+ description = misc.share_data(description)
|
||||
+ self._loaded_description = description
|
||||
+ return self._loaded_description
|
||||
+ description = property(lambda x: x._loadDescription())
|
||||
+
|
||||
def __str__(self):
|
||||
if self.epoch == '0':
|
||||
val = '%s-%s-%s.%s' % (self.name, self.version, self.release,
|
||||
diff --git a/yum/rpmsack.py b/yum/rpmsack.py
|
||||
index 4e9835d..e93df20 100644
|
||||
--- a/yum/rpmsack.py
|
||||
+++ b/yum/rpmsack.py
|
||||
@@ -42,11 +42,6 @@ class RPMInstalledPackage(YumInstalledPackage):
|
||||
def __init__(self, rpmhdr, index, rpmdb):
|
||||
self._has_hdr = True
|
||||
YumInstalledPackage.__init__(self, rpmhdr, yumdb=rpmdb.yumdb)
|
||||
- # NOTE: We keep summary/description/url because it doesn't add much
|
||||
- # and "yum search" uses them all.
|
||||
- self.url = rpmhdr['url']
|
||||
- # Also keep sourcerpm for pirut/etc.
|
||||
- self.sourcerpm = rpmhdr['sourcerpm']
|
||||
|
||||
self.idx = index
|
||||
self.rpmdb = rpmdb
|
||||
commit 0e9bdf0b7d78a735319751692d3af5ae5ed20537
|
||||
Author: Seth Vidal <skvidal@fedoraproject.org>
|
||||
Date: Fri Jul 15 11:17:15 2011 -0400
|
||||
|
||||
when you .lower() a string you want to compare it
|
||||
to lowercase values, not uppercase ones.
|
||||
|
||||
diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
|
||||
index 8a6f6f3..19193ad 100644
|
||||
--- a/yum/sqlitesack.py
|
||||
+++ b/yum/sqlitesack.py
|
||||
@@ -406,7 +406,7 @@ class YumAvailablePackageSqlite(YumAvailablePackage, PackageObject, RpmBase):
|
||||
requires = []
|
||||
for ob in cur:
|
||||
pre = "0"
|
||||
- if ob['pre'].lower() in ['TRUE', 1]:
|
||||
+ if ob['pre'].lower() in ['true', 1]:
|
||||
pre = "1"
|
||||
prco_set = (_share_data(ob['name']), _share_data(ob['flags']),
|
||||
(_share_data(ob['epoch']),
|
||||
commit 5cc20cc6581ae621d163207c1ce57b3b0776af98
|
||||
Author: Seth Vidal <skvidal@fedoraproject.org>
|
||||
Date: Fri Jul 15 11:21:21 2011 -0400
|
||||
|
||||
the "0" string of pre returns as valid on the if pre check. So turn it
|
||||
into a check for "1" so our requires don't always include pre="0"
|
||||
when they don't really need to.
|
||||
|
||||
diff --git a/yum/packages.py b/yum/packages.py
|
||||
index 5ef9951..4b1265c 100644
|
||||
--- a/yum/packages.py
|
||||
+++ b/yum/packages.py
|
||||
@@ -1217,7 +1217,7 @@ class YumAvailablePackage(PackageObject, RpmBase):
|
||||
prcostring += ''' ver="%s"''' % misc.to_xml(v, attrib=True)
|
||||
if r:
|
||||
prcostring += ''' rel="%s"''' % misc.to_xml(r, attrib=True)
|
||||
- if pre:
|
||||
+ if pre == "1":
|
||||
prcostring += ''' pre="%s"''' % pre
|
||||
|
||||
prcostring += "/>\n"
|
||||
commit ff93cd1a76a86bec43b2c712cab637bf4bfcdff7
|
||||
Author: Seth Vidal <skvidal@fedoraproject.org>
|
||||
Date: Fri Jul 15 11:42:02 2011 -0400
|
||||
|
||||
make the test !=0 instead of == 1
|
||||
|
||||
diff --git a/yum/packages.py b/yum/packages.py
|
||||
index 4b1265c..e055edf 100644
|
||||
--- a/yum/packages.py
|
||||
+++ b/yum/packages.py
|
||||
@@ -1217,7 +1217,7 @@ class YumAvailablePackage(PackageObject, RpmBase):
|
||||
prcostring += ''' ver="%s"''' % misc.to_xml(v, attrib=True)
|
||||
if r:
|
||||
prcostring += ''' rel="%s"''' % misc.to_xml(r, attrib=True)
|
||||
- if pre == "1":
|
||||
+ if pre != "0":
|
||||
prcostring += ''' pre="%s"''' % pre
|
||||
|
||||
prcostring += "/>\n"
|
||||
commit b6431c11672f9f0cfb09fc384c7f249c66f3c78a
|
||||
Author: Seth Vidal <skvidal@fedoraproject.org>
|
||||
Date: Fri Jul 15 17:37:12 2011 -0400
|
||||
|
||||
- make the pre check look for 0 or "0" b/c 0 comes from the pkgs and "0" comes from the sqlite :)
|
||||
- if we have nothing we've used in the requires output, then don't output anything - this makes it match
|
||||
the behavior of dumping to xml from the sqlite dbs
|
||||
- set installedsize properly for header/local pkg objects
|
||||
- use installedsize properly in the xml generation :)
|
||||
- sort the requires and provides lists so if nothing has changed nothing in the repodata will change :)
|
||||
|
||||
diff --git a/yum/packages.py b/yum/packages.py
|
||||
index e055edf..db365c5 100644
|
||||
--- a/yum/packages.py
|
||||
+++ b/yum/packages.py
|
||||
@@ -1083,7 +1083,7 @@ class YumAvailablePackage(PackageObject, RpmBase):
|
||||
misc.to_unicode(misc.to_xml(self.summary)),
|
||||
misc.to_unicode(misc.to_xml(self.description)),
|
||||
packager, url, self.filetime,
|
||||
- self.buildtime, self.packagesize, self.size, self.archivesize)
|
||||
+ self.buildtime, self.packagesize, self.installedsize, self.archivesize)
|
||||
|
||||
msg += self._return_remote_location()
|
||||
return msg
|
||||
@@ -1133,7 +1133,7 @@ class YumAvailablePackage(PackageObject, RpmBase):
|
||||
msg = ""
|
||||
mylist = getattr(self, pcotype)
|
||||
if mylist: msg = "\n <rpm:%s>\n" % pcotype
|
||||
- for (name, flags, (e,v,r)) in mylist:
|
||||
+ for (name, flags, (e,v,r)) in sorted(mylist):
|
||||
pcostring = ''' <rpm:entry name="%s"''' % misc.to_xml(name, attrib=True)
|
||||
if flags:
|
||||
pcostring += ''' flags="%s"''' % misc.to_xml(flags, attrib=True)
|
||||
@@ -1194,8 +1194,8 @@ class YumAvailablePackage(PackageObject, RpmBase):
|
||||
continue
|
||||
newlist.append(i)
|
||||
mylist = newlist
|
||||
-
|
||||
- for (name, flags, (e,v,r),pre) in mylist:
|
||||
+ used = 0
|
||||
+ for (name, flags, (e,v,r),pre) in sorted(mylist):
|
||||
if name.startswith('rpmlib('):
|
||||
continue
|
||||
# this drops out requires that the pkg provides for itself.
|
||||
@@ -1217,13 +1217,16 @@ class YumAvailablePackage(PackageObject, RpmBase):
|
||||
prcostring += ''' ver="%s"''' % misc.to_xml(v, attrib=True)
|
||||
if r:
|
||||
prcostring += ''' rel="%s"''' % misc.to_xml(r, attrib=True)
|
||||
- if pre != "0":
|
||||
+ if pre not in ("0", 0):
|
||||
prcostring += ''' pre="%s"''' % pre
|
||||
-
|
||||
+
|
||||
prcostring += "/>\n"
|
||||
msg += prcostring
|
||||
+ used += 1
|
||||
|
||||
if mylist: msg += " </rpm:requires>"
|
||||
+ if used == 0:
|
||||
+ return ""
|
||||
return msg
|
||||
|
||||
def _dump_changelog(self, clog_limit):
|
||||
@@ -1299,7 +1302,8 @@ class YumHeaderPackage(YumAvailablePackage):
|
||||
self.pkgid = self.hdr[rpm.RPMTAG_SHA1HEADER]
|
||||
if not self.pkgid:
|
||||
self.pkgid = "%s.%s" %(self.hdr['name'], self.hdr['buildtime'])
|
||||
- self.packagesize = self.hdr['size']
|
||||
+ self.packagesize = self.hdr['archivesize']
|
||||
+ self.installedsize = self.hdr['size']
|
||||
self.__mode_cache = {}
|
||||
self.__prcoPopulated = False
|
||||
|
||||
commit cf07a046ba2969f25fa16801cc86940dd0ceafa7
|
||||
Author: Seth Vidal <skvidal@fedoraproject.org>
|
||||
Date: Fri Jul 15 17:44:25 2011 -0400
|
||||
|
||||
sort the files output too - it takes a bit more time but it makes things easier to read :)
|
||||
|
||||
diff --git a/yum/packages.py b/yum/packages.py
|
||||
index db365c5..79c15db 100644
|
||||
--- a/yum/packages.py
|
||||
+++ b/yum/packages.py
|
||||
@@ -1161,11 +1161,11 @@ class YumAvailablePackage(PackageObject, RpmBase):
|
||||
dirs = self.returnFileEntries('dir', primary_only=True)
|
||||
ghosts = self.returnFileEntries('ghost', primary_only=True)
|
||||
|
||||
- for fn in files:
|
||||
+ for fn in sorted(files):
|
||||
msg += """ <file>%s</file>\n""" % misc.to_xml(fn)
|
||||
- for fn in dirs:
|
||||
+ for fn in sorted(dirs):
|
||||
msg += """ <file type="dir">%s</file>\n""" % misc.to_xml(fn)
|
||||
- for fn in ghosts:
|
||||
+ for fn in sorted(ghosts):
|
||||
msg += """ <file type="ghost">%s</file>\n""" % misc.to_xml(fn)
|
||||
|
||||
return msg
|
||||
39
yum.spec
39
yum.spec
|
|
@ -7,7 +7,7 @@
|
|||
Summary: RPM package installer/updater/manager
|
||||
Name: yum
|
||||
Version: 3.2.29
|
||||
Release: 4%{?dist}
|
||||
Release: 10%{?dist}
|
||||
License: GPLv2+
|
||||
Group: System Environment/Base
|
||||
Source0: http://yum.baseurl.org/download/3.2/%{name}-%{version}.tar.gz
|
||||
|
|
@ -18,8 +18,16 @@ Patch1: yum-mirror-priority.patch
|
|||
Patch3: yum-multilib-policy-best.patch
|
||||
Patch4: no-more-exactarchlist.patch
|
||||
Patch5: geode-arch.patch
|
||||
Patch51: arm-basearch.patch
|
||||
Patch6: yum-HEAD.patch
|
||||
|
||||
Patch8: skip-broken-rel-eng.patch
|
||||
Patch9: BZ-701744-collapse-libc.patch
|
||||
Patch10: yum-createrepo-sqlite-update-fixes.patch
|
||||
Patch11: pulp-repostorage-fix.patch
|
||||
Patch12: BZ-720088-progress-ctrl-m-fix.patch
|
||||
Patch13: yum-arm-hfp-support.patch
|
||||
|
||||
Patch20: yum-manpage-files.patch
|
||||
|
||||
URL: http://yum.baseurl.org/
|
||||
|
|
@ -123,8 +131,15 @@ Install this package if you want auto yum updates nightly via cron.
|
|||
%patch3 -p0
|
||||
%patch4 -p0
|
||||
%patch5 -p1
|
||||
%patch51 -p1
|
||||
%patch6 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch20 -p1
|
||||
%patch13 -p1
|
||||
|
||||
%build
|
||||
make
|
||||
|
|
@ -247,6 +262,28 @@ exit 0
|
|||
%config(noreplace) %{_sysconfdir}/sysconfig/yum-cron
|
||||
|
||||
%changelog
|
||||
* Wed Nov 30 2011 Dennis Gilmore <dennis@ausil.us> - 3.2.29-10
|
||||
- add arm hardware floating point support to yum
|
||||
|
||||
* Wed Aug 17 2011 James Antill <james at fedoraproject.org> - 3.2.29-9
|
||||
- Fix for pulp using the repostorage API.
|
||||
- Fix for progress ctrl-m on yum update.
|
||||
|
||||
* Thu Jul 28 2011 James Antill <james at fedoraproject.org> - 3.2.29-8
|
||||
- Fix for createrepo sqlite update.
|
||||
- Also doesn't auto load summary/description/url/sourcerpm.
|
||||
|
||||
* Mon Jul 11 2011 James Antill <james at fedoraproject.org> - 3.2.29-7
|
||||
- Fix libc consolidate.
|
||||
- Resolves: bug#715108
|
||||
|
||||
* Tue May 31 2011 James Antill <james at fedoraproject.org> - 3.2.29-6
|
||||
- Change arm basearch to arm.
|
||||
|
||||
* Wed May 11 2011 James Antill <james at fedoraproject.org> - 3.2.29-5
|
||||
- Update consolidate_libc to fix new version issue.
|
||||
- Limit skip-broken to 30 loops, for rel-eng.
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.29-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue