Hello community,
here is the log from the commit of package yum-utils
checked in at Mon Oct 8 12:20:09 CEST 2007.
--------
--- yum-utils/yum-utils.changes 2007-09-13 22:38:20.000000000 +0200
+++ /mounts/work_src_done/NOARCH/yum-utils/yum-utils.changes 2007-10-05 23:02:34.875748000 +0200
@@ -1,0 +2,8 @@
+Fri Oct 5 23:06:12 CEST 2007 - cthiel@suse.de
+
+- New basearchonly plugin
+- New --repofrompath=repotag, option to specify local repos to
+ repoquery
+- Lot of bug fixes (Check ChangeLog for details)
+
+-------------------------------------------------------------------
Old:
----
yum-utils-1.1.6.tar.bz2
New:
----
yum-utils-1.1.7.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yum-utils.spec ++++++
--- /var/tmp/diff_new_pack.T16143/_old 2007-10-08 12:19:49.000000000 +0200
+++ /var/tmp/diff_new_pack.T16143/_new 2007-10-08 12:19:49.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yum-utils (Version 1.1.6)
+# spec file for package yum-utils (Version 1.1.7)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,8 +12,8 @@
Name: yum-utils
BuildRequires: python-devel
-Version: 1.1.6
-Release: 12
+Version: 1.1.7
+Release: 1
License: GPL v2 or later
Group: System/Packages
Summary: Utilities based around the yum package manager
@@ -246,6 +246,27 @@
Panu Matilainen
Sean Dilda
+%package -n yum-basearchonly
+Summary: Yum plugin to let Yum install only basearch packages
+Group: System/Packages
+Requires: yum >= 3.0
+
+%description -n yum-basearchonly
+This plugin makes Yum only install basearch packages on multiarch
+systems. If you type 'yum install foo' on a x68_64 system, only
+'foo-x.y.x86_46.rpm' is If you want to install the foo-x.y.i386.rpm,
+you have to type 'yum install foo. The plugin only works with 'yum
+install'.
+
+
+
+Authors:
+--------
+ Gijs Hollestelle
+ Seth Vidal
+ Panu Matilainen
+ Sean Dilda
+
%prep
%setup -q
%patch
@@ -255,7 +276,7 @@
%install
make DESTDIR=$RPM_BUILD_ROOT install
-plugins="changelog fastestmirror protectbase versionlock tsflags downloadonly allowdowngrade skip-broken priorities merge-conf protect-packages"
+plugins="changelog fastestmirror protectbase versionlock tsflags downloadonly allowdowngrade skip-broken priorities merge-conf protect-packages basearchonly"
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/yum/pluginconf.d/ $RPM_BUILD_ROOT/usr/lib/yum-plugins/
cd plugins
for plug in $plugins; do
@@ -333,7 +354,16 @@
%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/protect-packages.conf
/usr/lib/yum-plugins/protect-packages.*
+%files -n yum-basearchonly
+%defattr(-, root, root)
+%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/basearchonly.conf
+/usr/lib/yum-plugins/basearchonly.*
%changelog
+* Fri Oct 05 2007 - cthiel@suse.de
+- New basearchonly plugin
+- New --repofrompath=repotag, option to specify local repos to
+ repoquery
+- Lot of bug fixes (Check ChangeLog for details)
* Thu Sep 13 2007 - cthiel@suse.de
- added yum-utils-1.1.6-changelog.patch to fix a TypeError (#307208)
* Wed Aug 29 2007 - cthiel@suse.de
++++++ yum-utils-1.1.6.patch ++++++
--- /var/tmp/diff_new_pack.T16143/_old 2007-10-08 12:19:50.000000000 +0200
+++ /var/tmp/diff_new_pack.T16143/_new 2007-10-08 12:19:50.000000000 +0200
@@ -11,7 +11,7 @@
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
- # Version: 0.2.7
+ # Version: 0.2.8
#
# A plugin for the Yellowdog Updater Modified which sorts each repo's
--- plugins/priorities/priorities.py
@@ -19,6 +19,6 @@
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
- # yum-plugin-priorities 0.0.4
+ # yum-plugin-priorities 0.0.5
#
# Copyright (c) 2006 Daniel de Kok
++++++ yum-utils-1.1.6.tar.bz2 -> yum-utils-1.1.7.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.6/ChangeLog new/yum-utils-1.1.7/ChangeLog
--- old/yum-utils-1.1.6/ChangeLog 2007-07-24 12:09:50.000000000 +0200
+++ new/yum-utils-1.1.7/ChangeLog 2007-09-10 13:58:45.000000000 +0200
@@ -1,3 +1,122 @@
+2007-09-10 Tim Lauridsen
+
+ * ChangeLog, yum-utils.spec: bumped yum-utils version to 1.1.7
+
+2007-09-07 Seth Vidal
+
+ * plugins/skip-broken/skip-broken.py: closes rh bug 281881 - don't
+ traceback when skip-broken is enabled
+
+2007-09-06 Tim Lauridsen
+
+ * docs/repoquery.1, repoquery.py: Fixed repoquery help & manpage
+ with --repofrompath=<repoid>,
+
+2007-09-06 Tim Lauridsen
+
+ * repoquery.py: Make the --repofrompath take a repoid, so we know
+ what to call the repo'
+
+2007-09-05 Seth Vidal
+
+ * docs/repoquery.1, repoquery.py: add --repofrompath and docs to
+ repoquery --repofrompath allows repoquery to query arbitrary paths
+ as repositories
+
+2007-09-05 Seth Vidal
+
+ * repoquery.py: merge --recursive patch from Thomas Vander-Stichele
+
+
+2007-09-05 Tim Lauridsen
+
+ * repoquery.py: Added patch by Bill Nottingham to silence
+ progressbars in pipes
+
+2007-09-02 Seth Vidal
+
+ * debuginfo-install.py: make debuginfo-install use function for
+ matching correctly
+
+2007-08-17 Tim Lauridsen
+
+ * repoquery.py: Added patch by Panu (rhbz #246519) to make repoquery
+ --whatprovides work with root level directories.
+
+2007-08-12 Seth Vidal
+
+ * yum-builddep.py: change exception from PackageSackError to
+ YumBaseError to close rh bug #251827
+
+2007-08-08 Luke Macken
+
+ * plugins/fastestmirror/ChangeLog,
+ plugins/fastestmirror/fastestmirror.py: - Add patch from Christopher Aillon to fail quietly when
+ fastestmirror does not have write access to the timed hostfile.
+ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=237034
+
+2007-08-04 Panu Matilainen
+
+ * repoquery.py: Repoquery wants to have quiet output by default,
+ it's mostly used in scripts where you don't want any extra junk in
+ the output: - add --verbose option, default to quiet - honor quiet
+ on initialization to avoid messages from plugins as well
+
+2007-08-01 Tim Lauridsen
+
+ * .gitignore: Added .gitignore
+
+2007-08-01 Tim Lauridsen
+
+ * yum-utils.spec: Added basearchonly by Adel Gadllah to the spec
+ file
+
+2007-07-31 Tim Lauridsen
+
+ Merge branch 'master' of
+ ssh://login.linux.duke.edu/home/groups/yum/git/yum-utils
+
+2007-07-31 Tim Lauridsen
+
+ * plugins/basearchonly/basearchonly.conf,
+ plugins/basearchonly/basearchonly.py: Added basearchonly plugin
+ files
+
+2007-07-29 Tim Lauridsen
+
+ * plugins/priorities/priorities.py: fixed obsoletes handling (rhbz
+ #247246)
+
+2007-07-29 Tim Lauridsen
+
+ * plugins/priorities/priorities.py: revert the latest check_version,
+ it is not totally sane
+
+2007-07-29 Tim Lauridsen
+
+ * plugins/priorities/priorities.py: Added full version support to
+ priorities plugin (rhbz #249991) Use 'check_versions=1' in
+ priorities.conf to use full nerva check, insted of the default na
+ check.
+
+2007-07-26 Tim Lauridsen
+
+ * plugins/skip-broken/skip-broken.py: Make skip-broken work again by
+ deleting depsolver cache in each run.
+
+2007-07-25 Tim Lauridsen
+
+ * Makefile: changed 'archive' Makefile target to work with
+ git-archive (HEAD)
+
+2007-07-24 Tim Lauridsen
+
+ * Makefile: Fixed git tagging & pushing to work right
+
+2007-07-24 Tim Lauridsen
+
+ * ChangeLog: updated ChangeLog
+
2007-07-24 Tim Lauridsen
* ChangeLog, yum-utils.spec: bumped yum-utils version to 1.1.6
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.6/debuginfo-install.py new/yum-utils-1.1.7/debuginfo-install.py
--- old/yum-utils-1.1.6/debuginfo-install.py 2007-07-24 09:55:07.000000000 +0200
+++ new/yum-utils-1.1.7/debuginfo-install.py 2007-09-10 13:58:45.000000000 +0200
@@ -83,7 +83,8 @@
# look through that pkgs' deps
# add all the debuginfos for the pkgs providing those deps
for pkgglob in self.cmds:
- for po in self.rpmdb.matchPackageNames(pkgglob, casematch=True):
+ e, m, u = self.rpmdb.matchPackageNames([pkgglob])
+ for po in e + m:
try:
self.di_try_install(po)
except yum.Errors.InstallError, e:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.6/docs/repoquery.1 new/yum-utils-1.1.7/docs/repoquery.1
--- old/yum-utils-1.1.6/docs/repoquery.1 2007-07-24 09:55:07.000000000 +0200
+++ new/yum-utils-1.1.7/docs/repoquery.1 2007-09-10 13:58:45.000000000 +0200
@@ -20,6 +20,11 @@
Specify which repository to query. Using this option disables all repositories
not explicitly enabled with --repoid option (can be used multiple times). By
default repoquery uses whatever repositories are enabled in YUM configuration.
+.IP "\fB\-\-repofrompath=<repoid>,\fP"
+Specify a path or url to a repository (same path as in a baseurl) to add to
+the repositories for this query. This option can be used multiple times. If
+you want to view only the pkgs from this repository combine this with
+--repoid. The repoid for the repository is specified by <repoid>.
.IP "\fB\-q\fP"
For rpmquery compatibility, doesn't do anything.
.IP "\fB\-h, \-\-help\fP"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.6/.gitignore new/yum-utils-1.1.7/.gitignore
--- old/yum-utils-1.1.6/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ new/yum-utils-1.1.7/.gitignore 2007-09-10 13:58:45.000000000 +0200
@@ -0,0 +1,8 @@
+*.~
+*.bak
+*.pyc
+*.pyo
+.project
+.pydevproject
+*.tar.gz
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.6/Makefile new/yum-utils-1.1.7/Makefile
--- old/yum-utils-1.1.6/Makefile 2007-07-24 11:57:31.000000000 +0200
+++ new/yum-utils-1.1.7/Makefile 2007-09-10 13:58:45.000000000 +0200
@@ -22,14 +22,7 @@
archive:
@rm -rf ${PKGNAME}-${VERSION}.tar.gz
- @rm -rf /tmp/${PKGNAME}-$(VERSION) /tmp/${PKGNAME}
- @dir=$$PWD; cd /tmp; cp -a $$dir ${PKGNAME}
- @rm -f /tmp/${PKGNAME}/${PKGNAME}-daily.spec
- @mv /tmp/${PKGNAME} /tmp/${PKGNAME}-$(VERSION)
- @rm -rf /tmp/${PKGNAME}-$(VERSION)/.git
- @rm -rf /tmp/${PKGNAME}-$(VERSION)/tools
- @dir=$$PWD; cd /tmp; tar cvzf $$dir/${PKGNAME}-$(VERSION).tar.gz ${PKGNAME}-$(VERSION)
- @rm -rf /tmp/${PKGNAME}-$(VERSION)
+ @git-archive --format=tar --prefix=$(PKGNAME)-$(VERSION)/ HEAD | gzip -9v >${PKGNAME}-$(VERSION).tar.gz
@echo "The archive is in ${PKGNAME}-$(VERSION).tar.gz"
srpm: archive
@@ -40,8 +33,8 @@
@git commit -a -m "bumped yum-utils version to $(VERSION)"
@$(MAKE) ChangeLog
@git commit -a -m "updated ChangeLog"
- @git tag ${PKGNAME}-$(VERSION)
- @git push
+ @git tag -a ${PKGNAME}-$(VERSION) -m "Tagged ${PKGNAME}-$(VERSION)"
+ @git push --tags
@$(MAKE) upload
upload: archive srpm
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.6/plugins/basearchonly/basearchonly.conf new/yum-utils-1.1.7/plugins/basearchonly/basearchonly.conf
--- old/yum-utils-1.1.6/plugins/basearchonly/basearchonly.conf 1970-01-01 01:00:00.000000000 +0100
+++ new/yum-utils-1.1.7/plugins/basearchonly/basearchonly.conf 2007-09-10 13:58:45.000000000 +0200
@@ -0,0 +1,8 @@
+[main]
+enabled=1
+[x86]
+whitelist = firefox
+[ppc]
+whitelist = kernel, gdb, frysk, systemtap, ltrace, strace, valgrind
+[sparc]
+whitelist = kernel, gdb, frysk, systemtap, ltrace, strace, valgrind
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.6/plugins/basearchonly/basearchonly.py new/yum-utils-1.1.7/plugins/basearchonly/basearchonly.py
--- old/yum-utils-1.1.6/plugins/basearchonly/basearchonly.py 1970-01-01 01:00:00.000000000 +0100
+++ new/yum-utils-1.1.7/plugins/basearchonly/basearchonly.py 2007-09-10 13:58:45.000000000 +0200
@@ -0,0 +1,75 @@
+#!/usr/bin/python
+
+# 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.
+#
+# Copyright 2007 by Adel Gadllah
+
+import re, os
+from yum.plugins import TYPE_CORE
+
+requires_api_version = '2.3'
+plugin_type = TYPE_CORE
+
+
+def exclude_hook(conduit):
+
+ """ Only install i386 packages when told to do so """
+ if os.uname()[-1] == 'x86_64':
+ basearch(conduit, "x86", "i?86$")
+
+ """ Only install ppc64 packages when told to do so """
+ if os.uname()[-1] == 'ppc64':
+ basearch(conduit, "ppc", "ppc64$")
+
+ """ Only install sparc64 packages when told to do so """
+ if os.uname()[-1] == 'sparc64':
+ basearch(conduit, "sparc", "sparc64$")
+
+
+def basearch(conduit, barch, excludearchP):
+
+ exclude = []
+ whitelist = []
+ conf , cmd = conduit.getCmdLine()
+ packageList = conduit.getPackages()
+ excludearch = re.compile(excludearchP);
+
+ if not cmd:
+ return
+
+ if cmd[0] != "install":
+ return
+
+ """ get whitelist from config file """
+
+ conflist = conduit.confString(barch, 'whitelist')
+ if conflist:
+ tmp = conflist.split(",")
+ for confitem in tmp:
+ whitelist.append(confitem.strip())
+
+ """ decide which packages we want to exclude """
+
+ for userpkg in cmd:
+ if not userpkg in whitelist and not excludearch.search(userpkg):
+ exclude.append(userpkg)
+
+ """ exclude the packages """
+
+ for pkg in packageList:
+ if pkg.name in exclude and excludearch.search(pkg.arch):
+ conduit.delPackage(pkg)
+ conduit.info(3, "--> excluded %s.%s" % (pkg.name, pkg.arch))
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.6/plugins/fastestmirror/ChangeLog new/yum-utils-1.1.7/plugins/fastestmirror/ChangeLog
--- old/yum-utils-1.1.6/plugins/fastestmirror/ChangeLog 2007-07-24 09:55:07.000000000 +0200
+++ new/yum-utils-1.1.7/plugins/fastestmirror/ChangeLog 2007-09-10 13:58:45.000000000 +0200
@@ -1,3 +1,8 @@
+* Aug 8 2007 Luke Macken - 0.2.8
+- Add patch from Christopher Aillon to fail quietly when fastestmirror does
+ not have write access to the timed hostfile.
+ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=237034
+
* Apr 19 2007 Luke Macken - 0.2.7
- Remove TYPE_{INTERFACE,INTERACTIVE}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.6/plugins/fastestmirror/fastestmirror.py new/yum-utils-1.1.7/plugins/fastestmirror/fastestmirror.py
--- old/yum-utils-1.1.6/plugins/fastestmirror/fastestmirror.py 2007-07-24 09:55:07.000000000 +0200
+++ new/yum-utils-1.1.7/plugins/fastestmirror/fastestmirror.py 2007-09-10 13:58:45.000000000 +0200
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Version: 0.2.7
+# Version: 0.2.8
#
# A plugin for the Yellowdog Updater Modified which sorts each repo's
# mirrorlist by connection speed prior to download.
@@ -98,10 +98,13 @@
def write_timedhosts():
global timedhosts
- hostfile = file(hostfilepath, 'w')
- for host in timedhosts.keys():
- hostfile.write('%s %s\n' % (host, timedhosts[host]))
- hostfile.close()
+ try:
+ hostfile = file(hostfilepath, 'w')
+ for host in timedhosts.keys():
+ hostfile.write('%s %s\n' % (host, timedhosts[host]))
+ hostfile.close()
+ except IOError:
+ pass
def get_hostfile_age():
global hostfilepath
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.6/plugins/priorities/priorities.py new/yum-utils-1.1.7/plugins/priorities/priorities.py
--- old/yum-utils-1.1.6/plugins/priorities/priorities.py 2007-07-24 09:55:07.000000000 +0200
+++ new/yum-utils-1.1.7/plugins/priorities/priorities.py 2007-09-10 13:58:45.000000000 +0200
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# yum-plugin-priorities 0.0.4
+# yum-plugin-priorities 0.0.5
#
# Copyright (c) 2006 Daniel de Kok
#
@@ -67,13 +67,21 @@
if check_obsoletes:
obsoletes = conduit._base.pkgSack.returnObsoletes()
- # Build a dictionary with package priorities
- pkg_priorities = {}
+ # Build a dictionary with package priorities. Since we handle obsoletes
+ # archless, also build an archless package priority dictionary for
+ # obsolete handling.
+ pkg_priorities = dict()
+ if check_obsoletes:
+ pkg_priorities_archless = dict()
for repo in allrepos:
if repo.enabled:
- repopkgs = _pkglisttodict(conduit.getPackages(repo), repo.priority)
+ repopkgs = _pkglist_to_dict(conduit.getPackages(repo), repo.priority)
_mergeprioritydicts(pkg_priorities, repopkgs)
+ if check_obsoletes:
+ repopkgs_archless = _pkglist_to_archless_dict(conduit.getPackages(repo), repo.priority)
+ _mergeprioritydicts(pkg_priorities_archless, repopkgs_archless)
+
# Eliminate packages that have a low priority
for repo in allrepos:
if repo.enabled:
@@ -83,26 +91,35 @@
conduit.delPackage(po)
cnt += 1
conduit.info(3," --> %s from %s excluded (priority)" % (po,po.repoid))
-
+
+ # If this packages obsoletes other packages, check whether
+ # one of the obsoleted packages is not available through
+ # a repo with a higher priority. If so, remove this package.
if check_obsoletes:
if obsoletes.has_key(po.pkgtup):
obsolete_pkgs = obsoletes[po.pkgtup]
for obsolete_pkg in obsolete_pkgs:
- key = "%s.%s" % (obsolete_pkg[0],obsolete_pkg[1])
- if pkg_priorities.has_key(key) and pkg_priorities[key] < repo.priority:
+ pkg_name = obsolete_pkg[0]
+ if pkg_priorities_archless.has_key(pkg_name) and pkg_priorities_archless[pkg_name] < repo.priority:
conduit.delPackage(po)
cnt += 1
conduit.info(3," --> %s from %s excluded (priority)" % (po,po.repoid))
break
conduit.info(2, '%d packages excluded due to repository priority protections' % cnt)
-def _pkglisttodict(pl, priority):
- out = {}
+def _pkglist_to_dict(pl, priority):
+ out = dict()
for p in pl:
key = "%s.%s" % (p.name,p.arch)
out[key] = priority
return out
+def _pkglist_to_archless_dict(pl, priority):
+ out = dict()
+ for p in pl:
+ out[p.name] = priority
+ return out
+
def _mergeprioritydicts(dict1, dict2):
for package in dict2.keys():
if not dict1.has_key(package) or dict2[package] < dict1[package]:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.6/plugins/skip-broken/skip-broken.py new/yum-utils-1.1.7/plugins/skip-broken/skip-broken.py
--- old/yum-utils-1.1.6/plugins/skip-broken/skip-broken.py 2007-07-24 09:55:07.000000000 +0200
+++ new/yum-utils-1.1.7/plugins/skip-broken/skip-broken.py 2007-09-10 13:58:45.000000000 +0200
@@ -37,8 +37,12 @@
def resetTs(self):
'''Clear the current tsInfo Transaction Set'''
# clear current tsInfo, we want a empty one.
+ # FIXME: Dirty Hack, remove it later when then problem dont occour any more.
+ # remove depsolver cache.
+ if hasattr(self,"dcobj"):
+ del self.dcobj
del self.base.tsInfo
- self.base.tsInfo = self.base._transactionDataFactory()
+ self.base.tsInfo # make the new one magically appear
self.base.initActionTs()
def preDepCheck(self):
@@ -134,4 +138,4 @@
# Show the current state of y.tsInfo
conduit.info(2,'**** End Checking packages for dependency problems')
#cd.dumpTsInfo()
-
\ No newline at end of file
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.6/.project new/yum-utils-1.1.7/.project
--- old/yum-utils-1.1.6/.project 2007-07-24 09:57:16.000000000 +0200
+++ new/yum-utils-1.1.7/.project 1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>yum-utils</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.6/repoquery.py new/yum-utils-1.1.7/repoquery.py
--- old/yum-utils-1.1.6/repoquery.py 2007-07-24 09:55:07.000000000 +0200
+++ new/yum-utils-1.1.7/repoquery.py 2007-09-10 13:58:45.000000000 +0200
@@ -24,6 +24,7 @@
import fnmatch
import time
import os
+import os.path
import exceptions
from optparse import OptionParser
@@ -81,6 +82,10 @@
}
def rpmevr(e, v, r):
+ """
+ Given epoch, version and release strings, return one string
+ representing the combination, possibly omitting any of the three.
+ """
et = ""
vt = ""
rt = ""
@@ -99,6 +104,16 @@
# abstract class
class pkgQuery:
+ """
+ My implementation of __getitem__ either forwards to an implementation
+ of fmt_(name), or to self.pkg.returnSimple(), allowing subclasses
+ to override the package's items.
+
+ @type pkg: L{yum.package.YumAvailablePackage}
+ @ivar qf: the query format for this package query
+ @type qf: str
+ """
+
def __init__(self, pkg, qf):
self.pkg = pkg
self.qf = qf
@@ -149,6 +164,18 @@
def isSource(self):
return self["arch"] == "src"
+ def prco(self, what, **kw):
+ """
+ Query for the provides/requires/conflicts/obsoletes of this package.
+
+ @param what: one of provides, requires, conflicts, obsoletes
+ @type what: str
+
+ @rtype: list of str
+ """
+ # for subclasses to implement
+ raise NotImplementedError
+
def fmt_queryformat(self):
if not self.qf:
@@ -178,6 +205,9 @@
return "\n".join(self.files())
class repoPkgQuery(pkgQuery):
+ """
+ I wrap a query of a non-installed package available in the repository.
+ """
def __init__(self, pkg, qf):
pkgQuery.__init__(self, pkg, qf)
self.classname = 'repo pkg'
@@ -212,6 +242,10 @@
return "\n".join(changelog)
class instPkgQuery(pkgQuery):
+ """
+ I wrap a query of an installed package
+ of type L{yum.packages.YumInstalledPackage}
+ """
# hmm, thought there'd be more things in need of mapping to rpm names :)
tagmap = { 'installedsize': 'size',
}
@@ -306,6 +340,11 @@
class YumBaseQuery(yum.YumBase):
def __init__(self, pkgops = [], sackops = [], options = None):
+ """
+ @type pkgops: list of str
+ @type sackops: list of str
+ @type options: L{optparse.Values}
+ """
yum.YumBase.__init__(self)
self.logger = logging.getLogger("yum.verbose.repoquery")
self.options = options
@@ -313,6 +352,13 @@
self.sackops = sackops
def queryPkgFactory(self, pkgs):
+ """
+ For each given package, create a query.
+
+ @type pkgs: list of L{yum.package.YumAvailablePackage}
+
+ @rtype: list of L{queryPkg}
+ """
qf = self.options.queryformat or std_qf["nevra"]
qpkgs = []
for pkg in pkgs:
@@ -324,6 +370,13 @@
return qpkgs
def returnByName(self, name):
+ """
+ Given a name, return a list of package queries matching the name.
+
+ @type name: str
+
+ @rtype: list of L{queryPkg}
+ """
pkgs = []
try:
exact, match, unmatch = yum.packages.parsePackages(self.returnPkgList(), [name], casematch=1)
@@ -335,6 +388,7 @@
def returnPkgList(self):
pkgs = []
if self.options.pkgnarrow == "repos":
+ # self.pkgSack is a yum.packageSack.MetaSack
if self.conf.showdupesfromrepos:
pkgs = self.pkgSack.returnPackages()
else:
@@ -353,10 +407,15 @@
return pkgs
- def returnPackagesByDep(self, depstring):
+ def returnPackagesByDepStr(self, depstring):
provider = []
try:
- provider.extend(yum.YumBase.returnPackagesByDep(self, depstring))
+ # XXX rhbz#246519, for some reason returnPackagesByDep() fails
+ # to find some root level directories while
+ # searchPackageProvides() does... use that for now
+ matches = yum.YumBase.searchPackageProvides(self, [depstring])
+ provider = matches.keys()
+ # provider.extend(yum.YumBase.returnPackagesByDep(self, depstring))
except yum.Errors.YumBaseError, err:
self.logger.error("No package provides %s" % depstring)
return self.queryPkgFactory(provider)
@@ -432,23 +491,34 @@
return grps
def fmt_whatprovides(self, name, **kw):
- return self.returnPackagesByDep(name)
+ return self.returnPackagesByDepStr(name)
def fmt_whatrequires(self, name, **kw):
pkgs = {}
- provs = [name]
-
- if self.options.alldeps:
- for pkg in self.returnByName(name):
- provs.extend(pkg.prco("provides"))
- provs.extend(pkg.files())
+ done = [] # keep track of names we have already visited
+
+ def require_recursive(name):
+ if name in done:
+ return
+ done.append(name)
- for prov in provs:
- # Only look at the providing name, not the whole version. This
- # might occasionally give some false positives but that's
- # better than missing ones which it had previously
- for pkg in self.pkgSack.searchRequires(prov.split()[0]):
- pkgs[pkg.pkgtup] = pkg
+ provs = [name]
+
+ if self.options.alldeps:
+ for pkg in self.returnByName(name):
+ provs.extend(pkg.prco("provides"))
+ provs.extend(pkg.files())
+
+ for prov in provs:
+ # Only look at the providing name, not the whole version. This
+ # might occasionally give some false positives but that's
+ # better than missing ones which it had previously
+ for pkg in self.pkgSack.searchRequires(prov.split()[0]):
+ pkgs[pkg.pkgtup] = pkg
+ if self.options.recursive:
+ require_recursive(pkg.name)
+
+ require_recursive(name)
return self.queryPkgFactory(pkgs.values())
def fmt_whatobsoletes(self, name, **kw):
@@ -531,7 +601,9 @@
parser.add_option("--resolve", action="store_true",
help="resolve capabilities to originating package(s)")
parser.add_option("--alldeps", action="store_true",
- help="check non-explicit dependencies as well")
+ help="check non-explicit dependencies (files and Provides:) as well")
+ parser.add_option("--recursive", action="store_true",
+ help="recursively query for packages (for whatrequires)")
parser.add_option("--whatprovides", action="store_true",
help="query what package(s) provide a capability")
parser.add_option("--whatrequires", action="store_true",
@@ -554,8 +626,12 @@
help="show all versions of packages")
parser.add_option("--repoid", action="append",
help="specify repoids to query, can be specified multiple times (default is all enabled)")
+ parser.add_option("--repofrompath", action="append",
+ help="specify repoid & paths of additional repositories - unique repoid and complete path required, can be specified multiple times. Example. --repofrompath=myrepo,/path/to/repo")
parser.add_option("--quiet", action="store_true",
- help="quiet (no output to stderr)")
+ help="quiet (no output to stderr)", default=True)
+ parser.add_option("--verbose", action="store_false",
+ help="verbose output", dest="quiet")
parser.add_option("-C", "--cache", action="store_true",
help="run from cache only")
parser.add_option("--tempcache", action="store_true",
@@ -634,13 +710,35 @@
pkgops.append("queryformat")
repoq = YumBaseQuery(pkgops, sackops, opts)
+
+ # silence initialisation junk from modules etc unless verbose mode
+ initnoise = (not opts.quiet) * 2
if opts.conffile:
- repoq.doConfigSetup(fn=opts.conffile)
+ repoq.doConfigSetup(fn=opts.conffile, debuglevel=initnoise)
else:
- repoq.doConfigSetup()
+ repoq.doConfigSetup(debuglevel=initnoise)
+
+ if opts.repofrompath:
+ # setup the fake repos
+ for repo in opts.repofrompath:
+ repoid,repopath = tuple(repo.split(','))
+ if repopath[0] == '/':
+ baseurl = 'file://' + repopath
+ else:
+ baseurl = repopath
+
+ repopath = os.path.normpath(repopath)
+ newrepo = yum.yumRepo.YumRepository(repoid)
+ newrepo.name = repopath
+ newrepo.baseurl = baseurl
+ newrepo.basecachedir = repoq.conf.cachedir
+ repoq.repos.add(newrepo)
+ repoq.repos.enableRepo(newrepo.id)
+ repoq.logger.info( "Added %s repo from %s" % (repoid,repopath))
+
# Show what is going on, if --quiet is not set.
- if not opts.quiet:
+ if not opts.quiet and sys.stdout.isatty():
repoq.repos.setProgressBar(TextMeter(fo=sys.stdout))
repoq.repos.callback = output.CacheProgressCallback()
yumout = output.YumOutput()
@@ -662,7 +760,7 @@
if opts.show_dupes:
repoq.conf.showdupesfromrepos = True
-
+
if opts.repoid:
for repo in repoq.repos.findRepos('*'):
if repo.id not in opts.repoid:
@@ -671,7 +769,7 @@
repo.enable()
repoq.doRepoSetup()
-
+
for exp in regexs:
if exp.endswith('.src'):
needsource = 1
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.6/tools/git2cl new/yum-utils-1.1.7/tools/git2cl
--- old/yum-utils-1.1.6/tools/git2cl 1970-01-01 01:00:00.000000000 +0100
+++ new/yum-utils-1.1.7/tools/git2cl 2007-09-10 13:58:45.000000000 +0200
@@ -0,0 +1,308 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2007 Simon Josefsson.
+#
+# The functions mywrap, last_line_len, wrap_log_entry are derived from
+# the cvs2cl tool, see http://www.red-bean.com/cvs2cl/:
+# Copyright (C) 2001,2002,2003,2004 Martyn J. Pearce
+# Copyright (C) 1999 Karl Fogel
+#
+# git2cl 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, or (at your option)
+# any later version.
+#
+# git2cl 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.
+#
+# You should have received a copy of the GNU General Public License
+# along with git2cl; see the file COPYING. If not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+use strict;
+use Date::Parse qw(strptime);
+use POSIX qw(strftime);
+use Text::Wrap qw(wrap);
+
+use constant EMPTY_LOG_MESSAGE => '*** empty log message ***';
+
+sub mywrap {
+ my ($indent1, $indent2, @text) = @_;
+ # If incoming text looks preformatted, don't get clever
+ my $text = Text::Wrap::wrap($indent1, $indent2, @text);
+ if ( grep /^\s+/m, @text ) {
+ return $text;
+ }
+ my @lines = split /\n/, $text;
+ $indent2 =~ s!^((?: {8})+)!"\t" x (length($1)/8)!e;
+ $lines[0] =~ s/^$indent1\s+/$indent1/;
+ s/^$indent2\s+/$indent2/
+ for @lines[1..$#lines];
+ my $newtext = join "\n", @lines;
+ $newtext .= "\n"
+ if substr($text, -1) eq "\n";
+ return $newtext;
+}
+
+sub last_line_len {
+ my $files_list = shift;
+ my @lines = split (/\n/, $files_list);
+ my $last_line = pop (@lines);
+ return length ($last_line);
+}
+
+# A custom wrap function, sensitive to some common constructs used in
+# log entries.
+sub wrap_log_entry {
+ my $text = shift; # The text to wrap.
+ my $left_pad_str = shift; # String to pad with on the left.
+
+ # These do NOT take left_pad_str into account:
+ my $length_remaining = shift; # Amount left on current line.
+ my $max_line_length = shift; # Amount left for a blank line.
+
+ my $wrapped_text = ''; # The accumulating wrapped entry.
+ my $user_indent = ''; # Inherited user_indent from prev line.
+
+ my $first_time = 1; # First iteration of the loop?
+ my $suppress_line_start_match = 0; # Set to disable line start checks.
+
+ my @lines = split (/\n/, $text);
+ while (@lines) # Don't use `foreach' here, it won't work.
+ {
+ my $this_line = shift (@lines);
+ chomp $this_line;
+
+ if ($this_line =~ /^(\s+)/) {
+ $user_indent = $1;
+ }
+ else {
+ $user_indent = '';
+ }
+
+ # If it matches any of the line-start regexps, print a newline now...
+ if ($suppress_line_start_match)
+ {
+ $suppress_line_start_match = 0;
+ }
+ elsif (($this_line =~ /^(\s*)\*\s+[a-zA-Z0-9]/)
+ || ($this_line =~ /^(\s*)\* [a-zA-Z0-9_\.\/\+-]+/)
+ || ($this_line =~ /^(\s*)\([a-zA-Z0-9_\.\/\+-]+(\)|,\s*)/)
+ || ($this_line =~ /^(\s+)(\S+)/)
+ || ($this_line =~ /^(\s*)- +/)
+ || ($this_line =~ /^()\s*$/)
+ || ($this_line =~ /^(\s*)\*\) +/)
+ || ($this_line =~ /^(\s*)[a-zA-Z0-9](\)|\.|\:) +/))
+ {
+ $length_remaining = $max_line_length - (length ($user_indent));
+ }
+
+ # Now that any user_indent has been preserved, strip off leading
+ # whitespace, so up-folding has no ugly side-effects.
+ $this_line =~ s/^\s*//;
+
+ # Accumulate the line, and adjust parameters for next line.
+ my $this_len = length ($this_line);
+ if ($this_len == 0)
+ {
+ # Blank lines should cancel any user_indent level.
+ $user_indent = '';
+ $length_remaining = $max_line_length;
+ }
+ elsif ($this_len >= $length_remaining) # Line too long, try breaking it.
+ {
+ # Walk backwards from the end. At first acceptable spot, break
+ # a new line.
+ my $idx = $length_remaining - 1;
+ if ($idx < 0) { $idx = 0 };
+ while ($idx > 0)
+ {
+ if (substr ($this_line, $idx, 1) =~ /\s/)
+ {
+ my $line_now = substr ($this_line, 0, $idx);
+ my $next_line = substr ($this_line, $idx);
+ $this_line = $line_now;
+
+ # Clean whitespace off the end.
+ chomp $this_line;
+
+ # The current line is ready to be printed.
+ $this_line .= "\n${left_pad_str}";
+
+ # Make sure the next line is allowed full room.
+ $length_remaining = $max_line_length - (length ($user_indent));
+
+ # Strip next_line, but then preserve any user_indent.
+ $next_line =~ s/^\s*//;
+
+ # Sneak a peek at the user_indent of the upcoming line, so
+ # $next_line (which will now precede it) can inherit that
+ # indent level. Otherwise, use whatever user_indent level
+ # we currently have, which might be none.
+ my $next_next_line = shift (@lines);
+ if ((defined ($next_next_line)) && ($next_next_line =~ /^(\s+)/)) {
+ $next_line = $1 . $next_line if (defined ($1));
+ # $length_remaining = $max_line_length - (length ($1));
+ $next_next_line =~ s/^\s*//;
+ }
+ else {
+ $next_line = $user_indent . $next_line;
+ }
+ if (defined ($next_next_line)) {
+ unshift (@lines, $next_next_line);
+ }
+ unshift (@lines, $next_line);
+
+ # Our new next line might, coincidentally, begin with one of
+ # the line-start regexps, so we temporarily turn off
+ # sensitivity to that until we're past the line.
+ $suppress_line_start_match = 1;
+
+ last;
+ }
+ else
+ {
+ $idx--;
+ }
+ }
+
+ if ($idx == 0)
+ {
+ # We bottomed out because the line is longer than the
+ # available space. But that could be because the space is
+ # small, or because the line is longer than even the maximum
+ # possible space. Handle both cases below.
+
+ if ($length_remaining == ($max_line_length - (length ($user_indent))))
+ {
+ # The line is simply too long -- there is no hope of ever
+ # breaking it nicely, so just insert it verbatim, with
+ # appropriate padding.
+ $this_line = "\n${left_pad_str}${this_line}";
+ }
+ else
+ {
+ # Can't break it here, but may be able to on the next round...
+ unshift (@lines, $this_line);
+ $length_remaining = $max_line_length - (length ($user_indent));
+ $this_line = "\n${left_pad_str}";
+ }
+ }
+ }
+ else # $this_len < $length_remaining, so tack on what we can.
+ {
+ # Leave a note for the next iteration.
+ $length_remaining = $length_remaining - $this_len;
+
+ if ($this_line =~ /\.$/)
+ {
+ $this_line .= " ";
+ $length_remaining -= 2;
+ }
+ else # not a sentence end
+ {
+ $this_line .= " ";
+ $length_remaining -= 1;
+ }
+ }
+
+ # Unconditionally indicate that loop has run at least once.
+ $first_time = 0;
+
+ $wrapped_text .= "${user_indent}${this_line}";
+ }
+
+ # One last bit of padding.
+ $wrapped_text .= "\n";
+
+ return $wrapped_text;
+}
+
+# main
+
+my @date;
+my $author;
+my @files;
+my $comment;
+my $merge;
+
+my $state; # 0-header 1-comment 2-files
+my $done = 0;
+
+$state = 0;
+
+while (<>) {
+ #print STDERR "debug ($state, " . (@date ? (strftime "%Y-%m-%d", @date) : "") . "): `$_'\n";
+
+ if ($state == 0) {
+ if (m,^Author: (.*),) {
+ $author = $1;
+ }
+ if (m,^Date: (.*),) {
+ @date = strptime($1);
+ }
+ if (m,^Merge: (.*),) {
+ $merge = 1;
+ }
+ $state = 1 if (m,^$,);
+ } elsif ($state == 1) {
+ $state = 2 if (m,^$,);
+ s/^ //g;
+ s/\n/ /g;
+ $comment = $comment . $_;
+ } elsif ($state == 2 && $merge) {
+ $done = 1;
+ } elsif ($state == 2) {
+ if (m,^([-0-9]+)\t([-0-9]+)\t(.*)$,) {
+ push @files, $3;
+ } elsif (m,^[^ ],) {
+ # No file changes.
+ $done = 1;
+ }
+ $done = 1 if (m,^$,);
+ }
+
+ if ($done && @date == ()) {
+ print STDERR "warning: could not parse entry\n";
+ } elsif ($done) {
+ print (strftime "%Y-%m-%d $author\n\n", @date);
+
+ my $files = join (", ", @files);
+ $files = mywrap ("\t", "\t", "* $files"), ": ";
+
+ if (index($comment, EMPTY_LOG_MESSAGE) > -1 ) {
+ $comment = "[no log message]\n";
+ }
+
+ my $files_last_line_len = 0;
+ $files_last_line_len = last_line_len($files) + 1;
+ my $msg = wrap_log_entry($comment, "\t", 69-$files_last_line_len, 69);
+
+ $msg =~ s/[ \t]+\n/\n/g;
+
+ if ($merge) {
+ print "\t$msg\n";
+ } else {
+ print "$files: $msg\n";
+ }
+
+ @date = ();
+ $author = "";
+ @files = ();
+ $comment = "";
+ $merge = 0;
+
+ $state = 0;
+ $done = 0;
+ }
+}
+
+if (@files) {
+ print (strftime "%Y-%m-%d $author\n\n", @date);
+ my $msg = wrap_log_entry($comment, "\t", 69, 69);
+ $msg =~ s/[ \t]+\n/\n/g;
+ print "\t* $msg\n";
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.6/tools/README new/yum-utils-1.1.7/tools/README
--- old/yum-utils-1.1.6/tools/README 1970-01-01 01:00:00.000000000 +0100
+++ new/yum-utils-1.1.7/tools/README 2007-09-10 13:58:45.000000000 +0200
@@ -0,0 +1,15 @@
+The Tools directory contains tools to support the Makefile.
+
+The tools is not included in the tarball, they only exist in the repository
+
+TOOLS:
+
+git2cl
+======
+git2cl is a tool to create GNU Changelog from a git repository.
+
+Homepage:
+http://josefsson.org/git2cl/
+
+git Repository:
+http://repo.or.cz/w/git2cl.git
\ No newline at end of file
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.6/yum-builddep.py new/yum-utils-1.1.7/yum-builddep.py
--- old/yum-utils-1.1.6/yum-builddep.py 2007-07-24 09:55:07.000000000 +0200
+++ new/yum-utils-1.1.7/yum-builddep.py 2007-09-10 13:58:45.000000000 +0200
@@ -86,7 +86,7 @@
pkg = base.returnPackageByDep(dep)
if not base.rpmdb.installed(name=pkg.name):
base.tsInfo.addInstall(pkg)
- except yum.Errors.PackageSackError, e:
+ except yum.Errors.YumBaseError, e:
logger.error("Error: %s" % e)
sys.exit(1)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.6/yum-utils.spec new/yum-utils-1.1.7/yum-utils.spec
--- old/yum-utils-1.1.6/yum-utils.spec 2007-07-24 12:07:02.000000000 +0200
+++ new/yum-utils-1.1.7/yum-utils.spec 2007-09-10 13:58:45.000000000 +0200
@@ -1,6 +1,6 @@
Summary: Utilities based around the yum package manager
Name: yum-utils
-Version: 1.1.6
+Version: 1.1.7
Release: 1%{?dist}
License: GPL
Group: Development/Tools
@@ -175,6 +175,17 @@
and so on).Therefore, the plugin functions well even without
compiling careful lists of all important packages.
+%package -n yum-basearchonly
+Summary: Yum plugin to let Yum install only basearch packages.
+Group: System Environment/Base
+Requires: yum >= 3.0
+
+%description -n yum-basearchonly
+this plugin makes Yum only install basearch packages on multiarch systems.
+If you type 'yum install foo' on a x68_64 system, only 'foo-x.y.x86_46.rpm' is installed.
+If you want to install the foo-x.y.i386.rpm, you have to type 'yum install foo.i386'.
+The plugin only works with 'yum install'.
+
%prep
%setup -q
@@ -185,7 +196,10 @@
make -C updateonboot DESTDIR=$RPM_BUILD_ROOT install
# Plugins to install
-plugins="changelog fastestmirror fedorakmod protectbase versionlock tsflags kernel-module downloadonly allowdowngrade skip-broken priorities refresh-updatesd merge-conf security protect-packages"
+plugins="changelog fastestmirror fedorakmod protectbase versionlock tsflags kernel-module \
+ downloadonly allowdowngrade skip-broken priorities refresh-updatesd merge-conf \
+ security protect-packages basearchonly"
+
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/yum/pluginconf.d/ $RPM_BUILD_ROOT/usr/lib/yum-plugins/
cd plugins
@@ -309,7 +323,18 @@
%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/protect-packages.conf
/usr/lib/yum-plugins/protect-packages.*
+%files -n yum-basearchonly
+%defattr(-, root, root)
+%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/basearchonly.conf
+/usr/lib/yum-plugins/basearchonly.*
+
+
%changelog
+
+* Mon Sep 10 2007 Tim Lauridsen
+- mark as 1.1.7
+* Tue Jul 24 2007 Tim Lauridsen
+- Added basearchonly plugin by Adel Gadllah
* Tue Jul 24 2007 Tim Lauridsen
- mark as 1.1.6
* Tue Jul 17 2007 Tim Lauridsen
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org