Compare commits

..

21 commits

Author SHA1 Message Date
James Antill
42ef2cc506 Forgot to add obsoletes bug to changelog. 2010-09-14 10:32:17 -04:00
James Antill
745109712d Also obsolete yum-plugin-basearchonly. BZ 629138 2010-09-14 10:25:40 -04:00
James Antill
3e1c478b65 Fix auto-close bug with GPG key installs. 2010-09-14 10:20:47 -04:00
Seth Vidal
b036e5ca82 obsoleted download-order 2010-08-27 13:51:37 -04:00
Seth Vidal
2eeaa70f5f latest head
sync up spec file
2010-08-12 12:35:20 -04:00
Seth Vidal
55739e96b8 update to head 2010-08-09 15:39:48 -04:00
Seth Vidal
93ab7205d4 3.2.28 and manpage patch 2010-07-30 17:10:22 -04:00
Fedora Release Engineering
09195f20f0 dist-git conversion 2010-07-29 16:24:38 +00:00
Seth Vidal
ffebcd2974 add reget size patch 2010-04-08 21:14:13 +00:00
Seth Vidal
5d67ee57b1 fix for breaking PK in f12, too 2010-03-23 14:35:50 +00:00
Seth Vidal
9ad869fb98 3.2.27 for f12, too 2010-03-18 18:50:05 +00:00
Seth Vidal
ccece1cac4 bring changes from f13 back to f12 for bugfixes 2010-03-04 21:00:52 +00:00
Seth Vidal
9215e61c87 fix rh bug 563740 2010-02-11 03:01:09 +00:00
Seth Vidal
07bdc3599d 3.2.26 for f12, too 2010-02-09 20:23:18 +00:00
Bill Nottingham
56b2b1b7ed Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:12:40 +00:00
Seth Vidal
82262b8335 yum 3.2.25 - which really just gets rid of HEAD patch and fixes a number of
minor things
2009-10-14 20:42:24 +00:00
Seth Vidal
dd1d0216d4 add the revert-yum. patch, too 2009-09-30 18:22:49 +00:00
Seth Vidal
28575c176a revert yum.import patch. my damned fault 2009-09-30 18:22:35 +00:00
Seth Vidal
ec292b43a6 add version-groups conf file to spec 2009-09-30 14:38:15 +00:00
Seth Vidal
ecc260fbcf history patch czech language trans fix 2009-09-29 21:14:25 +00:00
Jesse Keating
78598d7236 Initialize branch F-12 for yum 2009-09-29 07:27:59 +00:00
28 changed files with 1690 additions and 1 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
yum-3.2.24.tar.gz

View file

@ -0,0 +1,47 @@
commit 63540521709205dd601994e2b05b7ddd3712b3a1
Author: Seth Vidal <skvidal@fedoraproject.org>
Date: Thu Jul 10 12:21:29 2008 -0400
make sure the reqpo exists before we compare it
diff --git a/yum/depsolve.py b/yum/depsolve.py
index 8bb2cf1..2577cef 100644
--- a/yum/depsolve.py
+++ b/yum/depsolve.py
@@ -986,8 +986,13 @@ class Depsolve(object):
if obsoleted:
pkgresults[po] -= 1024
break
-
- for thisarch in (reqpo.arch, getBestArch()):
+
+ if reqpo:
+ arches = (reqpo.arch, getBestArch())
+ else:
+ arches = (getBestArch())
+
+ for thisarch in arches:
res = _compare_arch_distance(po, nextpo, thisarch)
if not res:
continue
@@ -1001,13 +1006,13 @@ class Depsolve(object):
self.verbose_logger.log(logginglevels.DEBUG_4,
_('common sourcerpm %s and %s' % (po, reqpo)))
pkgresults[po] += 20
-
- cpl = _common_prefix_len(po.name, reqpo.name)
- if cpl > 2:
- self.verbose_logger.log(logginglevels.DEBUG_4,
- _('common prefix of %s between %s and %s' % (cpl, po, reqpo)))
-
- pkgresults[po] += cpl*2
+ if reqpo:
+ cpl = _common_prefix_len(po.name, reqpo.name)
+ if cpl > 2:
+ self.verbose_logger.log(logginglevels.DEBUG_4,
+ _('common prefix of %s between %s and %s' % (cpl, po, reqpo)))
+
+ pkgresults[po] += cpl*2
pkgresults[po] += (len(po.name)*-1)

View file

@ -0,0 +1,25 @@
From 7a99a04d7f121a547d9af82738cd64b2fa8b04ca Mon Sep 17 00:00:00 2001
From: Seth Vidal <skvidal@fedoraproject.org>
Date: Sat, 17 May 2008 07:43:42 -0400
Subject: [PATCH] gotta check both, not either - otherwise filedeps don't work :(
---
yum/sqlitesack.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
index c9fc26c..0b5d3e1 100644
--- a/yum/sqlitesack.py
+++ b/yum/sqlitesack.py
@@ -766,7 +766,7 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
# If it's not a provides or a filename, we are done
if prcotype != "provides":
return results
- if not glob or name[0] != '/':
+ if not glob and name[0] != '/':
return results
# If it is a filename, search the primary.xml file info
--
1.5.5.1

View file

@ -1 +0,0 @@
Superseded by DNF. For details, see: https://fedoraproject.org/wiki/Changes/Retire_YUM_3

19
fix-kernel-updates.patch Normal file
View file

@ -0,0 +1,19 @@
commit 50b01cf6329d00e09a8586527afd9b72466df506
Author: Seth Vidal <skvidal@fedoraproject.org>
Date: Wed Feb 10 21:50:23 2010 -0500
fix typo which makes all kernel updates die :(
diff --git a/yum/__init__.py b/yum/__init__.py
index d0bd4cc..df952a8 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -4101,7 +4101,7 @@ class YumBase(depsolve.Depsolve):
numleft -= 1
for po,rel in toremove:
- txmbr = self.tsInfo.addErase(toremove)
+ txmbr = self.tsInfo.addErase(po)
# Add a dep relation to the new version of the package, causing this one to be erased
# this way skipbroken, should clean out the old one, if the new one is skipped
txmbr.depends_on.append(rel)

16
geode-arch.patch Normal file
View file

@ -0,0 +1,16 @@
diff --git a/rpmUtils/arch.py b/rpmUtils/arch.py
index b493b6a..27c6d53 100644
--- a/rpmUtils/arch.py
+++ b/rpmUtils/arch.py
@@ -15,7 +15,7 @@ arches = {
# ia32
"athlon": "i686",
"i686": "i586",
- "geode": "i586",
+ "geode": "i686",
"i586": "i486",
"i486": "i386",
"i386": "noarch",
--
1.6.2.5

23
installonlyn-enable.patch Normal file
View file

@ -0,0 +1,23 @@
--- yum/config.py~ 2008-02-08 16:22:27.000000000 -0500
+++ yum/config.py 2008-02-08 16:22:28.000000000 -0500
@@ -593,7 +593,7 @@
# NOTE: If you set this to 2, then because it keeps the current kernel it
# means if you ever install an "old" kernel it'll get rid of the newest one
# so you probably want to use 3 as a minimum ... if you turn it on.
- installonly_limit = PositiveIntOption(0, range_min=2,
+ installonly_limit = PositiveIntOption(3, range_min=2,
names_of_0=["0", "<off>"])
kernelpkgnames = ListOption(['kernel','kernel-smp', 'kernel-enterprise',
'kernel-bigmem', 'kernel-BOOT', 'kernel-PAE', 'kernel-PAE-debug'])
--- docs/yum.conf.5~ 2009-05-11 11:55:25.000000000 -0400
+++ docs/yum.conf.5 2009-05-11 11:55:25.000000000 -0400
@@ -108,7 +108,7 @@
.IP \fBinstallonly_limit \fR
Number of packages listed in installonlypkgs to keep installed at the same
-time. Setting to 0 disables this feature. Default is '0'. Note that this
+time. Setting to 0 disables this feature. Default is '3'. Note that this
functionality used to be in the "installonlyn" plugin, where this option was
altered via. tokeep.

69
installonlyn.py Normal file
View file

@ -0,0 +1,69 @@
# A plugin for yum which only leaves n 'kernel' packages installed instead
# of infinitely doing installonly
#
# Copyright 2005 Red Hat, Inc.
# Jeremy Katz <katzj@redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# version 0.93
import os
from rpmUtils import miscutils
from yum.plugins import TYPE_CORE
from yum.packages import YumInstalledPackage, comparePoEVR
requires_api_version = '2.4'
plugin_type = TYPE_CORE
def get_running_kernel_version_release():
"""This takes the output of uname and figures out the (version, release)
tuple for the running kernel."""
ver = os.uname()[2]
for s in ("bigmem", "enterprise", "smp", "hugemem", "PAE", "rt",
"guest", "hypervisor", "xen0", "xenU", "xen", "debug"):
if ver.endswith(s):
ver = ver.replace(s, "")
if ver.find("-") != -1:
(v, r) = ver.split("-", 1)
return (v, r)
return (None, None)
def config_hook(conduit):
global num_tokeep
num_tokeep = conduit.confInt('main', 'tokeep', default=2)
def postresolve_hook(conduit):
ts = conduit.getTsInfo()
rpmdb = conduit.getRpmDB()
conf = conduit.getConf()
mems = ts.getMembers()
toremove = []
for instpkg in conf.installonlypkgs:
for m in mems:
if (m.name == instpkg or instpkg in m.po.provides_names) \
and m.ts_state in ('i', 'u'):
installed = rpmdb.searchNevra(name=m.name)
if len(installed) >= num_tokeep - 1: # since we're adding one
numleft = len(installed) - num_tokeep + 1
(curv, curr) = get_running_kernel_version_release()
installed.sort(comparePoEVR)
for po in installed:
if (po.version, po.release) == (curv, curr):
# don't remove running
continue
if numleft == 0:
break
toremove.append(po)
numleft -= 1
map(lambda x: ts.addErase(x), toremove)

View file

@ -0,0 +1,13 @@
--- yum/config.py~ 2009-07-22 12:47:52.000000000 -0400
+++ yum/config.py 2009-07-22 12:48:39.000000000 -0400
@@ -631,9 +631,7 @@
names_of_0=["0", "<off>"])
kernelpkgnames = ListOption(['kernel','kernel-smp', 'kernel-enterprise',
'kernel-bigmem', 'kernel-BOOT', 'kernel-PAE', 'kernel-PAE-debug'])
- exactarchlist = ListOption(['kernel', 'kernel-smp',
- 'kernel-hugemem', 'kernel-enterprise', 'kernel-bigmem',
- 'kernel-devel', 'kernel-PAE', 'kernel-PAE-debug'])
+ exactarchlist = ListOption([])
tsflags = ListOption()
assumeyes = BoolOption(False)

2
plugin.conf Normal file
View file

@ -0,0 +1,2 @@
[main]
enabled=1

View file

@ -0,0 +1,28 @@
commit 2a9161a8b4bfc121fa8245700df355c63b58b442
Author: James Antill <james@and.org>
Date: Wed Mar 31 00:12:09 2010 -0400
Should work around the reget MD problems
diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 8d7617e..b67b897 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -1552,9 +1552,17 @@ class YumRepository(Repository, config.RepoConf):
try:
checkfunc = (self.checkMD, (mdtype,), {})
text = "%s/%s" % (self.id, mdtype)
+ if thisdata.size is None:
+ reget = None
+ else:
+ reget = 'simple'
+ if os.path.exists(local):
+ if os.stat(local).st_size >= int(thisdata.size):
+ misc.unlink_f(local)
local = self._getFile(relative=remote,
local=local,
copy_local=1,
+ reget=reget,
checkfunc=checkfunc,
text=text,
cache=self.http_caching == 'all',

159
revert-yum-dot-import.patch Normal file
View file

@ -0,0 +1,159 @@
diff --git a/yum/__init__.py b/yum/__init__.py
index 6e06005..a5b4922 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -32,9 +32,9 @@ import logging.config
import operator
import gzip
-import i18n
-_ = i18n._
-P_ = i18n.P_
+import yum.i18n
+_ = yum.i18n._
+P_ = yum.i18n.P_
import config
from config import ParsingError, ConfigParser
@@ -57,15 +57,15 @@ import plugins
import logginglevels
import yumRepo
import callbacks
-import history
+import yum.history
import warnings
warnings.simplefilter("ignore", Errors.YumFutureDeprecationWarning)
from packages import parsePackages, YumAvailablePackage, YumLocalPackage, YumInstalledPackage, comparePoEVR
from constants import *
-from rpmtrans import RPMTransaction,SimpleCliCallBack
-from i18n import to_unicode, to_str
+from yum.rpmtrans import RPMTransaction,SimpleCliCallBack
+from yum.i18n import to_unicode, to_str
import string
diff --git a/yum/comps.py b/yum/comps.py
index d310b1b..2048c77 100755
--- a/yum/comps.py
+++ b/yum/comps.py
@@ -26,7 +26,7 @@ from Errors import CompsException
# switch all compsexceptions to grouperrors after api break
import fnmatch
import re
-from i18n import to_unicode
+from yum.i18n import to_unicode
from misc import get_my_lang_code
lang_attr = '{http://www.w3.org/XML/1998/namespace}lang'
diff --git a/yum/history.py b/yum/history.py
index 18d2a41..644c2fc 100644
--- a/yum/history.py
+++ b/yum/history.py
@@ -23,10 +23,11 @@ import glob
from weakref import proxy as weakref
from sqlutils import sqlite, executeSQL
-import misc
-from constants import *
-from packages import YumInstalledPackage, YumAvailablePackage, PackageObject
-from i18n import to_unicode
+import yum.misc
+import yum.constants
+from yum.constants import *
+from yum.packages import YumInstalledPackage, YumAvailablePackage, PackageObject
+from yum.i18n import to_unicode
_history_dir = '/var/lib/yum/history'
diff --git a/yum/plugins.py b/yum/plugins.py
index c0e510f..02f0d57 100644
--- a/yum/plugins.py
+++ b/yum/plugins.py
@@ -34,7 +34,7 @@ from weakref import proxy as weakref
from yum import _
-from i18n import utf8_width
+from yum.i18n import utf8_width
# TODO: expose rpm package sack objects to plugins (once finished)
# TODO: allow plugins to use the existing config stuff to define options for
diff --git a/yum/rpmsack.py b/yum/rpmsack.py
index 74dd69d..fd05f9b 100644
--- a/yum/rpmsack.py
+++ b/yum/rpmsack.py
@@ -31,7 +31,7 @@ from packageSack import PackageSackBase, PackageSackVersion
import fnmatch
import re
-from i18n import to_unicode
+from yum.i18n import to_unicode
import constants
class RPMInstalledPackage(YumInstalledPackage):
diff --git a/yum/rpmtrans.py b/yum/rpmtrans.py
index ed52df0..b1b896f 100644
--- a/yum/rpmtrans.py
+++ b/yum/rpmtrans.py
@@ -23,7 +23,7 @@ import time
import logging
import types
import sys
-from constants import *
+from yum.constants import *
from yum import _
import misc
diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
index 89744ff..ce2988f 100644
--- a/yum/sqlitesack.py
+++ b/yum/sqlitesack.py
@@ -33,8 +33,8 @@ import rpmUtils.miscutils
import sqlutils
import constants
import operator
-from misc import seq_max_split
-from i18n import to_utf8, to_unicode
+from yum.misc import seq_max_split
+from yum.i18n import to_utf8, to_unicode
import sys
import re
diff --git a/yum/update_md.py b/yum/update_md.py
index 34179ea..b3a120e 100644
--- a/yum/update_md.py
+++ b/yum/update_md.py
@@ -24,10 +24,10 @@ Update metadata (updateinfo.xml) parsing.
import sys
import gzip
-from i18n import utf8_text_wrap, to_utf8
-from yumRepo import YumRepository
-from packages import FakeRepository
-from misc import to_xml
+from yum.i18n import utf8_text_wrap, to_utf8
+from yum.yumRepo import YumRepository
+from yum.packages import FakeRepository
+from yum.misc import to_xml
import Errors
import rpmUtils.miscutils
diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 2bc7476..ea8518a 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -32,9 +32,9 @@ from repos import Repository
import parser
import sqlitecachec
import sqlitesack
-import config
-import misc
-import comps
+from yum import config
+from yum import misc
+from yum import comps
from constants import *
import metalink

1
sources Normal file
View file

@ -0,0 +1 @@
91eff58aa4c25cd4f46b21201bbf9bea yum-3.2.28.tar.gz

View file

@ -0,0 +1,11 @@
--- yum/logginglevels.py~ 2009-01-20 16:56:19.000000000 -0500
+++ yum/logginglevels.py 2009-01-20 16:56:19.000000000 -0500
@@ -141,7 +141,7 @@
plainformatter = logging.Formatter("%(message)s")
syslogformatter = logging.Formatter("yum: %(message)s")
- console_stdout = logging.StreamHandler(sys.stdout)
+ console_stdout = logging.StreamHandler(sys.__stdout__)
console_stdout.setFormatter(plainformatter)
verbose = logging.getLogger("yum.verbose")
verbose.propagate = False

View file

@ -0,0 +1,51 @@
commit 5e405ec2e6651dc828c9b47075b6867a7e145536
Author: James Antill <james@and.org>
Date: Mon Oct 27 23:59:37 2008 -0400
Iterate skipped_packages properly as they are pos not txmbrs, fixes BZ 468785
diff --git a/output.py b/output.py
index 502aa4b..3c2795c 100644
--- a/output.py
+++ b/output.py
@@ -789,8 +789,7 @@ class YumOutput:
(_('Removing'), self.tsInfo.removed),
(_('Installing for dependencies'), self.tsInfo.depinstalled),
(_('Updating for dependencies'), self.tsInfo.depupdated),
- (_('Removing for dependencies'), self.tsInfo.depremoved),
- (_('Skipped (dependency problems)'), self.skipped_packages),]:
+ (_('Removing for dependencies'), self.tsInfo.depremoved)]:
lines = []
for txmbr in pkglist:
(n,a,e,v,r) = txmbr.pkgtup
@@ -813,6 +812,30 @@ class YumOutput:
pkglist_lines.append((action, lines))
+ for (action, pkglist) in [(_('Skipped (dependency problems)'),
+ self.skipped_packages),]:
+ lines = []
+ for po in pkglist:
+ (n,a,e,v,r) = po.pkgtup
+ evr = po.printVer()
+ repoid = po.repoid
+ pkgsize = float(po.size)
+ size = self.format_number(pkgsize)
+
+ if a is None: # gpgkeys are weird
+ a = 'noarch'
+
+ lines.append((n, a, evr, repoid, size, []))
+ # Create a dict of field_length => number of packages, for
+ # each field.
+ for (d, v) in (("n",len(n)), ("v",len(evr)), ("r",len(repoid))):
+ data[d].setdefault(v, 0)
+ data[d][v] += 1
+ if a_wid < len(a): # max() is only in 2.5.z
+ a_wid = len(a)
+
+ pkglist_lines.append((action, lines))
+
if data['n']:
data = [data['n'], {}, data['v'], data['r'], {}]
columns = [1, a_wid, 1, 1, 5]

View file

@ -0,0 +1,18 @@
commit a59165490ebc236f7682ebc157bf069497958b42
Author: James Antill <james@and.org>
Date: Thu Dec 4 18:58:59 2008 -0500
Always have an obsoletes dict, so we can always call getObsoletesTuples() etc.
diff --git a/rpmUtils/updates.py b/rpmUtils/updates.py
index f348ae9..16f733b 100644
--- a/rpmUtils/updates.py
+++ b/rpmUtils/updates.py
@@ -54,6 +54,7 @@ class Updates:
self.updating_dict = {}
#debug, ignore me
self.debug = 0
+ self.obsoletes = {}
def _delFromDict(self, dict_, keys, value):
for key in keys:

View file

@ -0,0 +1,13 @@
diff --git a/yum/config.py b/yum/config.py
index 2219605..13efd9e 100644
--- a/yum/config.py
+++ b/yum/config.py
@@ -653,7 +653,7 @@ class YumConf(StartupConf):
# Time in seconds (1.5h), yum-updatesd runs once per. hour by default
# this time means we don't do interactive network checks/updates if
# yum-updatesd is running.
- metadata_expire = SecondsOption(60 * 90)
+ metadata_expire = SecondsOption(60 * 60 * 6) # 6 hours
mirrorlist_expire = SecondsOption(86400) # time in seconds (1 day)
rpm_check_debug = BoolOption(True)
disable_excludes = ListOption()

411
yum-HEAD.patch Normal file
View file

@ -0,0 +1,411 @@
diff --git a/docs/yum.conf.5 b/docs/yum.conf.5
index 49d98c6..25b2c7d 100644
--- a/docs/yum.conf.5
+++ b/docs/yum.conf.5
@@ -134,9 +134,13 @@ an i686 package to update an i386 package. Default is `1'.
.IP
\fBinstallonlypkgs \fR
-List of packages that should only ever be installed, never updated. Kernels
-in particular fall into this category. Defaults to kernel, kernel-smp,
-kernel-bigmem, kernel-enterprise, kernel-debug, kernel-unsupported.
+List of package provides that should only ever be installed, never updated.
+Kernels in particular fall into this category. Defaults to kernel,
+kernel-bigmem, kernel-enterprise, kernel-smp, kernel-modules, kernel-debug,
+kernel-unsupported, kernel-source, kernel-devel, kernel-PAE, kernel-PAE-debug.
+
+Note that because these are provides, and not just package names, kernel-devel
+will also apply to kernel-debug-devel, etc.
.IP
\fBinstallonly_limit \fR
diff --git a/output.py b/output.py
index 3a90995..10c7442 100755
--- a/output.py
+++ b/output.py
@@ -1882,10 +1882,12 @@ class DepSolveProgressCallBack:
msg += _('\n Not found')
return msg
- ipkgs = set()
- for pkg in sorted(yb.rpmdb.getProvides(needname)):
+ def _run_inst_pkg(pkg, msg):
nevr = (pkg.name, pkg.epoch, pkg.version, pkg.release)
- ipkgs.add(nevr)
+ if nevr in seen_pkgs or (pkg.verEQ(last) and pkg.arch == last.arch):
+ return msg
+
+ seen_pkgs.add(nevr)
action = _('Installed')
rmed = yb.tsInfo.getMembersWithState(pkg.pkgtup, TS_REMOVE_STATES)
if rmed:
@@ -1901,21 +1903,40 @@ class DepSolveProgressCallBack:
if rtype not in relmap:
continue
nevr = (rpkg.name, rpkg.epoch, rpkg.version, rpkg.release)
- ipkgs.add(nevr)
+ seen_pkgs.add(nevr)
msg += _msg_pkg(relmap[rtype], rpkg, needname)
+ return msg
- last = None
- for pkg in sorted(yb.pkgSack.getProvides(needname)):
+ def _run_avail_pkg(pkg, msg):
# We don't want to see installed packages, or N packages of the
# same version, from different repos.
nevr = (pkg.name, pkg.epoch, pkg.version, pkg.release)
- if nevr in ipkgs or (pkg.verEQ(last) and pkg.arch == last.arch):
- continue
- last = pkg
+ if nevr in seen_pkgs or (pkg.verEQ(last) and pkg.arch == last.arch):
+ return False, last, msg
+ seen_pkgs.add(nevr)
action = _('Available')
if yb.tsInfo.getMembersWithState(pkg.pkgtup, TS_INSTALL_STATES):
action = _('Installing')
msg += _msg_pkg(action, pkg, needname)
+ return True, pkg, msg
+
+ last = None
+ seen_pkgs = set()
+ for pkg in sorted(yb.rpmdb.getProvides(needname)):
+ msg = _run_inst_pkg(pkg, msg)
+
+ available_names = set()
+ for pkg in sorted(yb.pkgSack.getProvides(needname)):
+ tst, last, msg = _run_avail_pkg(pkg, msg)
+ if tst:
+ available_names.add(pkg.name)
+
+ last = None
+ for pkg in sorted(yb.rpmdb.searchNames(available_names)):
+ msg = _run_inst_pkg(pkg, msg)
+ last = None
+ for pkg in sorted(yb.pkgSack.searchNames(available_names)):
+ tst, last, msg = _run_avail_pkg(pkg, msg)
return msg
def procConflict(self, name, confname):
diff --git a/yum/__init__.py b/yum/__init__.py
index 2ea9f20..3a9ef88 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -294,6 +294,11 @@ class YumBase(depsolve.Depsolve):
startupconf.syslog_facility = syslog_facility
if syslog_device != None:
startupconf.syslog_device = syslog_device
+ if releasever == '/':
+ if startupconf.installroot == '/':
+ releasever = None
+ else:
+ releasever = yum.config._getsysver("/",startupconf.distroverpkg)
if releasever != None:
startupconf.releasever = releasever
@@ -442,7 +447,11 @@ class YumBase(depsolve.Depsolve):
@return: YumRepository instance.
'''
repo = yumRepo.YumRepository(section)
- repo.populate(parser, section, self.conf)
+ try:
+ repo.populate(parser, section, self.conf)
+ except ValueError, e:
+ msg = _('Repository %r: Error parsing config: %s' % (section,e))
+ raise Errors.ConfigError, msg
# Ensure that the repo name is set
if not repo.name:
@@ -1403,7 +1412,8 @@ class YumBase(depsolve.Depsolve):
# that there is not also an install of this pkg in the tsInfo (reinstall)
# for any kind of install add from_repo to the yumdb, and the cmdline
# and the install reason
-
+
+ vt_st = time.time()
self.rpmdb.dropCachedData()
self.plugins.run('preverifytrans')
for txmbr in self.tsInfo:
@@ -1489,6 +1499,7 @@ class YumBase(depsolve.Depsolve):
self.plugins.run('historyend')
self.history.end(self.rpmdb.simpleVersion(main_only=True)[0], ret)
self.rpmdb.dropCachedData()
+ self.verbose_logger.debug('VerifyTransaction time: %0.3f' % (time.time() - vt_st))
def costExcludePackages(self):
""" Create an excluder for repos. with higher cost. Eg.
@@ -3669,6 +3680,7 @@ class YumBase(depsolve.Depsolve):
self.logger.critical(_('%s') % e)
if not depmatches:
+ arg = to_unicode(arg)
self.logger.critical(_('No Match for argument: %s') % arg)
else:
pkgs.extend(depmatches)
@@ -3690,6 +3702,14 @@ class YumBase(depsolve.Depsolve):
if self.conf.protected_packages and po.pkgtup == kern_pkgtup:
self.logger.warning(_("Skipping the running kernel: %s") % po)
continue
+
+ if self.tsInfo.getMembers(po.pkgtup):
+ # This allows multiple reinstalls and update/downgrade "cancel"
+ for txmbr in self.tsInfo.matchNaevr(po.name):
+ self.logger.warning(_("Removing %s from the transaction") %
+ txmbr)
+ self.tsInfo.remove(txmbr.pkgtup)
+ # Now start the remove/reinstall
txmbr = self.tsInfo.addErase(po)
tx_return.append(txmbr)
diff --git a/yum/history.py b/yum/history.py
index 502b908..014bdab 100644
--- a/yum/history.py
+++ b/yum/history.py
@@ -27,7 +27,7 @@ import yum.misc as misc
import yum.constants
from yum.constants import *
from yum.packages import YumInstalledPackage, YumAvailablePackage, PackageObject
-from yum.i18n import to_unicode
+from yum.i18n import to_unicode, to_utf8
_history_dir = '/var/lib/yum/history'
@@ -425,12 +425,15 @@ class YumHistory:
cur = self._get_cursor()
if cur is None or not self._update_db_file_2():
return None
+ # str(problem) doesn't work if problem contains unicode(),
+ # unicode(problem) doesn't work in python 2.4.x ... *sigh*.
+ uproblem = to_unicode(problem.__str__())
res = executeSQL(cur,
"""INSERT INTO trans_rpmdb_problems
(tid, problem, msg)
VALUES (?, ?, ?)""", (self._tid,
problem.problem,
- to_unicode(str(problem))))
+ uproblem))
rpid = cur.lastrowid
if not rpid:
@@ -467,7 +470,7 @@ class YumHistory:
res = executeSQL(cur,
"""INSERT INTO trans_cmdline
(tid, cmdline)
- VALUES (?, ?)""", (self._tid, cmdline))
+ VALUES (?, ?)""", (self._tid, to_unicode(cmdline)))
return cur.lastrowid
def beg(self, rpmdb_version, using_pkgs, txmbrs, skip_packages=[],
@@ -610,7 +613,7 @@ class YumHistory:
# open file in append
fo = open(data_fn, 'w+')
# write data
- fo.write(data)
+ fo.write(to_utf8(data))
# flush data
fo.flush()
fo.close()
@@ -914,17 +917,19 @@ class YumHistory:
version || '-' || release || '.' || arch AS nevra
FROM trans_skip_pkgs JOIN pkgtups USING(pkgtupid)
ORDER BY name;
-''', # NOTE: Old versions of sqlite don't like this next view, they are only
- # there for debugging anyway ... but it's worth remembering.
+''', # NOTE: Old versions of sqlite don't like the normal way to do the next
+ # view. So we do it with the select. It's for debugging only, so
+ # no big deal.
'''\
\
- CREATE VIEW vtrans_prob_pkgs AS
+ CREATE VIEW vtrans_prob_pkgs2 AS
SELECT tid,rpid,name,epoch,version,release,arch,pkgtups.pkgtupid,
- main,
+ main,problem,msg,
name || '-' || epoch || ':' ||
version || '-' || release || '.' || arch AS nevra
- FROM (trans_prob_pkgs JOIN trans_rpmdb_problems USING(rpid))
- JOIN pkgtups USING(pkgtupid)
+ FROM (SELECT * FROM trans_prob_pkgs,trans_rpmdb_problems WHERE
+ trans_prob_pkgs.rpid=trans_rpmdb_problems.rpid)
+ JOIN pkgtups USING(pkgtupid)
ORDER BY name;
''']
diff --git a/yum/pgpmsg.py b/yum/pgpmsg.py
index 9cf8217..b23eabc 100644
--- a/yum/pgpmsg.py
+++ b/yum/pgpmsg.py
@@ -1186,7 +1186,7 @@ def decode(msg) :
idx = idx + pkt_len
return pkt_list
-def decode_msg(msg) :
+def decode_msg(msg, multi=False) :
"""decode_msg(msg) ==> list of OpenPGP "packet" objects
Takes an ascii-armored PGP block and returns a list of objects each of which
corresponds to a PGP "packets".
@@ -1242,11 +1242,17 @@ a PGP "certificate" includes a public key, user id(s), and signature.
pkt_idx = cert.load(pkt_list)
cert_list.append(cert)
pkt_list[0:pkt_idx] = []
+ if not multi:
+ if not cert_list:
+ return None
+ return cert_list[0]
return cert_list
# add the data to our buffer then
block_buf.write(l)
+ if not multi:
+ return None
return []
def decode_multiple_keys(msg):
@@ -1266,7 +1272,7 @@ def decode_multiple_keys(msg):
block += '%s\n' % l
if l == '-----END PGP PUBLIC KEY BLOCK-----':
in_block = 0
- thesecerts = decode_msg(block)
+ thesecerts = decode_msg(block, multi=True)
if thesecerts:
certs.extend(thesecerts)
block = ''
diff --git a/yumcommands.py b/yumcommands.py
index a7f5d9e..9c6fc75 100644
--- a/yumcommands.py
+++ b/yumcommands.py
@@ -122,6 +122,25 @@ def checkShellArg(base, basecmd, extcmds):
base.usage()
raise cli.CliError
+def checkEnabledRepo(base, possible_local_files=[]):
+ """
+ Verify that there is at least one enabled repo.
+
+ @param base: a YumBase object.
+ """
+ if base.repos.listEnabled():
+ return
+
+ for lfile in possible_local_files:
+ if lfile.endswith(".rpm") and os.path.exists(lfile):
+ return
+
+ msg = _('There are no enabled repos.\n'
+ ' Run "yum repolist all" to see the repos you have.\n'
+ ' You can enable repos with yum-config-manager --enable <repo>')
+ base.logger.critical(msg)
+ raise cli.CliError
+
class YumCommand:
def __init__(self):
@@ -176,6 +195,7 @@ class InstallCommand(YumCommand):
checkRootUID(base)
checkGPGKey(base)
checkPackageArg(base, basecmd, extcmds)
+ checkEnabledRepo(base, extcmds)
def doCommand(self, base, basecmd, extcmds):
self.doneCommand(base, _("Setting up Install Process"))
@@ -197,6 +217,7 @@ class UpdateCommand(YumCommand):
def doCheck(self, base, basecmd, extcmds):
checkRootUID(base)
checkGPGKey(base)
+ checkEnabledRepo(base, extcmds)
def doCommand(self, base, basecmd, extcmds):
self.doneCommand(base, _("Setting up Update Process"))
@@ -218,6 +239,7 @@ class DistroSyncCommand(YumCommand):
def doCheck(self, base, basecmd, extcmds):
checkRootUID(base)
checkGPGKey(base)
+ checkEnabledRepo(base, extcmds)
def doCommand(self, base, basecmd, extcmds):
self.doneCommand(base, _("Setting up Distribution Synchronization Process"))
@@ -420,6 +442,9 @@ class GroupListCommand(GroupCommand):
def getSummary(self):
return _("List available package groups")
+ def doCheck(self, base, basecmd, extcmds):
+ checkEnabledRepo(base)
+
def doCommand(self, base, basecmd, extcmds):
GroupCommand.doCommand(self, base, basecmd, extcmds)
return base.returnGroupLists(extcmds)
@@ -441,6 +466,7 @@ class GroupInstallCommand(GroupCommand):
checkRootUID(base)
checkGPGKey(base)
checkGroupArg(base, basecmd, extcmds)
+ checkEnabledRepo(base)
def doCommand(self, base, basecmd, extcmds):
GroupCommand.doCommand(self, base, basecmd, extcmds)
@@ -462,6 +488,7 @@ class GroupRemoveCommand(GroupCommand):
def doCheck(self, base, basecmd, extcmds):
checkRootUID(base)
checkGroupArg(base, basecmd, extcmds)
+ checkEnabledRepo(base)
def doCommand(self, base, basecmd, extcmds):
GroupCommand.doCommand(self, base, basecmd, extcmds)
@@ -488,6 +515,7 @@ class GroupInfoCommand(GroupCommand):
def doCheck(self, base, basecmd, extcmds):
checkGroupArg(base, basecmd, extcmds)
+ checkEnabledRepo(base)
def doCommand(self, base, basecmd, extcmds):
GroupCommand.doCommand(self, base, basecmd, extcmds)
@@ -511,7 +539,7 @@ class MakeCacheCommand(YumCommand):
return _("Generate the metadata cache")
def doCheck(self, base, basecmd, extcmds):
- pass
+ checkEnabledRepo(base)
def doCommand(self, base, basecmd, extcmds):
base.logger.debug(_("Making cache files for all metadata files."))
@@ -554,6 +582,7 @@ class CleanCommand(YumCommand):
def doCheck(self, base, basecmd, extcmds):
checkCleanArg(base, basecmd, extcmds)
+ checkEnabledRepo(base)
def doCommand(self, base, basecmd, extcmds):
base.conf.cache = 1
@@ -592,6 +621,9 @@ class CheckUpdateCommand(YumCommand):
def getSummary(self):
return _("Check for available package updates")
+ def doCheck(self, base, basecmd, extcmds):
+ checkEnabledRepo(base)
+
def doCommand(self, base, basecmd, extcmds):
base.extcmds.insert(0, 'updates')
result = 0
@@ -668,6 +700,7 @@ class UpgradeCommand(YumCommand):
def doCheck(self, base, basecmd, extcmds):
checkRootUID(base)
checkGPGKey(base)
+ checkEnabledRepo(base, extcmds)
def doCommand(self, base, basecmd, extcmds):
base.conf.obsoletes = 1
@@ -1104,6 +1137,7 @@ class ReInstallCommand(YumCommand):
checkRootUID(base)
checkGPGKey(base)
checkPackageArg(base, basecmd, extcmds)
+ checkEnabledRepo(base, extcmds)
def doCommand(self, base, basecmd, extcmds):
self.doneCommand(base, _("Setting up Reinstall Process"))
@@ -1130,6 +1164,7 @@ class DowngradeCommand(YumCommand):
checkRootUID(base)
checkGPGKey(base)
checkPackageArg(base, basecmd, extcmds)
+ checkEnabledRepo(base, extcmds)
def doCommand(self, base, basecmd, extcmds):
self.doneCommand(base, _("Setting up Downgrade Process"))

View file

@ -0,0 +1,39 @@
commit 3e05536ef876fc761553b632495449fd96bb4b9e
Author: James Antill <james@and.org>
Date: Tue Sep 14 09:48:23 2010 -0400
Can't keep ts around, due to rpmdb.auto_close. BZ 622179.
This kind of sucks as we have to remember in all future code not to
keep a ts over any .rpmdb call, it's even better because almost nobody
will hit it. It works though, and is simple.
We could maybe fix this "better" by using a weakref in rpmdb, and doing
it that way. Or having some manual way to mark auto_close as off. Or
just rm'ing auto_close as a bad idea.
diff --git a/yum/__init__.py b/yum/__init__.py
index b5e9213..5c689e5 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -4301,12 +4301,11 @@ class YumBase(depsolve.Depsolve):
keyurls = repo.gpgkey
key_installed = False
- ts = self.rpmdb.readOnlyTS()
-
for keyurl in keyurls:
keys = self._retrievePublicKey(keyurl, repo)
for info in keys:
+ ts = self.rpmdb.readOnlyTS()
# Check if key is already installed
if misc.keyInstalled(ts, info['keyid'], info['timestamp']) >= 0:
self.logger.info(_('GPG key at %s (0x%s) is already installed') % (
@@ -4331,6 +4330,7 @@ class YumBase(depsolve.Depsolve):
raise Errors.YumBaseError, _("Not installing key")
# Import the key
+ ts = self.rpmdb.readOnlyTS()
result = ts.pgpImportPubkey(misc.procgpgkey(info['raw_key']))
if result != 0:
raise Errors.YumBaseError, \

View file

@ -0,0 +1,48 @@
diff --git a/yum/__init__.py b/yum/__init__.py
index 6378cdc..cc57e98 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -427,6 +427,9 @@ class YumBase(depsolve.Depsolve):
def closeRpmDB(self):
"""closes down the instances of the rpmdb we have wangling around"""
+ if self._rpmdb is not None:
+ self._rpmdb.ts = None
+ self._rpmdb.dropCachedData()
self._rpmdb = None
self._ts = None
self._tsInfo = None
@@ -1008,6 +1011,7 @@ class YumBase(depsolve.Depsolve):
# for any kind of install add from_repo to the yumdb, and the cmdline
# and the install reason
+ self.rpmdb.dropCachedData()
for txmbr in self.tsInfo:
if txmbr.output_state in TS_INSTALL_STATES:
if not self.rpmdb.contains(po=txmbr.po):
@@ -1037,7 +1041,7 @@ class YumBase(depsolve.Depsolve):
else:
self.verbose_logger.log(logginglevels.DEBUG_2, 'What is this? %s' % txmbr.po)
-
+ self.rpmdb.dropCachedData()
def costExcludePackages(self):
"""exclude packages if they have an identical package in another repo
diff --git a/yum/rpmsack.py b/yum/rpmsack.py
index 5189b18..8556e9a 100644
--- a/yum/rpmsack.py
+++ b/yum/rpmsack.py
@@ -140,7 +140,10 @@ class RPMDBPackageSack(PackageSackBase):
self._simple_pkgtup_list = []
self._get_pro_cache = {}
self._get_req_cache = {}
- misc.unshare_data()
+ # We can be called on python shutdown (due to yb.__del__), at which
+ # point other modules might not be available.
+ if misc is not None:
+ misc.unshare_data()
self._cache = {
'provides' : { },
'requires' : { },

View file

@ -0,0 +1,39 @@
commit 11dfde5e065e21c5bdb25a087501b90afe0b0dab
Author: Seth Vidal <skvidal@fedoraproject.org>
Date: Tue Mar 23 10:09:20 2010 -0400
make sure we aren't overwriting the value of 'keys'
this determines how many args we pass back in our yielded results
never noticed it b/c nothing in yum uses keys=True - but it broke PK
diff --git a/yum/__init__.py b/yum/__init__.py
index ea73549..0aaa819 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -2163,10 +2163,10 @@ class YumBase(depsolve.Depsolve):
# do the ones we already have
for item in sorted_lists.values():
- for pkg, keys, values in item:
+ for pkg, k, v in item:
if pkg not in results_by_pkg:
results_by_pkg[pkg] = []
- results_by_pkg[pkg].append((keys,values))
+ results_by_pkg[pkg].append((k,v))
# take our existing dict-by-pkg and make the dict-by-count for
# this bizarro sorted_lists format
@@ -2175,9 +2175,9 @@ class YumBase(depsolve.Depsolve):
for pkg in results_by_pkg:
totkeys = []
totvals = []
- for (keys, values) in results_by_pkg[pkg]:
- totkeys.extend(keys)
- totvals.extend(values)
+ for (k, v) in results_by_pkg[pkg]:
+ totkeys.extend(k)
+ totvals.extend(v)
totkeys = misc.unique(totkeys)
totvals = misc.unique(totvals)

View file

@ -0,0 +1,67 @@
commit 359ae828b915101116bb57fbe2645eae056c158b
Author: Tim Lauridsen <timlau@fedoraproject.org>
Date: Tue Mar 2 16:47:45 2010 +0100
Make skipbroken run again if packages has been added to transaction by a postresolve plugin
diff --git a/yum/__init__.py b/yum/__init__.py
index f21001d..69af7ba 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -866,20 +866,16 @@ class YumBase(depsolve.Depsolve):
# works for downloads / mirror failover etc.
self.rpmdb.ts = None
- # if depsolve failed and skipbroken is enabled
- # The remove the broken packages from the transactions and
- # Try another depsolve
- if self.conf.skip_broken and rescode==1:
- self.skipped_packages = [] # reset the public list of skipped packages.
- sb_st = time.time()
- rescode, restring = self._skipPackagesWithProblems(rescode, restring)
- self._printTransaction()
- self.verbose_logger.debug('Skip-Broken time: %0.3f' % (time.time() - sb_st))
+ # do the skip broken magic, if enabled and problems exist
+ (rescode, restring) = self._doSkipBroken(rescode, restring)
self.plugins.run('postresolve', rescode=rescode, restring=restring)
if self.tsInfo.changed:
(rescode, restring) = self.resolveDeps(rescode == 1)
+ # If transaction was changed by postresolve plugins then we should run skipbroken again
+ (rescode, restring) = self._doSkipBroken(rescode, restring, clear_skipped=False )
+
if self.tsInfo.pkgSack is not None: # rm Transactions don't have pkgSack
self.tsInfo.pkgSack.dropCachedData()
self.rpmdb.dropCachedData()
@@ -887,6 +883,21 @@ class YumBase(depsolve.Depsolve):
self.verbose_logger.debug('Depsolve time: %0.3f' % (time.time() - ds_st))
return rescode, restring
+ def _doSkipBroken(self,rescode, restring, clear_skipped=True):
+ ''' do skip broken if it is enabled '''
+ # if depsolve failed and skipbroken is enabled
+ # The remove the broken packages from the transactions and
+ # Try another depsolve
+ if self.conf.skip_broken and rescode==1:
+ if clear_skipped:
+ self.skipped_packages = [] # reset the public list of skipped packages.
+ sb_st = time.time()
+ rescode, restring = self._skipPackagesWithProblems(rescode, restring)
+ self._printTransaction()
+ self.verbose_logger.debug('Skip-Broken time: %0.3f' % (time.time() - sb_st))
+ return (rescode, restring)
+
+
def _skipPackagesWithProblems(self, rescode, restring):
''' Remove the packages with depsolve errors and depsolve again '''
@@ -983,7 +994,7 @@ class YumBase(depsolve.Depsolve):
for po in skipped_list:
msg = _(" %s from %s") % (str(po),po.repo.id)
self.verbose_logger.info(msg)
- self.skipped_packages = skipped_list # make the skipped packages public
+ self.skipped_packages.extend(skipped_list) # make the skipped packages public
else:
# If we cant solve the problems the show the original error messages.
self.verbose_logger.info("Skip-broken could not solve problems")

83
yum-manpage-files.patch Normal file
View file

@ -0,0 +1,83 @@
commit 102915d4d402493c48d434ae1d1756225c4468e0
Author: James Antill <james@and.org>
Date: Mon Jun 14 01:15:21 2010 -0400
Port manpage files path fixups.
diff --git a/docs/yum.8 b/docs/yum.8
index d5ede0a..3bdb408 100644
--- a/docs/yum.8
+++ b/docs/yum.8
@@ -568,7 +568,7 @@ option in yum.conf. For a plugin to work, the following conditions must be met:
1. The plugin module file must be installed in the plugin path as just
described.
.LP
-2. The global \fBplugins\fP option in /etc/yum/yum.conf must be set to `1'.
+2. The global \fBplugins\fP option in /etc/yum.conf must be set to `1'.
.LP
3. A configuration file for the plugin must exist in
/etc/yum/pluginconf.d/<plugin_name>.conf and the \fBenabled\fR setting in this
@@ -584,9 +584,9 @@ configuration options.
.PP
.SH "FILES"
.nf
-/etc/yum/yum.conf
+/etc/yum.conf
/etc/yum/version-groups.conf
-/etc/yum/repos.d/
+/etc/yum.repos.d/
/etc/yum/pluginconf.d/
/var/cache/yum/
.fi
diff --git a/docs/yum.conf.5 b/docs/yum.conf.5
index ca36103..42815b9 100644
--- a/docs/yum.conf.5
+++ b/docs/yum.conf.5
@@ -4,10 +4,10 @@
\fByum.conf\fR \- Configuration file for \fByum(8)\fR.
.SH "DESCRIPTION"
.LP
-Yum uses a configuration file at \fB/etc/yum/yum.conf\fR.
+Yum uses a configuration file at \fB/etc/yum.conf\fR.
.LP
Additional configuration files are also read from the directories set by the
-\fBreposdir\fR option (default is `/etc/yum/repos.d').
+\fBreposdir\fR option (default is `/etc/yum.repos.d').
See the \fBreposdir\fR option below for further details.
.SH "PARAMETERS"
@@ -42,10 +42,10 @@ of headers and packages after successful installation. Default is '1'
.IP
\fBreposdir\fR
A list of directories where yum should look for .repo files which define
-repositories to use. Default is `/etc/yum/repos.d'. Each
+repositories to use. Default is `/etc/yum.repos.d'. Each
file in this directory should contain one or more repository sections as
documented in \fB[repository] options\fR below. These will be merged with the
-repositories defined in /etc/yum/yum.conf to form the complete set of
+repositories defined in /etc/yum.conf to form the complete set of
repositories that yum will use.
.IP
@@ -745,8 +745,8 @@ for any given command. Defaults to False.
.SH "URL INCLUDE SYNTAX"
.LP
-The inclusion of external configuration files is supported for /etc/yum/yum.conf
-and the .repo files in the /etc/yum/repos.d directory. To include a URL, use a
+The inclusion of external configuration files is supported for /etc/yum.conf
+and the .repo files in the /etc/yum.repos.d directory. To include a URL, use a
line of the following format:
include=url://to/some/location
@@ -812,8 +812,8 @@ data in any value.
.SH "FILES"
.nf
-/etc/yum/yum.conf
-/etc/yum/repos.d/
+/etc/yum.conf
+/etc/yum.repos.d/
/etc/yum/pluginconf.d/
/etc/yum/protected.d
/etc/yum/vars

11
yum-mirror-priority.patch Normal file
View file

@ -0,0 +1,11 @@
--- yum/config.py~ 2008-03-04 16:21:49.000000000 -0500
+++ yum/config.py 2008-03-04 16:21:49.000000000 -0500
@@ -582,7 +582,7 @@
commands = ListOption()
exclude = ListOption()
- failovermethod = Option('roundrobin')
+ failovermethod = Option('priority')
proxy = UrlOption(schemes=('http', 'ftp', 'https'), allow_none=True)
proxy_username = Option()
proxy_password = Option()

View file

@ -0,0 +1,11 @@
--- yum/config.py~ 2009-10-14 15:52:38.000000000 -0400
+++ yum/config.py 2009-10-14 15:59:57.000000000 -0400
@@ -670,7 +670,7 @@
# similar but better :).
mdpolicy = ListOption(['group:primary'])
# ('instant', 'group:all', 'group:main', 'group:small', 'group:primary'))
- multilib_policy = SelectionOption('all',('best', 'all'))
+ multilib_policy = SelectionOption('best',('best', 'all'))
# all == install any/all arches you can
# best == use the 'best arch' for the system

15
yum-updatesd.conf.fedora Normal file
View file

@ -0,0 +1,15 @@
[main]
# how often to check for new updates (in seconds)
run_interval = 3600
# how often to allow checking on request (in seconds)
updaterefresh = 600
# how to send notifications (valid: dbus, email, syslog)
emit_via = dbus
# automatically install updates
do_update = no
# automatically download updates
do_download = no
# automatically download deps of updates
do_download_deps = no

23
yum.conf.fedora Normal file
View file

@ -0,0 +1,23 @@
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
# This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
# It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

447
yum.spec Normal file
View file

@ -0,0 +1,447 @@
%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Summary: RPM installer/updater
Name: yum
Version: 3.2.28
Release: 5%{?dist}
License: GPLv2+
Group: System Environment/Base
Source0: http://yum.baseurl.org/download/3.2/%{name}-%{version}.tar.gz
Source1: yum.conf.fedora
Source2: yum-updatesd.conf.fedora
Patch0: installonlyn-enable.patch
Patch1: yum-mirror-priority.patch
Patch3: yum-multilib-policy-best.patch
Patch4: no-more-exactarchlist.patch
Patch5: geode-arch.patch
Patch6: yum-HEAD.patch
Patch7: yum-PK-auto-close-fix.patch
Patch20: yum-manpage-files.patch
URL: http://yum.baseurl.org/
BuildArch: noarch
BuildRequires: python
BuildRequires: gettext
BuildRequires: intltool
Conflicts: pirut < 1.1.4
Requires: python >= 2.4, rpm-python, rpm >= 0:4.4.2
Requires: python-iniparse
Requires: python-sqlite
Requires: python-urlgrabber >= 3.9.0-8
Requires: yum-metadata-parser >= 1.1.0
Requires: pygpgme
Obsoletes: yum-skip-broken <= 1.1.18
Obsoletes: yum-basearchonly <= 1.1.9
Obsoletes: yum-plugin-basearchonly <= 1.1.24
Obsoletes: yum-allow-downgrade < 1.1.20-0
Obsoletes: yum-plugin-allow-downgrade < 1.1.22-0
Obsoletes: yum-plugin-protect-packages < 1.1.27-0
Obsoletes: yum-plugin-download-order <= 0.2-2
Provides: yum-skip-broken
Provides: yum-basearchonly
Provides: yum-allow-downgrade
Provides: yum-plugin-allow-downgrade
Provides: yum-protect-packages
Provides: yum-plugin-protect-packages
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
Yum is a utility that can check for and automatically download and
install updated RPM packages. Dependencies are obtained and downloaded
automatically, prompting the user for permission as necessary.
%package updatesd
Summary: Update notification daemon
Group: Applications/System
Requires: yum = %{version}-%{release}
Requires: dbus-python
Requires: pygobject2
Requires(preun): /sbin/chkconfig
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/service
Requires(post): /sbin/service
%description updatesd
yum-updatesd provides a daemon which checks for available updates and
can notify you when they are available via email, syslog or dbus.
%prep
%setup -q
%patch1 -p0
%patch3 -p0
%patch4 -p0
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch20 -p1
%build
make
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/yum.conf
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/yum/pluginconf.d $RPM_BUILD_ROOT/usr/lib/yum-plugins
# for now, move repodir/yum.conf back
mv $RPM_BUILD_ROOT/%{_sysconfdir}/yum/repos.d $RPM_BUILD_ROOT/%{_sysconfdir}/yum.repos.d
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/yum/yum.conf
# yum-updatesd has moved to the separate source version
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/yum/yum-updatesd.conf
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/yum-updatesd
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/dbus-1/system.d/yum-updatesd.conf
rm -f $RPM_BUILD_ROOT/%{_sbindir}/yum-updatesd
rm -f $RPM_BUILD_ROOT/%{_mandir}/man*/yum-updatesd*
rm -f $RPM_BUILD_ROOT/%{_datadir}/yum-cli/yumupd.py*
# Ghost files:
mkdir -p $RPM_BUILD_ROOT/var/lib/yum/history
mkdir -p $RPM_BUILD_ROOT/var/lib/yum/plugins
mkdir -p $RPM_BUILD_ROOT/var/lib/yum/yumdb
touch $RPM_BUILD_ROOT/var/lib/yum/uuid
%find_lang %name
%clean
rm -rf $RPM_BUILD_ROOT
%files -f %{name}.lang
%defattr(-, root, root, -)
%doc README AUTHORS COPYING TODO INSTALL ChangeLog
%config(noreplace) %{_sysconfdir}/yum.conf
%dir %{_sysconfdir}/yum
%config(noreplace) %{_sysconfdir}/yum/version-groups.conf
%dir %{_sysconfdir}/yum/protected.d
%dir %{_sysconfdir}/yum.repos.d
%dir %{_sysconfdir}/yum/vars
%config(noreplace) %{_sysconfdir}/logrotate.d/yum
%{_sysconfdir}/bash_completion.d
%dir %{_datadir}/yum-cli
%{_datadir}/yum-cli/*
%{_bindir}/yum
%{python_sitelib}/yum
%{python_sitelib}/rpmUtils
%dir /var/cache/yum
%dir /var/lib/yum
%ghost /var/lib/yum/uuid
%ghost /var/lib/yum/history
%ghost /var/lib/yum/plugins
%ghost /var/lib/yum/yumdb
%{_mandir}/man*/yum.*
%{_mandir}/man*/yum-shell*
# plugin stuff
%dir %{_sysconfdir}/yum/pluginconf.d
%dir /usr/lib/yum-plugins
%changelog
* Tue Sep 14 2010 James Antill <james at fedoraproject.org> - 3.2.28-4
- Fix auto-close bug with GPG key installs.
- Resolves: bug#622179
- Fix obsoletes on basearchonly.
- Resolves: bug#629138
* Fri Aug 27 2010 Seth Vidal <skvidal at fedoraproject.org>
- obsoleted yum-plugin-download-order
* Thu Aug 12 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.2.28-3
- latest head
- fix gpg key import
- more unicode fixes
- output slightly more clear depsovling error msgs
- sync up spec file with f13,f14
* Mon Aug 9 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.2.28-2
- fixes sqlite historydb conversion bug
- patches up some unicide issues
* Fri Jul 30 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.2.28-1
- 3.2.28
* Thu Apr 8 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.2.27-3
- fix regets on metadata when we run into an old file that's larger
than the new one
* Tue Mar 23 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.2.27-2
- broke searching in PK, this patch fixes it.
* Thu Mar 18 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.2.27-1
- update to 3.2.27 - lots of fixes since 3.2.26
* Thu Mar 4 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.2.26-3
- up to head-as-f13-has and include the skip-broken fix
* Wed Feb 10 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.2.26-2
- grumble.
* Tue Feb 9 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.2.26-1
- final 3.2.26
* Wed Oct 14 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.25-1
- 3.2.25
* Wed Sep 30 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.24-9
- revert yum. import patch b/c it breaks a bunch of things
* Wed Sep 30 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.24-8
- fix up broken build b/c of version-groups.conf file
* Tue Sep 29 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.24-7
- fixes for odd outputs from ts.run and logs for what we store in history
* Wed Sep 23 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.24-6
- new head patch - fixes some issues with history and chroots
* Mon Sep 21 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.24-5
- latest head patch - includes yum history feature.
* Tue Sep 15 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.24-4
- new head patch - translation updates and a few bug fixes
* Wed Sep 9 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.24-3
- add geode arch patch for https://bugzilla.redhat.com/show_bug.cgi?id=518415
* Thu Sep 3 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.24-2
- modify cachedir to include variables
* Thu Sep 3 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.24-1
- 3.2.24
* Wed Sep 2 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.23-16
- fix globbing issue 520810
* Mon Aug 31 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.23-15
- one more head update - fixes some fairly ugly but kind of minor bugs
* Tue Aug 18 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.23-14
- update to latest head pre 3.2.24
- add requirement on python-urlgrabber 3.9.0 and up
* Wed Aug 5 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.23-13
- latest head - right after freeze
* Tue Aug 4 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.23-12
- latest head - right before freeze :)
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.23-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Wed Jul 22 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.23-10
- remove exactarchlist by request for rawhide
* Thu Jul 2 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.23-9
- update to latest head - make livecd creation work again in rawhide
- disable one of the man page patches until after 3.2.24 is released b/c
of the changes to the man page in the head patch
* Mon Jun 22 2009 James Antill <james at fedoraproject.org> - 3.2.23-8
- Update to latest head:
- Fix old recursion bug, found by new code.
- Resolves: bug#507220
* Sun Jun 21 2009 James Antill <james at fedoraproject.org> - 3.2.23-6
- Update to latest head:
- Unbreak delPackage() excludes.
- Other fixes/etc.
* Fri Jun 19 2009 James Antill <james at fedoraproject.org> - 3.2.23-5
- Actually apply the HEAD patch included yesterday :).
* Thu Jun 18 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.23-4
- update to latest head
* Mon Jun 8 2009 Seth Vidal <skvidal at fedoraproject.org>
- truncate changelog
* Wed May 20 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.23-2
- add patch to close rpmdb completely
* Tue May 19 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.23-1
- 3.2.23
* Mon May 11 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.22-5
- jump up to almost 3.2.23.
- had to move patch0 around a bit until we rebase to 3.2.23
* Thu Apr 9 2009 James Antill <james at fedoraproject.org> - 3.2.22-4
- fix typo for yum-complete-transaction message.
* Wed Apr 8 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.22-3
- fix for file:// urls which makes things in pungi/mash work
* Tue Apr 7 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.22-2
- yum-HEAD minus the yumdb patches
* Tue Mar 24 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.22-1
- 3.2.22 - 3 patches beyond 3.2.21-16
* Mon Mar 16 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.21-16
- fix for 490490
* Fri Mar 13 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.21-15
- update to upstream git to fix conditionals problem on anaconda installs
* Thu Mar 12 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.21-14
- latest HEAD
* Tue Mar 10 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.21-13
- f11beta build
* Wed Mar 4 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.21-12
- second verse, same as the first
* Fri Feb 27 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.21-10
- merge up a lot of fixes from latest HEAD
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.21-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Tue Feb 10 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.21-9
- merge up to latest yum head - sort of a pre 3.2.22
* Wed Feb 4 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.21-8
- fix for YumHeaderPackages so it plays nicely w/createrepo and mergerepo, etc
* Thu Jan 29 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.21-7
- update HEAD patch to fix repodiff (and EVR comparisons in certain cases)
* Tue Jan 27 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.21-6
- patch to keep anaconda (and other callers) happy
- remove old 6hr patch which is now upstream
* Mon Jan 26 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.21-4
- patch to latest HEAD to test a number of fixes for alpha
* Tue Jan 20 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.21-3
- add a small patch to make things play a bit nicer with the logging module
in 2.6
* Wed Jan 7 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.2.21-1
- bump to 3.2.21
* Thu Dec 18 2008 James Antill <james@fedoraproject.org> - 3.2.20-8
- merge latest from upstream
- move to 6hr metadata
* Mon Dec 8 2008 Seth Vidal <skvidal at fedoraproject.org> - 3.2.20-7
- merge patch from upstream and remove now old obsoletes patch
* Thu Dec 04 2008 Jesse Keating <jkeating@redhat.com> - 3.2.20-6
- Add patch from upstream to fix cases where obsoletes are disabled. (jantill)
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 3.2.20-5
- Rebuild for Python 2.6
* Wed Nov 26 2008 Seth Vidal <skvidal at fedoraproject.org> - 3.2.20-4
- update head patch
* Wed Oct 29 2008 Seth Vidal <skvidal at fedoraproject.org> - 3.2.20-3
- full patch against HEAD for skipbroken fixes (among others)
* Mon Oct 27 2008 James Antill <james@fedoraproject.org> - 3.2.20-2
- Fix listTransaction for skipped packages.
* Mon Oct 27 2008 Seth Vidal <skvidal at fedoraproject.org> - 3.2.20-1
- 3.2.20
* Thu Oct 23 2008 Seth Vidal <skvidal at fedoraproject.org> - 3.2.19-6
- update HEAD patch
* Wed Oct 15 2008 Seth Vidal <skvidal at fedoraproject.org> - 3.2.19-5
- rebase against 3.2.X HEAD
* Tue Oct 14 2008 Seth Vidal <skvidal at fedoraproject.org> - 3.2.19-4
- pull patch from git to bring us up to current(ish)
* Wed Sep 3 2008 Seth Vidal <skvidal at fedoraproject.org> - 3.2.19-3
- add patch to fix yum install name.arch matching
* Thu Aug 28 2008 Seth Vidal <skvidal at fedoraproject.org> - 3.2.19-2
- add patch to fix mash's parser use.
* Wed Aug 27 2008 Seth Vidal <skvidal at fedoraproject.org> - 3.2.19-1
- 3.2.19
* Thu Aug 7 2008 Seth Vidal <skvidal at fedoraproject.org> - 3.2.18-1
- 3.2.18
* Wed Jul 10 2008 Seth Vidal <skvidal@fedoraproject.org> - 3.2.17-2
- add patch from upstream for bug in compare_providers
* Wed Jul 9 2008 Seth Vidal <skvidal@fedoraproject.org> - 3.2.17-1
- 3.2.17
* Tue Jun 24 2008 Jesse Keating <jkeating@redhat.com> - 3.2.16-4
- Add a couple more upstream patches for even more multilib fixes
* Tue Jun 24 2008 Jesse Keating <jkeating@redhat.com> - 3.2.16-3
- Add another patch from upstream for multilib policy and noarch
* Sun May 18 2008 Seth Vidal <skvidal at fedoraproject.org> 3.2.16-2
- stupid, stupid, stupid
* Fri May 16 2008 Seth Vidal <skvidal at fedoraproject.org> 3.2.16-1
- 3.2.16
* Tue Apr 15 2008 Seth Vidal <skvidal at fedoraproject.org> 3.2.14-9
- nine is the luckiest number that there will ever be
* Tue Apr 15 2008 Seth Vidal <skvidal at fedoraproject.org> 3.2.14-8
- after many tries - this one fixes translations AND pungi
* Thu Apr 10 2008 Seth Vidal <skvidal at fedoraproject.org> 3.2.14-5
- once more, with feeling
* Thu Apr 10 2008 Seth Vidal <skvidal at fedoraproject.org> 3.2.14-4
- another big-head-patch
* Wed Apr 9 2008 Seth Vidal <skvidal at fedoraproject.org> 3.2.14-3
- apply patch to bring this up to where HEAD is now.
* Tue Apr 8 2008 Seth Vidal <skvidal at fedoraproject.org> 3.2.14-1
- remove committed patch
- obsoletes yum-basearchonly
* Tue Apr 1 2008 Seth Vidal <skvidal at fedoraproject.org> 3.2.13-2
- fix minor typo in comps.py for jkeating
* Thu Mar 20 2008 Seth Vidal <skvidal at fedoraproject.org> 3.2.13-1
- 3.2.13
* Mon Mar 17 2008 Seth Vidal <skvidal at fedoraproject.org> 3.2.12-5
- update manpage patch to close bug 437703. Thakns to Kulbir Saini for the patch
* Fri Mar 14 2008 Seth Vidal <skvidal at fedoraproject.org> 3.2.12-4
- multilib_policy=best is now the default
* Thu Mar 13 2008 Seth Vidal <skvidal at fedoraproject.org>
- add jeff sheltren's patch to close rh bug 428825
* Tue Mar 4 2008 Seth Vidal <skvidal at fedoraproject.org> 3.2.12-3
- set failovermethod to 'priority' to make jkeating happy
* Tue Mar 4 2008 Seth Vidal <skvidal at fedoraproject.org> 3.2.12-2
- fix mutually obsoleting providers (like glibc!)
* Mon Mar 3 2008 Seth Vidal <skvidal at fedoraproject.org> - 3.2.12-1
- 3.2.12
* Fri Feb 8 2008 Seth Vidal <skvidal at fedoraproject.org> - 3.2.11-1
- 3.2.11
* Sun Jan 27 2008 James Bowes <jbowes@redhat.com> 3.2.10-3
- Remove yumupd.py
* Fri Jan 25 2008 Seth Vidal <skvidal at fedoraproject.org> - 3.2.10-1
- 3.2.10
- add pygpgme dep