Hello community,
here is the log from the commit of package yum
checked in at Wed Aug 29 22:53:32 CEST 2007.
--------
--- yum/yum.changes 2007-08-23 15:22:19.000000000 +0200
+++ /mounts/work_src_done/STABLE/yum/yum.changes 2007-08-29 19:57:32.934651000 +0200
@@ -1,0 +2,9 @@
+Wed Aug 29 19:58:37 CEST 2007 - cthiel@suse.de
+
+- update to version 3.2.4
+ * So, yum 3.2.3 had a few issues that needed some immediate addressing.
+ Mostly the depsolving was still off by a couple and a few output
+ situations blew up using the new transaction callbacks. But never fear,
+ it, and an array of other items have been addressed in 3.2.4 :)
+
+-------------------------------------------------------------------
Old:
----
yum-3.2.3.tar.bz2
New:
----
yum-3.2.4.tar.bz2
yum-HEAD.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yum.spec ++++++
--- /var/tmp/diff_new_pack.qB9818/_old 2007-08-29 22:51:45.000000000 +0200
+++ /var/tmp/diff_new_pack.qB9818/_new 2007-08-29 22:51:45.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yum (Version 3.2.3)
+# spec file for package yum (Version 3.2.4)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,7 +12,7 @@
Name: yum
BuildRequires: python-devel
-Version: 3.2.3
+Version: 3.2.4
Release: 1
Summary: RPM installer/updater
Group: System/Packages
@@ -24,6 +24,7 @@
Patch: %{name}-no_updatesd.patch
Patch2: %{name}-3.1.7.patch
Patch3: %{name}-3.2.2.patch
+Patch4: %{name}-HEAD.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: rpm >= 4.4.0
Requires: rpm-python
@@ -53,6 +54,7 @@
%patch
%patch2
%patch3
+%patch4 -p1
%ifnarch %{ix86}
for i in rpmUtils yum
do
@@ -71,6 +73,7 @@
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/yum.conf
mv $RPM_BUILD_ROOT/%{_sysconfdir}/yum/repos.d $RPM_BUILD_ROOT/%{_sysconfdir}/yum.repos.d
rm -rf $RPM_BUILD_ROOT/%{_sysconfdir}/yum
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/yum/pluginconf.d/ $RPM_BUILD_ROOT/usr/lib/yum-plugins/
%if %{suse_version} >= 1000 && %{suse_version} < 1030 && %sles_version == 0
cp $RPM_BUILD_DIR/repos/%{suse_version}* $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d
rename %{suse_version} opensuse $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d/*.repo
@@ -97,8 +100,16 @@
%{_datadir}/yum-cli
%{_bindir}/*
%{py_sitedir}/*
+%dir %{_sysconfdir}/yum/pluginconf.d
+%dir /usr/lib/yum-plugins
%changelog
+* Wed Aug 29 2007 - cthiel@suse.de
+- update to version 3.2.4
+ * So, yum 3.2.3 had a few issues that needed some immediate addressing.
+ Mostly the depsolving was still off by a couple and a few output
+ situations blew up using the new transaction callbacks. But never fear,
+ it, and an array of other items have been addressed in 3.2.4 :)
* Thu Aug 23 2007 - cthiel@suse.de
- update to version 3.2.3
* If you find a transaction aborted before it finished (or your computer
++++++ yum-3.2.3.tar.bz2 -> yum-3.2.4.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-3.2.3/ChangeLog new/yum-3.2.4/ChangeLog
--- old/yum-3.2.3/ChangeLog 2007-08-22 22:36:40.000000000 +0200
+++ new/yum-3.2.4/ChangeLog 2007-08-29 00:29:08.000000000 +0200
@@ -1,3 +1,70 @@
+2007-08-28 Seth Vidal
+
+ * yum.spec, yum/__init__.py: mark as 3.2.4
+
+2007-08-28 Seth Vidal
+
+ * yum/__init__.py, yum/config.py, yum/plugins.py, yum/yumRepo.py:
+ merge patch to use iniparser and allow better interaction to .repo
+ files from Debarishi Ray
+
+2007-08-24 Jeremy Katz
+
+ * yum/depsolve.py: if we have two versions of a package and a compat
+ package available in our repo, we can set the old version to be
+ installed first, then the new one replaces the old one. but we
+ never go back and check for what required the provides of the old
+ one and get something else (like the compat package)
+
+2007-08-24 Jeremy Katz
+
+ * yum/depsolve.py: fix depchecking on members removed from the ts
+
+2007-08-24 Seth Vidal
+
+ * yum/plugins.py: This patch should fix the case of people calling
+ doPluginSetup() etc. with a non-list argument - From James Antill
+
+2007-08-24 Seth Vidal
+
+ * yum/__init__.py, yum/comps.py: if group file is empty or damaged
+ in a repository, treat it like a missing groups file and skip it.
+ Push out an error about it, though.
+
+2007-08-24 Seth Vidal
+
+ * yum/comps.py: make groupinfo work when the description is empty
+
+2007-08-24 Tim Lauridsen
+
+ * yum/__init__.py: Moved _run_rpm_check_debug into YumBase, so that
+ processTransaction can do the rpm check
+
+2007-08-23 Seth Vidal
+
+ Merge branch 'master' of
+ ssh://login.linux.duke.edu/home/groups/yum/git/yum * 'master' of
+ ssh://login.linux.duke.edu/home/groups/yum/git/yum: Reworked the
+ processTransaction callback a little.
+
+2007-08-23 Seth Vidal
+
+ * output.py: bug in cli output transacation callback. closes rh bug
+ #253955
+
+2007-08-23 Tim Lauridsen
+
+ * yum/__init__.py, yum/callbacks.py: Reworked the processTransaction
+ callback a little. * Added yum/callbacks.py with callback classes to
+ use with processTransaction * Dont parse strings to callback, use
+ some flags insted * Dont call the callbacks at both start/end of
+ each step, only at start
+
+2007-08-22 Seth Vidal
+
+ * ChangeLog: merge Changelog for 3.2.3 - new git2cl-format -please
+ forgive the massive changeset
+
2007-08-22 Seth Vidal
* yum/packages.py: make sure yum local packages have an 'id'
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-3.2.3/output.py new/yum-3.2.4/output.py
--- old/yum-3.2.3/output.py 2007-08-14 14:39:56.000000000 +0200
+++ new/yum-3.2.4/output.py 2007-08-23 14:25:34.000000000 +0200
@@ -482,7 +482,7 @@
else:
percent = (te_current*100L)/te_total
- if self.output and (sys.stdout.isatty() or bytes == total):
+ if self.output and (sys.stdout.isatty() or te_current == te_total):
fmt = self._makefmt(percent, ts_current, ts_total)
msg = fmt % (process, pkgname)
if msg != self.lastmsg:
Files old/yum-3.2.3/test/depsolvetests.pyc and new/yum-3.2.4/test/depsolvetests.pyc differ
Files old/yum-3.2.3/test/packagetests.pyc and new/yum-3.2.4/test/packagetests.pyc differ
Files old/yum-3.2.3/test/settestpath.pyc and new/yum-3.2.4/test/settestpath.pyc differ
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-3.2.3/yum/callbacks.py new/yum-3.2.4/yum/callbacks.py
--- old/yum-3.2.3/yum/callbacks.py 1970-01-01 01:00:00.000000000 +0100
+++ new/yum-3.2.4/yum/callbacks.py 2007-08-23 14:26:39.000000000 +0200
@@ -0,0 +1,48 @@
+#!/usr/bin/python -tt
+# 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 Library General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# imports
+
+import logging
+
+# ProcessTransaction States
+
+PT_DOWNLOAD = 0
+PT_GPGCHECK = 1
+PT_TEST_TRANS = 2
+PT_TRANSACTION = 3
+
+PT_MESSAGES = { PT_DOWNLOAD : "Downloading Packages",
+ PT_GPGCHECK : "Check Package Signatures",
+ PT_TEST_TRANS : "Running Test Transaction",
+ PT_TRANSACTION : "Running Transaction"}
+
+
+
+class ProcessTransBaseCallback:
+
+ def __init__(self):
+ self.logger = logging.getLogger('yum.verbose.ProcessTrasactionBaseCallback')
+
+ def event(self,state):
+ self.logger.info(PT_MESSAGES[state])
+
+class ProcessTransNoOutputCallback:
+ def __init__(self):
+ pass
+
+ def event(self,state):
+ pass
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-3.2.3/yum/comps.py new/yum-3.2.4/yum/comps.py
--- old/yum-3.2.3/yum/comps.py 2007-07-25 17:05:44.000000000 +0200
+++ new/yum-3.2.4/yum/comps.py 2007-08-24 18:16:23.000000000 +0200
@@ -21,7 +21,8 @@
import cElementTree
iterparse = cElementTree.iterparse
from Errors import CompsException
-
+#FIXME - compsexception isn't caught ANYWHERE so it's pointless to raise it
+# switch all compsexceptions to grouperrors after api break
lang_attr = '{http://www.w3.org/XML/1998/namespace}lang'
@@ -113,7 +114,8 @@
if lang:
self.translated_description[lang] = text
else:
- self.description = text
+ if text:
+ self.description = text
elif child.tag == 'uservisible':
self.user_visible = parse_boolean(child.text)
@@ -345,24 +347,27 @@
self.compiled = False
parser = iterparse(infile)
-
- for event, elem in parser:
- if elem.tag == "group":
- group = Group(elem)
- if self._groups.has_key(group.groupid):
- thatgroup = self._groups[group.groupid]
- thatgroup.add(group)
- else:
- self._groups[group.groupid] = group
-
- if elem.tag == "category":
- category = Category(elem)
- if self._categories.has_key(category.categoryid):
- thatcat = self._categories[category.categoryid]
- thatcat.add(category)
- else:
- self._categories[category.categoryid] = category
-
+ try:
+ for event, elem in parser:
+ if elem.tag == "group":
+ group = Group(elem)
+ if self._groups.has_key(group.groupid):
+ thatgroup = self._groups[group.groupid]
+ thatgroup.add(group)
+ else:
+ self._groups[group.groupid] = group
+
+ if elem.tag == "category":
+ category = Category(elem)
+ if self._categories.has_key(category.categoryid):
+ thatcat = self._categories[category.categoryid]
+ thatcat.add(category)
+ else:
+ self._categories[category.categoryid] = category
+ except SyntaxError, e:
+ raise CompsException, "comps file is empty/damaged"
+ del parser
+
del parser
def compile(self, pkgtuplist):
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-3.2.3/yum/config.py new/yum-3.2.4/yum/config.py
--- old/yum-3.2.3/yum/config.py 2007-08-17 07:46:51.000000000 +0200
+++ new/yum-3.2.4/yum/config.py 2007-08-28 19:38:39.000000000 +0200
@@ -21,7 +21,12 @@
import copy
import urlparse
from parser import ConfigPreProcessor
-from ConfigParser import NoSectionError, NoOptionError, ConfigParser, ParsingError
+try:
+ from iniparse.compat import NoSectionError, NoOptionError, ConfigParser
+ from iniparse.compat import ParsingError
+except ImportError:
+ from ConfigParser import NoSectionError, NoOptionError, ConfigParser
+ from ConfigParser import ParsingError
import rpmUtils.transaction
import rpmUtils.arch
import Errors
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-3.2.3/yum/depsolve.py new/yum-3.2.4/yum/depsolve.py
--- old/yum-3.2.3/yum/depsolve.py 2007-08-21 19:30:05.000000000 +0200
+++ new/yum-3.2.4/yum/depsolve.py 2007-08-25 15:40:05.000000000 +0200
@@ -407,7 +407,8 @@
(needname, needflags, needversion) = requirement
checkdeps = 0
missingdep = 0
-
+ upgraded = {}
+
#~ - if it's not available from some repository:
#~ - mark as unresolveable.
#
@@ -442,7 +443,7 @@
# installed or in the ts, and this isn't a package that allows multiple installs
# then if it's newer, fine - continue on, if not, then we're unresolveable
# cite it and exit
-
+
tspkgs = []
if not self.allowedMultipleInstalls(pkg):
# from ts
@@ -453,6 +454,8 @@
self.verbose_logger.log(logginglevels.DEBUG_2, msg)
provSack.delPackage(pkg)
continue
+ elif tspkg.po.EVR < pkg.EVR:
+ upgraded.setdefault(pkg.pkgtup, []).append(tspkg.pkgtup)
# from rpmdb
dbpkgs = self.rpmdb.searchNevra(name=pkg.name, arch=pkg.arch)
@@ -552,6 +555,12 @@
txmbr = self.tsInfo.addInstall(best)
txmbr.setAsDep()
+ # if we had other packages with this name.arch that we found
+ # before, they're not going to be installed anymore, so we
+ # should mark them to be re-checked
+ if upgraded.has_key(best.pkgtup):
+ map(lambda x: self.tsInfo.remove(x), upgraded[best.pkgtup])
+
checkdeps = 1
return checkdeps, missingdep
@@ -759,7 +768,9 @@
CheckDeps = False
CheckInstalls = False
CheckRemoves = False
- for txmbr in self.tsInfo.getMembers() + self.tsInfo.getRemovedMembers():
+ # we need to check the opposite of install and remove for regular
+ # tsInfo members vs removed members
+ for (txmbr, inst, rem) in map(lambda x: (x, TS_INSTALL_STATES, TS_REMOVE_STATES), self.tsInfo.getMembers()) + map(lambda x: (x, TS_REMOVE_STATES, TS_INSTALL_STATES), self.tsInfo.getRemovedMembers()):
if (self._dcobj.already_seen_removed.has_key(txmbr) or
(txmbr.ts_state is not None and self._dcobj.already_seen.has_key(txmbr))):
continue
@@ -769,10 +780,10 @@
self.verbose_logger.log(logginglevels.DEBUG_2,
"Checking deps for %s" %(txmbr,))
- if txmbr.output_state in TS_INSTALL_STATES:
+ if txmbr.output_state in inst:
thisneeds = self._checkInstall(txmbr)
CheckInstalls = True
- elif txmbr.output_state in TS_REMOVE_STATES:
+ elif txmbr.output_state in rem:
thisneeds = self._checkRemove(txmbr)
CheckRemoves = True
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-3.2.3/yum/__init__.py new/yum-3.2.4/yum/__init__.py
--- old/yum-3.2.3/yum/__init__.py 2007-08-22 06:07:46.000000000 +0200
+++ new/yum-3.2.4/yum/__init__.py 2007-08-28 20:45:13.000000000 +0200
@@ -26,7 +26,10 @@
import fnmatch
import logging
import logging.config
-from ConfigParser import ParsingError, ConfigParser
+try:
+ from iniparse.compat import ParsingError, ConfigParser
+except ImportError:
+ from ConfigParser import ParsingError, ConfigParser
import Errors
import rpmsack
import rpmUtils.updates
@@ -45,6 +48,7 @@
import plugins
import logginglevels
import yumRepo
+import callbacks
import warnings
warnings.simplefilter("ignore", Errors.YumFutureDeprecationWarning)
@@ -53,7 +57,7 @@
from constants import *
from yum.rpmtrans import RPMTransaction,SimpleCliCallBack
-__version__ = '3.2.3'
+__version__ = '3.2.4'
class YumBase(depsolve.Depsolve):
"""This is a primary structure and base class. It houses the objects and
@@ -186,7 +190,6 @@
#FIXME this method could be a simpler
- reposlist = []
# Check yum.conf for repositories
for section in self.conf.cfg.sections():
# All sections except [main] are repositories
@@ -199,13 +202,17 @@
self.logger.warning(e)
else:
thisrepo.repo_config_age = self.conf.config_file_age
- reposlist.append(thisrepo)
+ thisrepo.repofile = self.conf.config_file_path
+
+ try:
+ self._repos.add(thisrepo)
+ except Errors.RepoError, e:
+ self.logger.warning(e)
# Read .repo files from directories specified by the reposdir option
# (typically /etc/yum/repos.d)
repo_config_age = self.conf.config_file_age
- parser = ConfigParser()
for reposdir in self.conf.reposdir:
if os.path.exists(self.conf.installroot+'/'+reposdir):
reposdir = self.conf.installroot + '/' + reposdir
@@ -213,33 +220,33 @@
if os.path.isdir(reposdir):
for repofn in glob.glob('%s/*.repo' % reposdir):
thisrepo_age = os.stat(repofn)[8]
- if thisrepo_age > repo_config_age:
- repo_config_age = thisrepo_age
+ if thisrepo_age < repo_config_age:
+ thisrepo_age = repo_config_age
confpp_obj = ConfigPreProcessor(repofn, vars=self.yumvar)
+ parser = ConfigParser()
try:
parser.readfp(confpp_obj)
except ParsingError, e:
msg = str(e)
raise Errors.ConfigError, msg
+
+ # Check sections in the .repo file that was just slurped up
+ for section in parser.sections():
+ try:
+ thisrepo = self.readRepoConfig(parser, section)
+ except (Errors.RepoError, Errors.ConfigError), e:
+ self.logger.warning(e)
+ else:
+ thisrepo.repo_config_age = thisrepo_age
+ thisrepo.repofile = repofn
- # Check sections in the .repo files that were just slurped up
- for section in parser.sections():
- try:
- thisrepo = self.readRepoConfig(parser, section)
- except (Errors.RepoError, Errors.ConfigError), e:
- self.logger.warning(e)
- else:
- thisrepo.repo_config_age = repo_config_age
- reposlist.append(thisrepo)
-
- # Got our list of repo objects, add them to the repos collection
- for thisrepo in reposlist:
- try:
- self._repos.add(thisrepo)
- except Errors.RepoError, e:
- self.logger.warning(e)
- continue
+ # Got our list of repo objects, add them to the repos
+ # collection
+ try:
+ self._repos.add(thisrepo)
+ except Errors.RepoError, e:
+ self.logger.warning(e)
def readRepoConfig(self, parser, section):
'''Parse an INI file section for a repository.
@@ -489,8 +496,9 @@
groupfile = repo.getGroups()
try:
self._comps.add(groupfile)
- except Errors.GroupsError, e:
- self.logger.critical('Failed to add groups file for repository: %s' % repo)
+ except (Errors.GroupsError,Errors.CompsException), e:
+ msg = 'Failed to add groups file for repository: %s - %s' % (repo, str(e))
+ self.logger.critical(msg)
else:
repo.groups_added = True
@@ -2183,22 +2191,21 @@
@param rpmDisplay: Name of display class to use in RPM Transaction
'''
- action = "Download Packages"
- if callback: callback.event(action=action, state="Start")
+ if not callback:
+ callback = callbacks.ProcessTransNoOutputCallback()
+
+ # Download Packages
+ callback.event(callbacks.PT_DOWNLOAD)
pkgs = self._downloadPackages()
- if callback: callback.event(action=action, state="End")
- action = "Checking Signatures"
- if callback: callback.event(action=action, state="Start")
+ # Check Package Signatures
+ callback.event(callbacks.PT_GPGCHECK)
self._checkSignatures(pkgs)
- if callback: callback.event(action=action, state="End")
- action = "Test Transaction"
- if callback: callback.event(action=action, state="Start")
+ # Run Test Transaction
+ callback.event(callbacks.PT_TEST_TRANS)
self._doTestTransaction(display=rpmTestDisplay)
- if callback: callback.event(action=action, state="End")
- action = "Run Transaction"
- if callback: callback.event(action=action, state="Start")
+ # Run Transaction
+ callback.event(callbacks.PT_TRANSACTION)
self._doTransaction(display=rpmDisplay)
- if callback: callback.event(action=action, state="End")
def _downloadPackages(self):
''' Download the need packages in the Transaction '''
@@ -2300,4 +2307,27 @@
cb.display = display
self.runTransaction( cb=cb )
-
+ def _run_rpm_check_debug(self):
+ import rpm
+ results = []
+ # save our dsCallback out
+ dscb = self.dsCallback
+ self.dsCallback = None # dumb, dumb dumb dumb!
+ self.populateTs(test=1)
+ deps = self.ts.check()
+ for deptuple in deps:
+ ((name, version, release), (needname, needversion), flags,
+ suggest, sense) = deptuple
+ if sense == rpm.RPMDEP_SENSE_REQUIRES:
+ msg = 'Package %s needs %s, this is not available.' % \
+ (name, rpmUtils.miscutils.formatRequire(needname,
+ needversion, flags))
+ results.append(msg)
+ elif sense == rpm.RPMDEP_SENSE_CONFLICTS:
+ msg = 'Package %s conflicts with %s.' % \
+ (name, rpmUtils.miscutils.formatRequire(needname,
+ needversion, flags))
+ results.append(msg)
+ self.dsCallback = dscb
+ return results
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-3.2.3/yum/plugins.py new/yum-3.2.4/yum/plugins.py
--- old/yum-3.2.3/yum/plugins.py 2007-07-27 08:13:52.000000000 +0200
+++ new/yum-3.2.4/yum/plugins.py 2007-08-28 19:38:39.000000000 +0200
@@ -22,7 +22,10 @@
import logging
import logginglevels
from constants import *
-import ConfigParser
+try:
+ import iniparse.compat as ConfigParser
+except ImportError:
+ import ConfigParser
import config
import Errors
from parser import ConfigPreProcessor
@@ -129,8 +132,10 @@
self.cmdline = (None, None)
self.verbose_logger = logging.getLogger("yum.verbose.YumPlugins")
self.disabledPlugins = disabled
- if not types:
+ if types is None:
types = ALL_TYPES
+ if not isinstance(types, (list, tuple)):
+ types = (types,)
if id(TYPE_INTERFACE) in [id(t) for t in types]:
self.verbose_logger.log(logginglevels.INFO_2,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-3.2.3/yum/yumRepo.py new/yum-3.2.4/yum/yumRepo.py
--- old/yum-3.2.3/yum/yumRepo.py 2007-08-03 17:31:12.000000000 +0200
+++ new/yum-3.2.4/yum/yumRepo.py 2007-08-28 19:38:39.000000000 +0200
@@ -212,6 +212,7 @@
config.RepoConf.__init__(self)
Repository.__init__(self, repoid)
+ self.repofile = None
self._urls = []
self.enablegroups = 0
self.groupsfilename = 'yumgroups.xml' # something some freaks might
@@ -325,8 +326,31 @@
return output
- def enable(self):
- Repository.enable(self)
+ def enablePersistent(self):
+ """Persistently enables this repository."""
+ self.enable()
+ self.cfg.set(self.id, 'enabled', '1')
+
+ try:
+ self.cfg.write(file(self.repofile, 'w'))
+ except IOError, e:
+ if e.errno == 13:
+ self.logger.warning(e)
+ else:
+ raise IOError, str(e)
+
+ def disablePersistent(self):
+ """Persistently disables this repository."""
+ self.disable()
+ self.cfg.set(self.id, 'enabled', '0')
+
+ try:
+ self.cfg.write(file(self.repofile, 'w'))
+ except IOError, e:
+ if e.errno == 13:
+ self.logger.warning(e)
+ else:
+ raise IOError, str(e)
def check(self):
"""self-check the repo information - if we don't have enough to move
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-3.2.3/yum.spec new/yum-3.2.4/yum.spec
--- old/yum-3.2.3/yum.spec 2007-08-22 18:59:40.000000000 +0200
+++ new/yum-3.2.4/yum.spec 2007-08-28 20:45:57.000000000 +0200
@@ -1,6 +1,6 @@
Summary: RPM installer/updater
Name: yum
-Version: 3.2.3
+Version: 3.2.4
Release: 1
License: GPL
Group: System Environment/Base
@@ -15,6 +15,7 @@
Requires: python-sqlite
Requires: urlgrabber
Requires: yum-metadata-parser >= 1.1.0
+Requires: python-iniparse
Prereq: /sbin/chkconfig, /sbin/service, coreutils
@@ -91,6 +92,10 @@
%{_mandir}/man*/yum-updatesd*
%changelog
+* Tue Aug 28 2007 Seth Vidal <skvidal at fedoraproject.org>
+- 3.2.4
+- add python-iniparse - it's a dep here but yum will run w/o it
+
* Fri Jul 20 2007 Seth Vidal <skvidal at fedoraproject.org>
- 3.2.2
++++++ yum-HEAD.patch ++++++
diff --git a/yum/depsolve.py b/yum/depsolve.py
index 57933cb..4075116 100644
--- a/yum/depsolve.py
+++ b/yum/depsolve.py
@@ -822,7 +822,7 @@ class Depsolve(object):
continue
if req in provs:
continue
- if req in oldreqs:
+ if req in oldreqs and self.rpmdb.getProvides(*req):
continue
self.verbose_logger.log(logginglevels.DEBUG_2, "looking for %s as a requirement of %s", req, txmbr)
diff --git a/yum/packageSack.py b/yum/packageSack.py
index dc04d8f..894e3f7 100644
--- a/yum/packageSack.py
+++ b/yum/packageSack.py
@@ -65,11 +65,11 @@ class PackageSackBase(object):
(n,a,e,v,r) = pkgtup
return self.searchNevra(name=n, arch=a, epoch=e, ver=v, rel=r)
- def getProvides(self, name, flags=None, version=None):
+ def getProvides(self, name, flags=None, version=(None, None, None)):
"""return dict { packages -> list of matching provides }"""
raise NotImplementedError()
- def getRequires(self, name, flags=None, version=None):
+ def getRequires(self, name, flags=None, version=(None, None, None)):
"""return dict { packages -> list of matching requires }"""
raise NotImplementedError()
@@ -228,11 +228,11 @@ class MetaSack(PackageSackBase):
"""return list of pkgobjects matching the nevra requested"""
return self._computeAggregateListResult("searchNevra", name, epoch, ver, rel, arch)
- def getProvides(self, name, flags=None, version=None):
+ def getProvides(self, name, flags=None, version=(None, None, None)):
"""return dict { packages -> list of matching provides }"""
return self._computeAggregateDictResult("getProvides", name, flags, version)
- def getRequires(self, name, flags=None, version=None):
+ def getRequires(self, name, flags=None, version=(None, None, None)):
"""return dict { packages -> list of matching requires }"""
return self._computeAggregateDictResult("getRequires", name, flags, version)
@@ -443,7 +443,7 @@ class PackageSack(PackageSackBase):
else:
return []
- def getProvides(self, name, flags=None, version=None):
+ def getProvides(self, name, flags=None, version=(None, None, None)):
"""return dict { packages -> list of matching provides }"""
self._checkIndexes(failure='build')
result = { }
@@ -453,7 +453,7 @@ class PackageSack(PackageSackBase):
result[po] = hits
return result
- def getRequires(self, name, flags=None, version=None):
+ def getRequires(self, name, flags=None, version=(None, None, None)):
"""return dict { packages -> list of matching requires }"""
self._checkIndexes(failure='build')
result = { }
diff --git a/yum/rpmsack.py b/yum/rpmsack.py
index 1bed494..fb11b50 100644
--- a/yum/rpmsack.py
+++ b/yum/rpmsack.py
@@ -383,7 +383,7 @@ class RPMDBPackageSack(PackageSackBase):
# Can't support this now
raise NotImplementedError
- def getProvides(self, name, flags=None, version=None):
+ def getProvides(self, name, flags=None, version=(None, None, None)):
"""searches the rpmdb for what provides the arguments
returns a list of pkgtuples of providing packages, possibly empty"""
@@ -418,7 +418,7 @@ class RPMDBPackageSack(PackageSackBase):
# XXX deprecate?
return [po.pkgtup for po in self.getProvides(name, flags, version)]
- def getRequires(self, name, flags=None, version=None):
+ def getRequires(self, name, flags=None, version=(None, None, None)):
"""searches the rpmdb for what provides the arguments
returns a list of pkgtuples of providing packages, possibly empty"""
diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
index 9330876..dc10db4 100644
--- a/yum/sqlitesack.py
+++ b/yum/sqlitesack.py
@@ -489,10 +489,10 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
self._search_cache[prcotype][req] = result
return result
- def getProvides(self, name, flags=None, version=None):
+ def getProvides(self, name, flags=None, version=(None, None, None)):
return self._search("provides", name, flags, version)
- def getRequires(self, name, flags=None, version=None):
+ def getRequires(self, name, flags=None, version=(None, None, None)):
return self._search("requires", name, flags, version)
diff --git a/yum/transactioninfo.py b/yum/transactioninfo.py
index b1d9af1..3ed67c5 100644
--- a/yum/transactioninfo.py
+++ b/yum/transactioninfo.py
@@ -375,7 +375,7 @@ class TransactionData:
self.rpmdb = rpmdb
self.pkgSack = pkgSack
- def getNewProvides(self, name, flag=None, version=None):
+ def getNewProvides(self, name, flag=None, version=(None, None, None)):
"""return dict { packages -> list of matching provides }
searches in packages to be installed"""
result = { }
@@ -386,7 +386,7 @@ class TransactionData:
result.update(self.localSack.getProvides(name, flag, version))
return result
- def getOldProvides(self, name, flag=None, version=None):
+ def getOldProvides(self, name, flag=None, version=(None, None, None)):
"""return dict { packages -> list of matching provides }
searches in packages already installed and not going to be removed"""
result = { }
@@ -395,13 +395,13 @@ class TransactionData:
result[pkg] = hits
return result
- def getProvides(self, name, flag=None, version=None):
+ def getProvides(self, name, flag=None, version=(None, None, None)):
"""return dict { packages -> list of matching provides }"""
result = self.getOldProvides(name, flag, version)
result.update(self.getNewProvides(name, flag, version))
return result
- def getNewRequires(self, name, flag=None, version=None):
+ def getNewRequires(self, name, flag=None, version=(None, None, None)):
"""return dict { packages -> list of matching provides }
searches in packages to be installed"""
result = { }
@@ -413,7 +413,7 @@ class TransactionData:
return result
- def getOldRequires(self, name, flag=None, version=None):
+ def getOldRequires(self, name, flag=None, version=(None, None, None)):
"""return dict { packages -> list of matching provides }
searches in packages already installed and not going to be removed"""
result = { }
@@ -422,7 +422,7 @@ class TransactionData:
result[pkg] = hits
return result
- def getRequires(self, name, flag=None, version=None):
+ def getRequires(self, name, flag=None, version=(None, None, None)):
"""return dict { packages -> list of matching provides }"""
result = self.getOldRequires(name, flag, version)
result.update(self.getNewRequires(name, flag, version))
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org