Hello community,
here is the log from the commit of package yum-utils
checked in at Thu Jan 31 23:48:44 CET 2008.
--------
--- yum-utils/yum-utils.changes 2008-01-22 20:27:19.000000000 +0100
+++ yum-utils/yum-utils.changes 2008-01-31 14:11:46.373106000 +0100
@@ -1,0 +2,36 @@
+Thu Jan 31 14:23:04 CET 2008 - cthiel@suse.de
+
+- update to version 1.1.11
+ * plugins/tmprepo/tmprepo.conf, plugins/tmprepo/tmprepo.py, yum-utils.spec:
+ Add --tmprepo as a plugin
+ * plugins/aliases/aliases.py: New help info. for aliases
+ * plugins/security/security.py: Add support for the new help
+ * plugins/list-data/list-data.py: Add support for the new help
+ * plugins/list-data/list-data.py: Fix bad import
+ * plugins/priorities/priorities.py: Make yum-priorities not eat CPU just by
+ installing it
+ * plugins/list-data/list-data.py: Use .committer property in HEAD
+ * debuginfo-install.py, repoclosure.py, repodiff.py, repomanage.py,
+ repotrack.py, yum-complete-transaction.py: add better usage explanations
+ to a lot of yum-utils. helps to give people an idea what the tool is
+ used for.
+ * plugins/list-data/list-data.conf, plugins/list-data/list-data.py,
+ yum-utils.spec: List vendors, groups, packagers, buildhosts, licenses,
+ arches, buildhosts, baseurls, package-sizes, archive-sizes,
+ installed-sizes, committers
+ * docs/package-cleanup.1: Reorder option docs to be sorted
+ * docs/package-cleanup.1: Remove duplicate doc
+ * repodiff.py: make sure this only operates on src rpms b/c otherwise bad
+ things happen
+ * repodiff.py: add -q, --new and --old options to repodiff. Correct some
+ logic issues in the diffing, fix up the output to a pipe
+ * yumdownloader.py: Remove hack for *-source repos.
+ * yumdownloader.py: Real fix for the __len__ problem. Don't disableRepo()
+ and then enable it, this even do the disable last ... oops.
+ * Makefile, repodiff.py, yum-utils.spec: add repodiff
+ * plugins/aliases/aliases.py: Workaround for bad yum module users
+ * plugins/security/security.py: Remove extra newlines, __str__ already
+ leads with one
+ * plugins/aliases/aliases: Remove empty lss alias and minor cleanup
+
+-------------------------------------------------------------------
@@ -306 +341,0 @@
-
Old:
----
yum-utils-1.1.10.tar.bz2
New:
----
yum-utils-1.1.11.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yum-utils.spec ++++++
--- /var/tmp/diff_new_pack.Ww7101/_old 2008-01-31 23:48:02.000000000 +0100
+++ /var/tmp/diff_new_pack.Ww7101/_new 2008-01-31 23:48:02.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yum-utils (Version 1.1.10)
+# spec file for package yum-utils (Version 1.1.11)
#
# Copyright (c) 2008 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.10
-Release: 6
+Version: 1.1.11
+Release: 1
License: GPL v2 or later
Group: System/Packages
Summary: Utilities based around the yum package manager
@@ -362,6 +362,39 @@
/usr/lib/yum-plugins/basearchonly.*
%changelog
+* Thu Jan 31 2008 cthiel@suse.de
+- update to version 1.1.11
+ * plugins/tmprepo/tmprepo.conf, plugins/tmprepo/tmprepo.py, yum-utils.spec:
+ Add --tmprepo as a plugin
+ * plugins/aliases/aliases.py: New help info. for aliases
+ * plugins/security/security.py: Add support for the new help
+ * plugins/list-data/list-data.py: Add support for the new help
+ * plugins/list-data/list-data.py: Fix bad import
+ * plugins/priorities/priorities.py: Make yum-priorities not eat CPU just by
+ installing it
+ * plugins/list-data/list-data.py: Use .committer property in HEAD
+ * debuginfo-install.py, repoclosure.py, repodiff.py, repomanage.py,
+ repotrack.py, yum-complete-transaction.py: add better usage explanations
+ to a lot of yum-utils. helps to give people an idea what the tool is
+ used for.
+ * plugins/list-data/list-data.conf, plugins/list-data/list-data.py,
+ yum-utils.spec: List vendors, groups, packagers, buildhosts, licenses,
+ arches, buildhosts, baseurls, package-sizes, archive-sizes,
+ installed-sizes, committers
+ * docs/package-cleanup.1: Reorder option docs to be sorted
+ * docs/package-cleanup.1: Remove duplicate doc
+ * repodiff.py: make sure this only operates on src rpms b/c otherwise bad
+ things happen
+ * repodiff.py: add -q, --new and --old options to repodiff. Correct some
+ logic issues in the diffing, fix up the output to a pipe
+ * yumdownloader.py: Remove hack for *-source repos.
+ * yumdownloader.py: Real fix for the __len__ problem. Don't disableRepo()
+ and then enable it, this even do the disable last ... oops.
+ * Makefile, repodiff.py, yum-utils.spec: add repodiff
+ * plugins/aliases/aliases.py: Workaround for bad yum module users
+ * plugins/security/security.py: Remove extra newlines, __str__ already
+ leads with one
+ * plugins/aliases/aliases: Remove empty lss alias and minor cleanup
* Tue Jan 22 2008 cthiel@suse.de
- fix yum.conf location to /etc/yum in various places (#350914)
* Mon Jan 07 2008 cthiel@suse.de
@@ -446,7 +479,7 @@
* package-cleanup.py: Added patch to make package-cleanup return exit code
* Fixed yumdownloader --url output to show the right url (rhbz #301981)
* various other fixes
-* Fri Oct 05 2007 cthiel@suse.de
+* Sat Oct 06 2007 cthiel@suse.de
- New basearchonly plugin
- New --repofrompath=repotag, option to specify local repos to
repoquery
++++++ yum-utils-1.1.10.tar.bz2 -> yum-utils-1.1.11.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.10/ChangeLog new/yum-utils-1.1.11/ChangeLog
--- old/yum-utils-1.1.10/ChangeLog 2008-01-03 15:57:26.000000000 +0100
+++ new/yum-utils-1.1.11/ChangeLog 2008-01-30 07:03:15.000000000 +0100
@@ -1,3 +1,109 @@
+2008-01-30 Tim Lauridsen
+
+ * yum-utils.spec: bumped yum-utils version to 1.1.11
+
+2008-01-28 James Antill
+
+ * plugins/tmprepo/tmprepo.conf, plugins/tmprepo/tmprepo.py,
+ yum-utils.spec: Add --tmprepo as a plugin
+
+2008-01-28 James Antill
+
+ * plugins/aliases/aliases.py: New help info. for aliases
+
+2008-01-25 James Antill
+
+ * plugins/security/security.py: Add support for the new help
+
+2008-01-25 James Antill
+
+ * plugins/list-data/list-data.py: Add support for the new help
+
+2008-01-25 James Antill
+
+ * plugins/list-data/list-data.py: Fix bad import
+
+2008-01-25 James Antill
+
+ * plugins/priorities/priorities.py: Make yum-priorities not eat CPU
+ just by installing it
+
+2008-01-23 James Antill
+
+ * plugins/list-data/list-data.py: Use .committer property in HEAD
+ yum
+
+2008-01-23 Seth Vidal
+
+ * debuginfo-install.py, repoclosure.py, repodiff.py, repomanage.py,
+ repotrack.py, yum-complete-transaction.py: add better usage
+ explanations to a lot of yum-utils. helps to give people an idea
+ what the tool is used for.
+
+2008-01-15 James Antill
+
+ * plugins/list-data/list-data.conf, plugins/list-data/list-data.py,
+ yum-utils.spec: List vendors, groups, packagers, buildhosts, licenses, arches,
+ buildhosts, baseurls, package-sizes, archive-sizes,
+ installed-sizes, committers
+
+2008-01-19 James Antill
+
+ * docs/package-cleanup.1: Reorder option docs to be sorted
+
+2008-01-19 James Antill
+
+ * docs/package-cleanup.1: Remove duplicate doc
+
+2008-01-18 Seth Vidal
+
+ * repodiff.py: make sure this only operates on src rpms b/c
+ otherwise bad things happen
+
+2008-01-18 James Antill
+
+ * yum-utils.spec: Fix typo
+
+2008-01-17 Seth Vidal
+
+ * repodiff.py: add -q, --new and --old options to repodiff. Correct
+ some logic issues in the diffing, fix up the output to a pipe
+
+2008-01-16 James Antill
+
+ * yumdownloader.py: Remove hack for *-source repos.
+
+2008-01-16 James Antill
+
+ * yumdownloader.py: Real fix for the __len__ problem. Don't disableRepo() and then
+ enable it, this even do the disable last ... oops.
+
+2008-01-13 Seth Vidal
+
+ add repodiff, merge yum-utils.spec
+
+2008-01-13 Seth Vidal
+
+ * Makefile, repodiff.py, yum-utils.spec: add repodiff
+
+2008-01-10 James Antill
+
+ * plugins/aliases/aliases.py: Workaround for bad yum module users
+
+2008-01-09 James Antill
+
+ * plugins/security/security.py: Remove extra newlines, __str__
+ already leads with one
+
+2008-01-09 James Antill
+
+ * plugins/aliases/aliases: Remove empty lss alias and minor cleanup
+
+
+2008-01-03 Tim Lauridsen
+
+ * ChangeLog: updated ChangeLog
+
2008-01-03 Tim Lauridsen
* Makefile: bumped yum-utils version to 1.1.10
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.10/debuginfo-install.py new/yum-utils-1.1.11/debuginfo-install.py
--- old/yum-utils-1.1.10/debuginfo-install.py 2008-01-03 15:57:26.000000000 +0100
+++ new/yum-utils-1.1.11/debuginfo-install.py 2008-01-30 07:03:15.000000000 +0100
@@ -28,7 +28,10 @@
class DebugInfoInstall(YumUtilBase):
NAME = 'debuginfo-install'
VERSION = '1.0'
- USAGE = '"usage: debuginfo-install [options] package1 [package2] [package..]'
+ USAGE = """
+ debuginfo-install: Install debuginfo packages and their dependencies based on
+ the name of the non-debug package
+ debuginfo-install [options] package1 [package2] [package..]"""
def __init__(self):
YumUtilBase.__init__(self,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.10/docs/package-cleanup.1 new/yum-utils-1.1.11/docs/package-cleanup.1
--- old/yum-utils-1.1.10/docs/package-cleanup.1 2008-01-03 15:57:26.000000000 +0100
+++ new/yum-utils-1.1.11/docs/package-cleanup.1 2008-01-30 07:03:15.000000000 +0100
@@ -9,28 +9,26 @@
\fBpackage-cleanup\fP is a program for cleaning up the locally-installed RPMs.
.PP
.SH "GENERAL OPTIONS"
-.IP "\fB\-v, \-\-version\fP"
-Report program version and exit.
+.IP "\fB\-c <config file>\fP"
+Use alternative config file (default is /etc/yum.conf).
.IP "\fB\-h, \-\-help\fP"
Help; display a help message and then quit\&.
.IP "\fB\-q, \-\-quiet\fP"
Print out nothing unecessary.
+.IP "\fB\-v, \-\-version\fP"
+Report program version and exit.
.IP "\fB\-y\fP"
Agree to anything asked.
-.IP "\fB\-c <config file>\fP"
-Use alternative config file (default is /etc/yum.conf).
-.IP "\fB\-\-problems\fP"
-List dependency problems in the local RPM database.
.IP "\fB\-\-leaves\fP"
List leaf nodes in the local RPM database. Leaf nodes are RPMs that
are not relied upon by any other RPM.
-.IP "\fB\-\-problems\fP"
-List dependency problems in the local RPM database.
.IP "\fB\-\-orphans\fP"
List installed packages which are not available from currenly configured
repositories.
.IP "\fB\-\-oldkernels\fP"
Remove old kernel and kernel-devel packages.
+.IP "\fB\-\-problems\fP"
+List dependency problems in the local RPM database.
.PP
.SH "LEAVES OPTIONS"
.IP "\fB\-\-all\fP"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.10/Makefile new/yum-utils-1.1.11/Makefile
--- old/yum-utils-1.1.10/Makefile 2008-01-03 15:57:26.000000000 +0100
+++ new/yum-utils-1.1.11/Makefile 2008-01-30 07:03:15.000000000 +0100
@@ -1,6 +1,6 @@
SUBDIRS = docs
PKGNAME = yum-utils
-UTILS = package-cleanup debuginfo-install repoclosure repomanage repoquery repo-graph repo-rss yumdownloader yum-builddep repotrack reposync yum-complete-transaction
+UTILS = package-cleanup debuginfo-install repoclosure repomanage repoquery repo-graph repo-rss yumdownloader yum-builddep repotrack reposync yum-complete-transaction repodiff
VERSION=$(shell awk '/Version:/ { print $$2 }' ${PKGNAME}.spec)
RELEASE=$(shell awk '/Release:/ { print $$2 }' ${PKGNAME}.spec)
WEBHOST = login.dulug.duke.edu
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.10/plugins/aliases/aliases new/yum-utils-1.1.11/plugins/aliases/aliases
--- old/yum-utils-1.1.10/plugins/aliases/aliases 2008-01-03 15:57:26.000000000 +0100
+++ new/yum-utils-1.1.11/plugins/aliases/aliases 2008-01-30 07:03:15.000000000 +0100
@@ -13,21 +13,22 @@
ALLSRC --enablerepo=*-source
ALLDBG --enablerepo=*-debuginfo
+FORCE --skip-broken --disableexcludes=all
+
up upgrade
inst install
ls list
lsi ls installed
lsu ls updates
-lss
lsec list-security
-lssu SEC ls updates
+lssu SEC lsu
-force-install --skip-broken --disableexcludes=all install
-force-inst --skip-broken --disableexcludes=all inst
-force-upgrade --skip-broken --disableexcludes=all upgrade
-force-up --skip-broken --disableexcludes=all up
-force-update --skip-broken --disableexcludes=all update
+force-install FORCE install
+force-inst FORCE inst
+force-upgrade FORCE upgrade
+force-up FORCE up
+force-update FORCE update
dbg-install DBG install
dbg-inst DBG inst
@@ -50,8 +51,8 @@
# lsecT UPT lsec
# lsecD DEV lsec
#
-# upT UPT update
-# upD DEV update
+# upT UPT up
+# upD DEV up
#
-# instT UPT install
-# instD DEV install
+# instT UPT inst
+# instD DEV inst
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.10/plugins/aliases/aliases.py new/yum-utils-1.1.11/plugins/aliases/aliases.py
--- old/yum-utils-1.1.10/plugins/aliases/aliases.py 2008-01-03 15:57:26.000000000 +0100
+++ new/yum-utils-1.1.11/plugins/aliases/aliases.py 2008-01-30 07:03:15.000000000 +0100
@@ -24,7 +24,11 @@
except:
class CliError: # Never used by yumex
pass
-from i18n import _
+
+try: # $rand yum using python code don't have i18n
+ from i18n import _
+except:
+ def _(x): return x
requires_api_version = '2.1'
plugin_type = (TYPE_INTERACTIVE,)
@@ -37,7 +41,10 @@
return [self.cmd]
def getUsage(self):
- return self.getNames()[0]
+ return ''
+
+ def getSummary(self):
+ return ''
# doCheck and doCommand are never called, for aliased commands.
@@ -85,6 +92,12 @@
def __init__(self):
AliasedCommand.__init__(self, "alias")
+ def getUsage(self):
+ return "[ALIAS] [expansion]"
+
+ def getSummary(self):
+ return "Adds or lists aliases"
+
def doCheck(self, base, basecmd, extcmds):
if len(extcmds) > 1: # Add a new alias
try:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.10/plugins/list-data/list-data.conf new/yum-utils-1.1.11/plugins/list-data/list-data.conf
--- old/yum-utils-1.1.10/plugins/list-data/list-data.conf 1970-01-01 01:00:00.000000000 +0100
+++ new/yum-utils-1.1.11/plugins/list-data/list-data.conf 2008-01-30 07:03:15.000000000 +0100
@@ -0,0 +1,2 @@
+[main]
+enabled=1
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.10/plugins/list-data/list-data.py new/yum-utils-1.1.11/plugins/list-data/list-data.py
--- old/yum-utils-1.1.10/plugins/list-data/list-data.py 1970-01-01 01:00:00.000000000 +0100
+++ new/yum-utils-1.1.11/plugins/list-data/list-data.py 2008-01-30 07:03:15.000000000 +0100
@@ -0,0 +1,232 @@
+#! /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.
+#
+#
+# Copyright Red Hat Inc. 2007, 2008
+#
+# Author: James Antill
+#
+# Examples:
+#
+# yum list-vendors
+# yum list-packagers yum*
+# yum list-groups updates
+
+
+import yum
+import types
+from yum.plugins import TYPE_INTERACTIVE
+import logging # for commands
+from yum import logginglevels
+
+# For baseurl
+import urlparse
+
+# Decent (UK/US English only) number formatting.
+import locale
+locale.setlocale(locale.LC_ALL, '')
+
+def loc_num(x):
+ """ Return a string of a number in the readable "locale" format. """
+ return locale.format("%d", int(x), True)
+
+requires_api_version = '2.5'
+plugin_type = (TYPE_INTERACTIVE,)
+
+class ListDataCommands:
+ unknown = "-- Unknown --"
+
+ def __init__(self, name, attr):
+ self.name = name
+ self.attr = attr
+
+ def getNames(self):
+ return ['list-' + self.name]
+
+ def getUsage(self):
+ return "[PACKAGE|all|installed|updates|extras|obsoletes|recent]"
+
+ def _getSummary(self):
+ return """\
+Display aggregate data on the %s attribute of a group of packages""" % self.attr
+
+ def getSummary(self):
+ return self._getSummary()
+
+ def doCheck(self, base, basecmd, extcmds):
+ pass
+
+ def show_pkgs(self, msg, pkgs):
+ pass
+
+ def show_data(self, msg, pkgs, name):
+ if not pkgs:
+ return
+ msg("%s %s %s" % ('=' * 20, name, '=' * 20))
+ pkgs.sort(key=lambda x: x.name)
+ calc = {}
+ for pkg in pkgs:
+ data = self.get_data(pkg)
+ calc.setdefault(data, []).append(pkg)
+ maxlen = 0
+ totlen = 0
+ for data in calc:
+ val = len(data)
+ totlen += len(calc[data])
+ if val > maxlen:
+ maxlen = val
+ fmt = "%%-%ds %%6s (%%3d%%%%)" % maxlen
+ for data in sorted(calc):
+ val = len(calc[data])
+ msg(fmt % (str(data), loc_num(val), (100 * val) / totlen))
+ self.show_pkgs(msg, calc[data])
+
+ # pkg.vendor has weird values, for instance
+ def get_data(self, data):
+ if not hasattr(data, self.attr):
+ return self.unknown
+
+ val = getattr(data, self.attr)
+ if val is None:
+ return self.unknown
+ if type(val) == type([]):
+ return self.unknown
+
+ tval = str(val).strip()
+ if tval == "":
+ return self.unknown
+
+ return val
+
+ def doCommand(self, base, basecmd, extcmds):
+ logger = logging.getLogger("yum.verbose.main")
+ def msg(x):
+ logger.log(logginglevels.INFO_2, x)
+ def msg_warn(x):
+ logger.warn(x)
+
+ ypl = base.returnPkgLists(extcmds)
+ self.show_data(msg, ypl.installed, 'Installed Packages')
+ self.show_data(msg, ypl.available, 'Available Packages')
+ self.show_data(msg, ypl.extras, 'Extra Packages')
+ self.show_data(msg, ypl.updates, 'Updated Packages')
+ self.show_data(msg, ypl.obsoletes, 'Obsoleting Packages')
+
+ return 0, [basecmd + ' done']
+
+class InfoDataCommands(ListDataCommands):
+ def getNames(self):
+ return ['info-' + self.name]
+
+ def getSummary(self):
+ return self._getSummary() + "\nAnd list all the packages under each"
+
+ def show_pkgs(self, msg, pkgs):
+ for pkg in pkgs:
+ msg(" %s" % (pkg))
+
+def url_get_data(self, data): # Special version for baseurl
+ val = self.oget_data(data)
+ if val == self.unknown:
+ return val
+ (scheme, netloc, path, query, fragid) = urlparse.urlsplit(val)
+ return "%s://%s/" % (scheme, netloc)
+
+class SizeRangeData:
+ def __init__(self, beg, msg):
+ self._beg = beg
+ self._msg = msg
+
+ def __cmp__(self, o):
+ if not hasattr(o, '_beg'):
+ return 1
+ return cmp(self._beg, o._beg)
+
+ def __str__(self):
+ return self._msg
+
+ def __len__(self):
+ return len(self._msg)
+
+ def __hash__(self):
+ return hash(self._msg)
+
+def size_get_data(self, data):
+ val = self.oget_data(data)
+ if val == self.unknown:
+ return val
+
+ # Even if it was sane, don't put 1GB and up here, or the alpha sorting
+ # won't be correct.
+ nums = (( 10 * 1024, " 10KB"),
+ ( 25 * 1024, " 25KB"),
+ ( 50 * 1024, " 50KB"),
+ ( 75 * 1024, " 75KB"),
+ (100 * 1024, "100KB"),
+ (250 * 1024, "250KB"),
+ (500 * 1024, "500KB"),
+ (750 * 1024, "750KB"),
+ ( 1 * 1024 * 1024, " 1MB"),
+ ( 5 * 1024 * 1024, " 5MB"),
+ ( 10 * 1024 * 1024, " 10MB"),
+ ( 50 * 1024 * 1024, " 50MB"),
+ (100 * 1024 * 1024, "100MB"),
+ (500 * 1024 * 1024, "500MB"),
+ )
+ pnum = (0, " 0KB")
+ for num in nums:
+ if val >= pnum[0] and val <= num[0]:
+ msg = "[ %s - %s ] " % (pnum[1], num[1])
+ return SizeRangeData(pnum[0], msg)
+ pnum = num
+ msg = "[ %s - %s ] " % (pnum[1], " " * len(pnum[1]))
+ return SizeRangeData(pnum[0], msg)
+
+def _list_data_custom(conduit, data, func):
+ cmd = ListDataCommands(*data)
+ cmd.oget_data = cmd.get_data
+ cmd.get_data = types.MethodType(func, cmd)
+ conduit.registerCommand(cmd)
+
+ cmd = InfoDataCommands(*data)
+ cmd.oget_data = cmd.get_data
+ cmd.get_data = types.MethodType(func, cmd)
+ conduit.registerCommand(cmd)
+
+
+def config_hook(conduit):
+ '''
+ Yum Plugin Config Hook:
+ Add the 'list-vendors', 'list-baseurls', 'list-packagers',
+ 'list-buildhosts' commands and the info varients.
+ '''
+
+ for data in [('vendors', 'vendor'),
+ ('groups', 'group'),
+ ('packagers', 'packager'),
+ ('licenses', 'license'),
+ ('arches', 'arch'),
+ ('committers', 'committer'),
+ ('buildhosts', 'buildhost')]:
+ conduit.registerCommand(ListDataCommands(*data))
+ conduit.registerCommand(InfoDataCommands(*data))
+
+ _list_data_custom(conduit, ('baseurls', 'url'), url_get_data)
+ _list_data_custom(conduit, ('package-sizes', 'packagesize'), size_get_data)
+ _list_data_custom(conduit, ('archive-sizes', 'archivesize'), size_get_data)
+ _list_data_custom(conduit, ('installed-sizes', 'installedsize'),
+ size_get_data)
+
+ # Buildtime/installtime/committime?
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.10/plugins/priorities/priorities.py new/yum-utils-1.1.11/plugins/priorities/priorities.py
--- old/yum-utils-1.1.10/plugins/priorities/priorities.py 2008-01-03 15:57:26.000000000 +0100
+++ new/yum-utils-1.1.11/plugins/priorities/priorities.py 2008-01-30 07:03:15.000000000 +0100
@@ -80,17 +80,31 @@
action='store_true', default = False,
help="Priority-exclude packages based on name + arch")
+def _all_repo_priorities_same(allrepos):
+ """ Are all repos are at the same priority """
+ first = None
+ for repo in allrepos:
+ if first is None:
+ first = repo.priority
+ elif first != repo.priority:
+ return False
+ return True
+
def exclude_hook(conduit):
global only_samearch
+ allrepos = conduit.getRepos().listEnabled()
+
+ # If they haven't done anything, don't do any work
+ if _all_repo_priorities_same(allrepos):
+ return
+
# Check whether the user specified the --samearch option.
opts, commands = conduit.getCmdLine()
if opts and opts.samearch:
only_samearch = True
cnt = 0
- allrepos = conduit.getRepos().listEnabled()
-
if check_obsoletes:
obsoletes = conduit._base.pkgSack.returnObsoletes()
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.10/plugins/security/security.py new/yum-utils-1.1.11/plugins/security/security.py
--- old/yum-utils-1.1.10/plugins/security/security.py 2008-01-03 15:57:26.000000000 +0100
+++ new/yum-utils-1.1.11/plugins/security/security.py 2008-01-30 07:03:15.000000000 +0100
@@ -159,7 +159,10 @@
return ['list-security', 'list-sec']
def getUsage(self):
- return self.getNames()[0]
+ return "[security|bugzilla|cve] [PACKAGE-wildcard]"
+
+ def getSummary(self):
+ return "Returns security data for the packages listed, that affects your system"
def doCheck(self, base, basecmd, extcmds):
pass
@@ -250,7 +253,6 @@
return
self.show_pkg_info_done[md['update_id']] = True
msg(md)
- msg('')
def show_pkg_exit(self):
self.show_pkg_info_done = {}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.10/plugins/tmprepo/tmprepo.conf new/yum-utils-1.1.11/plugins/tmprepo/tmprepo.conf
--- old/yum-utils-1.1.10/plugins/tmprepo/tmprepo.conf 1970-01-01 01:00:00.000000000 +0100
+++ new/yum-utils-1.1.11/plugins/tmprepo/tmprepo.conf 2008-01-30 07:03:15.000000000 +0100
@@ -0,0 +1,5 @@
+[main]
+enabled=1
+# You can uncomment this to allow tmporary repositories to disable/alter
+# gpg checking. This is not recommended.
+# gpgcheck=false
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.10/plugins/tmprepo/tmprepo.py new/yum-utils-1.1.11/plugins/tmprepo/tmprepo.py
--- old/yum-utils-1.1.10/plugins/tmprepo/tmprepo.py 1970-01-01 01:00:00.000000000 +0100
+++ new/yum-utils-1.1.11/plugins/tmprepo/tmprepo.py 2008-01-30 07:03:15.000000000 +0100
@@ -0,0 +1,103 @@
+#!/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 Red Hat Inc. 2007, 2008
+#
+# Author: James Antill
+# Examples:
+#
+# yum --tmprepo=http://example.com/foo/bar.repo ...
+
+import yum
+import types
+from yum.plugins import TYPE_INTERACTIVE
+import logging # for commands
+from yum import logginglevels
+
+import logging
+import urlgrabber.grabber
+import tempfile
+
+requires_api_version = '2.5'
+plugin_type = (TYPE_INTERACTIVE,)
+
+def make_validate(log, gpgcheck):
+ def tvalidate(repo):
+ if gpgcheck:
+
+ # Don't allow them to set gpgcheck=False
+ if not repo.gpgcheck:
+ log.warn("Repo %s tried to set gpgcheck=false" % repo)
+ return False
+
+ # Don't allow them to set gpgkey=anything
+ for key in repo.gpgkey:
+ if not key.startswith('file:/'):
+ log.warn("Repo %s tried to set gpgkey to %s" %
+ (repo, repo.gpgkey))
+ return False
+
+ return True
+
+ return tvalidate
+
+def add_repos(base, log, tmp_repos, tvalidate):
+ """ Add temporary repos to yum. """
+ # Don't use self._splitArg()? ... or require URLs without commas?
+ for trepo in tmp_repos:
+ tfo = tempfile.NamedTemporaryFile()
+ fname = tfo.name
+ grab = urlgrabber.grabber.URLGrabber()
+ try:
+ grab.urlgrab(trepo, fname)
+ except urlgrabber.grabber.URLGrabError, e:
+ log.warn("Failed to retrieve " + trepo)
+ continue
+
+ base.getReposFromConfigFile(fname, validate=tvalidate)
+ added = True
+
+ # Just do it all again...
+ base.setupProgressCallbacks()
+
+my_gpgcheck = True
+def config_hook(conduit):
+ '''
+ Yum Plugin Config Hook:
+ Add the --tmprepo option.
+ '''
+ global my_gpgcheck
+
+ parser = conduit.getOptParser()
+ if not parser:
+ return
+
+ parser.values.tmp_repos = []
+ parser.add_option("--tmprepo", action='append',
+ type='string', dest='tmp_repos', default=[],
+ help="enable one or more repositories from URLs",
+ metavar='[url]')
+ my_gpgcheck = conduit.confBool('main', 'gpgcheck', default=True)
+
+def prereposetup_hook(conduit):
+ '''
+ Process the tmp repos from --tmprepos.
+ '''
+
+ opts, args = conduit.getCmdLine()
+ log = logging.getLogger("yum.verbose.main")
+ add_repos(conduit._base, log, opts.tmp_repos,
+ make_validate(log, my_gpgcheck))
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.10/repoclosure.py new/yum-utils-1.1.11/repoclosure.py
--- old/yum-utils-1.1.10/repoclosure.py 2008-01-03 15:57:26.000000000 +0100
+++ new/yum-utils-1.1.11/repoclosure.py 2008-01-30 07:03:15.000000000 +0100
@@ -33,7 +33,13 @@
from yum.packageSack import ListPackageSack
def parseArgs():
- usage = "usage: %s [-c <config file>] [-a <arch>] [-r <repoid>] [-r <repoid2>]" % sys.argv[0]
+ usage = """
+ Read in the metadata of a series of repositories and check all the
+ dependencies in all packages for resolution. Print out the list of
+ packages with unresolved dependencies
+
+ %s [-c <config file>] [-a <arch>] [-r <repoid>] [-r <repoid2>]
+ """ % sys.argv[0]
parser = OptionParser(usage=usage)
parser.add_option("-c", "--config", default='/etc/yum.conf',
help='config file to use (defaults to /etc/yum.conf)')
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.10/repodiff.py new/yum-utils-1.1.11/repodiff.py
--- old/yum-utils-1.1.10/repodiff.py 1970-01-01 01:00:00.000000000 +0100
+++ new/yum-utils-1.1.11/repodiff.py 2008-01-30 07:03:15.000000000 +0100
@@ -0,0 +1,174 @@
+#!/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.
+# (c) 2007 Red Hat. Written by skvidal@fedoraproject.org
+
+import yum
+import rpmUtils
+import sys
+import time
+
+from optparse import OptionParser
+
+class DiffYum(yum.YumBase):
+ def __init__(self):
+ yum.YumBase.__init__(self)
+ self.dy_repos = {'old':[], 'new':[]}
+ self.dy_basecachedir = yum.misc.getCacheDir()
+
+ def dy_shutdown_all_other_repos(self):
+ # disable all the other repos
+ self.repos.disableRepo('*')
+
+
+ def dy_setup_repo(self, repotype, baseurl):
+ repoid = repotype + str (len(self.dy_repos[repotype]) + 1)
+ self.dy_repos[repotype].append(repoid)
+
+ # make our new repo obj
+ newrepo = yum.yumRepo.YumRepository(repoid)
+ newrepo.name = repoid
+ newrepo.baseurl = [baseurl]
+ newrepo.basecachedir = self.dy_basecachedir
+ newrepo.metadata_expire = 0
+ # add our new repo
+ self.repos.add(newrepo)
+ # enable that repo
+ self.repos.enableRepo(repoid)
+ # setup the repo dirs/etc
+ self.doRepoSetup(thisrepo=repoid)
+ archlist = ['src']
+ self._getSacks(archlist=archlist, thisrepo=repoid)
+
+ def dy_diff(self):
+ add = []
+ remove = []
+ modified = []
+ newsack = yum.packageSack.ListPackageSack()
+ for repoid in self.dy_repos['new']:
+ newsack.addList(self.pkgSack.returnPackages(repoid=repoid))
+
+ oldsack = yum.packageSack.ListPackageSack()
+ for repoid in self.dy_repos['old']:
+ oldsack.addList(self.pkgSack.returnPackages(repoid=repoid))
+
+ for pkg in newsack.returnNewestByName():
+ tot = self.pkgSack.searchNevra(name=pkg.name)
+ if len(tot) == 1: # it's only in new
+ add.append(pkg)
+ if len(tot) > 1:
+ if oldsack.contains(name=pkg.name):
+ newest_old = oldsack.returnNewestByName(name=pkg.name)[0]
+ modified.append((pkg, newest_old))
+ else:
+ add.append(pkg)
+
+ for pkg in oldsack.returnNewestByName():
+ if len(newsack.searchNevra(name=pkg.name)) == 0:
+ remove.append(pkg)
+
+ return add, remove, modified
+
+
+def parseArgs(args):
+ """
+ Parse the command line args. return a list of 'new' and 'old' repos
+ """
+ usage = """
+ repodiff: take 2 or more repositories and return a list of added, removed and changed
+ packages.
+
+ repodiff --old=old_repo_baseurl --new=new_repo_baseurl """
+
+ parser = OptionParser(version = "repodiff 0.2", usage=usage)
+ # query options
+ parser.add_option("-n", "--new", default=[], action="append",
+ help="new baseurl[s] for repos")
+ parser.add_option("-o", "--old", default=[], action="append",
+ help="old baseurl[s] for repos")
+ parser.add_option("-q", "--quiet", default=False, action='store_true')
+
+ (opts, argsleft) = parser.parse_args()
+
+ if not opts.new or not opts.old:
+ parser.print_usage()
+ sys.exit(1)
+
+ return opts
+
+def main(args):
+ opts = parseArgs(args)
+
+
+ my = DiffYum()
+ my.dy_shutdown_all_other_repos()
+
+ if not opts.quiet: print 'setting up repos'
+ for r in opts.old:
+ if not opts.quiet: print "setting up old repo %s" % r
+ try:
+ my.dy_setup_repo('old', r)
+ except yum.Errors.RepoError, e:
+ print "Could not setup repo at url %s: %s" % (r, e)
+ sys.exit(1)
+
+ for r in opts.new:
+ if not opts.quiet: print "setting up new repo %s" % r
+ try:
+ my.dy_setup_repo('new', r)
+ except yum.Errors.RepoError, e:
+ print "Could not setup repo at url %s: %s" % (r, e)
+ sys.exit(1)
+ if not opts.quiet: print 'performing the diff'
+ add, rem, mod = my.dy_diff()
+
+
+
+ if add:
+ for pkg in add:
+ print 'New package %s' % pkg.name
+ print ' %s' % pkg.summary
+
+ if rem:
+ for pkg in rem:
+ print 'Removed package %s' % pkg.name
+ if mod:
+ print 'Updated Packages:\n'
+ for (pkg, oldpkg) in mod:
+ msg = "%s-%s-%s" % (pkg.name, pkg.ver, pkg.rel)
+ dashes = "-" * len(msg)
+ msg += "\n%s\n" % dashes
+ # get newest clog time from the oldpkg
+ # for any newer clog in pkg
+ # print it
+ oldlogs = oldpkg.changelog
+ oldlogs.sort()
+ oldlogs.reverse()
+ if len(oldlogs):
+ oldtime = oldlogs[0][0]
+ clogdelta = []
+ for (t, author, content) in pkg.changelog:
+ if t > oldtime:
+ msg += "* %s %s\n%s\n\n" % (time.ctime(int(t)), author, content)
+
+ print msg
+
+
+if __name__ == "__main__":
+ # ARRRRRRGH
+ if not sys.stdout.isatty():
+ import codecs, locale
+ sys.stdout = codecs.getwriter(locale.getpreferredencoding())(sys.stdout)
+ main(sys.argv[1:])
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.10/repomanage.py new/yum-utils-1.1.11/repomanage.py
--- old/yum-utils-1.1.10/repomanage.py 2008-01-03 15:57:26.000000000 +0100
+++ new/yum-utils-1.1.11/repomanage.py 2008-01-30 07:03:15.000000000 +0100
@@ -136,7 +136,12 @@
def parseargs(args):
- usage = "repomanage [--old] [--new] path."
+ usage = """
+ repomanage: manage a directory of rpm packages. returns lists of newest
+ or oldest packages in a directory for easy piping to xargs
+ or similar programs.
+ repomanage [--old] [--new] path.
+ """
parser = OptionParser(usage=usage)
# new is only used to make sure that the user is not trying to get both
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.10/repotrack.py new/yum-utils-1.1.11/repotrack.py
--- old/yum-utils-1.1.10/repotrack.py 2008-01-03 15:57:26.000000000 +0100
+++ new/yum-utils-1.1.11/repotrack.py 2008-01-30 07:03:15.000000000 +0100
@@ -82,7 +82,12 @@
return False
def parseArgs():
- usage = "usage: %s [options] package1 [package2] [package..]" % sys.argv[0]
+ usage = """
+ Repotrack: keep current on any given pkg and its deps. It will download the package(s) you
+ want to track and all of their dependencies
+
+ %s [options] package1 [package2] [package..] """ % sys.argv[0]
+
parser = OptionParser(usage=usage)
parser.add_option("-c", "--config", default='/etc/yum.conf',
help='config file to use (defaults to /etc/yum.conf)')
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.10/yum-complete-transaction.py new/yum-utils-1.1.11/yum-complete-transaction.py
--- old/yum-utils-1.1.10/yum-complete-transaction.py 2008-01-03 15:57:26.000000000 +0100
+++ new/yum-utils-1.1.11/yum-complete-transaction.py 2008-01-30 07:03:15.000000000 +0100
@@ -98,7 +98,12 @@
class YumCompleteTransaction(YumUtilBase):
NAME = 'yum-complete-transactions'
VERSION = '1.0'
- USAGE = '"usage: yum-complete-transaction'
+ USAGE = """
+ yum-complete-transaction: completes unfinished yum transactions which occur due to error, failure
+ or act of $deity
+
+ usage: yum-complete-transaction
+ """
def __init__(self):
YumUtilBase.__init__(self,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.10/yumdownloader.py new/yum-utils-1.1.11/yumdownloader.py
--- old/yum-utils-1.1.10/yumdownloader.py 2008-01-03 15:57:26.000000000 +0100
+++ new/yum-utils-1.1.11/yumdownloader.py 2008-01-30 07:03:15.000000000 +0100
@@ -78,23 +78,40 @@
def setupSourceRepos(self):
# enable the -source repos for enabled primary repos
archlist = rpmUtils.arch.getArchList() + ['src']
+ # Ok, we have src and bin repos. What we want to do here is:
+ #
+ # 1. _enable_ source repos for which the bin repos are enabled.
+ # 2. _disable_ the _other_ src repos.
+ #
+ # ...also we don't want to disable the src repos. for #1 and then
+ # re-enable them as then we get annoying messages and call .close() on
+ # them losing the primarydb data etc.
+
+ # Get all src repos.
+ src_repos = {}
+ for repo in self.repos.findRepos('*-source'):
+ src_repos[repo.id] = False
+
+ # Find the enabled bin repos, and mark their respective *-source repo.
+ # as good.
for repo in self.repos.listEnabled():
- if not repo.id.endswith('-source'):
+ if repo.id not in src_repos:
srcrepo = '%s-source' % repo.id
- else:
+ if srcrepo in src_repos:
+ src_repos[srcrepo] = True
+
+ # Toggle src repos that are set the wrong way
+ for repo in self.repos.findRepos('*-source'):
+ if repo.isEnabled() and not src_repos[repo.id]:
repo.close()
self.repos.disableRepo(repo.id)
- srcrepo = repo.id
-
- for r in self.repos.findRepos(srcrepo):
- if r in self.repos.listEnabled():
- continue
- self.logger.info('Enabling %s repository' % r.id)
- r.enable()
+ if not repo.isEnabled() and src_repos[repo.id]:
+ self.logger.info('Enabling %s repository' % repo.id)
+ repo.enable()
# Setup the repo, without a cache
- r.setup(0)
+ repo.setup(0)
# Setup pkgSack with 'src' in the archlist
- self._getSacks(archlist=archlist,thisrepo=r.id)
+ self._getSacks(archlist=archlist, thisrepo=repo.id)
def downloadPackages(self,opts):
@@ -203,15 +220,9 @@
def doUtilYumSetup(self,opts):
"""do a default setup for all the normal/necessary yum components,
really just a shorthand for testing"""
- # FIXME - we need another way to do this, I think.
try:
self._getTs()
self._getRpmDB()
- # if running as non-root and '--source' is specified, then
- # disable all enabled *-source repos, because we dont want then to be initialized
- # yet.
- if self.conf.uid != 0 and opts.source:
- self._removeEnabledSourceRepos()
self._getRepos()
# if '--source' is used the add src to the archlist
if opts.source:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.10/yum-utils.spec new/yum-utils-1.1.11/yum-utils.spec
--- old/yum-utils-1.1.10/yum-utils.spec 2008-01-03 15:57:26.000000000 +0100
+++ new/yum-utils-1.1.11/yum-utils.spec 2008-01-30 07:03:15.000000000 +0100
@@ -1,6 +1,6 @@
Summary: Utilities based around the yum package manager
Name: yum-utils
-Version: 1.1.10
+Version: 1.1.11
Release: 1%{?dist}
License: GPL
Group: Development/Tools
@@ -203,6 +203,25 @@
This plugin adds the command alias, and parses the aliases config. file to
enable aliases.
+%package -n yum-list-data
+Summary: Yum plugin to list aggregate package data
+Group: System Environment/Base
+Requires: yum >= 3.0.5
+
+%description -n yum-list-data
+This plugin adds the commands list-vendors, groups, baseurls, packagers,
+buildhosts, licenses and arches.
+
+%package -n yum-tmprepo
+Summary: Yum plugin to add temporary repositories
+Group: System Environment/Base
+Requires: yum >= 3.0.5
+
+%description -n yum-tmprepo
+This plugin adds the option --tmprepo which takes a url to a .repo file
+downloads it and enables it for a single run. This plugin tries to ensure
+that temporary repositories are safe to use, by default, by not allowing
+gpg checking to be disabled.
%prep
%setup -q
@@ -215,7 +234,7 @@
# Plugins to install
plugins="changelog fastestmirror fedorakmod protectbase versionlock tsflags kernel-module \
downloadonly allowdowngrade skip-broken priorities refresh-updatesd merge-conf \
- security protect-packages basearchonly upgrade-helper aliases"
+ security protect-packages basearchonly upgrade-helper aliases list-data tmprepo"
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/yum/pluginconf.d/ $RPM_BUILD_ROOT/usr/lib/yum-plugins/
@@ -247,6 +266,7 @@
%{_bindir}/debuginfo-install
%{_bindir}/package-cleanup
%{_bindir}/repoclosure
+%{_bindir}/repodiff
%{_bindir}/repomanage
%{_bindir}/repoquery
%{_bindir}/repotrack
@@ -365,10 +385,26 @@
%config(noreplace) %{_sysconfdir}/yum/aliases.conf
/usr/lib/yum-plugins/aliases.*
+%files -n yum-list-data
+%defattr(-, root, root)
+%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/list-data.conf
+/usr/lib/yum-plugins/list-data.*
+
+%files -n yum-tmprepo
+%defattr(-, root, root)
+%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/tmprepo.conf
+/usr/lib/yum-plugins/tmprepo.*
+
%changelog
+* Wed Jan 30 2008 Tim Lauridsen
+- mark as 1.1.11
+* Sun Jan 13 2008 Seth Vidal <skvidal at fedoraproject.org>
+- add repodiff
+
* Thu Jan 3 2008 Tim Lauridsen
- mark as 1.1.10
+
* Thu Dec 12 2007 James Antill
- Add yum-aliases plugin
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org