Hello community,
here is the log from the commit of package yum-utils
checked in at Wed Jan 9 21:07:27 CET 2008.
--------
--- yum-utils/yum-utils.changes 2007-12-12 17:08:40.000000000 +0100
+++ /mounts/work_src_done/NOARCH/yum-utils/yum-utils.changes 2008-01-07 17:25:03.879403000 +0100
@@ -1,0 +2,27 @@
+Mon Jan 7 17:31:20 CET 2008 - cthiel@suse.de
+- update to version 1.1.10
+ * plugins/aliases/aliases.py: Quick work around for yumex
+ * debuginfo-install.py: make sure we're root to run debuginfo-install
+ closes rh bug #426470
+ * plugins/aliases/aliases, plugins/aliases/aliases.conf,
+ plugins/aliases/aliases.py: Add aliases module
+ * plugins/fastestmirror/fastestmirror.py: Strip any username:passwords
+ from our mirrors hostname before we display it
+ * plugins/fastestmirror/fastestmirror.py: Only display our mirrors if we
+ have some
+ * plugins/priorities/priorities.py: apply patch to fix rh bug: 421961 -
+ make sure we're passing in opts before we get the value of the opts.
+ * reposync.py: make sure that our repo url has a trailing /, otherwise
+ urljoin does the wrong thing. We should probably append this higher up
+ in the stack, too. closes rh bug: 421801
+ * plugins/basearchonly/basearchonly.py: Move conduit.getPackages until
+ needed, as it takes significant time
+ * yum-complete-transaction.py: make yum-complete-transaction backward
+ compat to yum 3.2.7/3.2.8
+ * docs/Makefile: add complete-transaction to doc makefile, too
+ * yum-complete-transaction.py: implement yum-util to clean up
+ unfinished/aborted transactions using transaction-done/transaction-all
+ files.
+ * repoclosure.py: Fix unreferenced variable in repoclosure.py
+
+-------------------------------------------------------------------
Old:
----
yum-utils-1.1.9.tar.bz2
New:
----
yum-utils-1.1.10.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yum-utils.spec ++++++
--- /var/tmp/diff_new_pack.R32739/_old 2008-01-09 21:06:29.000000000 +0100
+++ /var/tmp/diff_new_pack.R32739/_new 2008-01-09 21:06:29.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package yum-utils (Version 1.1.9)
+# spec file for package yum-utils (Version 1.1.10)
#
-# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@@ -12,7 +12,7 @@
Name: yum-utils
BuildRequires: python-devel
-Version: 1.1.9
+Version: 1.1.10
Release: 1
License: GPL v2 or later
Group: System/Packages
@@ -360,6 +360,31 @@
/usr/lib/yum-plugins/basearchonly.*
%changelog
+* Mon Jan 07 2008 - cthiel@suse.de
+- update to version 1.1.10
+ * plugins/aliases/aliases.py: Quick work around for yumex
+ * debuginfo-install.py: make sure we're root to run debuginfo-install
+ closes rh bug #426470
+ * plugins/aliases/aliases, plugins/aliases/aliases.conf,
+ plugins/aliases/aliases.py: Add aliases module
+ * plugins/fastestmirror/fastestmirror.py: Strip any username:passwords
+ from our mirrors hostname before we display it
+ * plugins/fastestmirror/fastestmirror.py: Only display our mirrors if we
+ have some
+ * plugins/priorities/priorities.py: apply patch to fix rh bug: 421961 -
+ make sure we're passing in opts before we get the value of the opts.
+ * reposync.py: make sure that our repo url has a trailing /, otherwise
+ urljoin does the wrong thing. We should probably append this higher up
+ in the stack, too. closes rh bug: 421801
+ * plugins/basearchonly/basearchonly.py: Move conduit.getPackages until
+ needed, as it takes significant time
+ * yum-complete-transaction.py: make yum-complete-transaction backward
+ compat to yum 3.2.7/3.2.8
+ * docs/Makefile: add complete-transaction to doc makefile, too
+ * yum-complete-transaction.py: implement yum-util to clean up
+ unfinished/aborted transactions using transaction-done/transaction-all
+ files.
+ * repoclosure.py: Fix unreferenced variable in repoclosure.py
* Wed Dec 12 2007 - cthiel@suse.de
- update to version 1.1.9
* package-cleanup.py: get rid of the confirmation to clean up old
++++++ yum-utils-1.1.9.tar.bz2 -> yum-utils-1.1.10.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.9/ChangeLog new/yum-utils-1.1.10/ChangeLog
--- old/yum-utils-1.1.9/ChangeLog 2007-12-07 09:59:11.000000000 +0100
+++ new/yum-utils-1.1.10/ChangeLog 2008-01-03 15:57:26.000000000 +0100
@@ -1,3 +1,126 @@
+2008-01-03 Tim Lauridsen
+
+ * Makefile: bumped yum-utils version to 1.1.10
+
+2008-01-03 Tim Lauridsen
+
+ * ChangeLog: updated ChangeLog
+
+2008-01-03 Tim Lauridsen
+
+ * yum-utils.spec: bumped yum-utils version to 1.1.10
+
+2008-01-03 Tim Lauridsen
+
+ * ChangeLog: updated ChangeLog
+
+2008-01-03 Tim Lauridsen
+
+ * yum-utils.spec: bumped yum-utils version to 1.1.10
+
+2007-12-21 James Antill
+
+ * plugins/aliases/aliases.py: Quick work around for yumex
+
+2007-12-21 Seth Vidal
+
+ * debuginfo-install.py: make sure we're root to run
+ debuginfo-install closes rh bug #426470
+
+2007-12-20 James Antill
+
+ * .gitignore: Match foo.py~ for backup files
+
+2007-12-20 James Antill
+
+ * yum-utils.spec: Fix typo
+
+2007-12-20 James Antill
+
+ * yum-utils.spec: Add yum-aliases to the specfile
+
+2007-12-20 James Antill
+
+ * plugins/aliases/aliases, plugins/aliases/aliases.conf,
+ plugins/aliases/aliases.py: Add aliases module
+
+2007-12-17 Luke Macken
+
+ * plugins/fastestmirror/ChangeLog,
+ plugins/fastestmirror/fastestmirror.py: Update fastestmirrors
+ ChangeLog, and do a rev bump
+
+2007-12-17 Luke Macken
+
+ * plugins/fastestmirror/fastestmirror.py: Strip any
+ username:passwords from our mirrors hostname before we display it
+
+2007-12-17 Luke Macken
+
+ * plugins/fastestmirror/fastestmirror.py: Only display our mirrors
+ if we have some
+
+2007-12-17 Seth Vidal
+
+ * plugins/priorities/priorities.py: apply patch to fix rh bug:
+ 421961 - make sure we're passing in opts before we get the value of
+ the opts.
+
+2007-12-12 Seth Vidal
+
+ Merge branch 'master' of
+ ssh://login.linux.duke.edu/home/groups/yum/git/yum-utils * 'master'
+ of ssh://login.linux.duke.edu/home/groups/yum/git/yum-utils: Move
+ conduit.getPackages until needed, as it takes significant time
+
+2007-12-12 Seth Vidal
+
+ * reposync.py: make sure that our repo url has a trailing /,
+ otherwise urljoin does the wrong thing. We should probably append
+ this higher up in the stack, too. closes rh bug: 421801
+
+2007-12-11 James Antill
+
+ * plugins/basearchonly/basearchonly.py: Move conduit.getPackages
+ until needed, as it takes significant time
+
+2007-12-10 Seth Vidal
+
+ * yum-complete-transaction.py: make yum-complete-transaction
+ backward compat to yum 3.2.7/3.2.8
+
+2007-12-10 Seth Vidal
+
+ * docs/Makefile: add complete-transaction to doc makefile, too
+
+2007-12-10 Seth Vidal
+
+ * Makefile, docs/yum-complete-transaction.1,
+ yum-complete-transaction.py, yum-utils.spec: add
+ yum-complete-transaction man page and update specfile/makefile
+
+2007-12-10 Seth Vidal
+
+ Merge branch 'master' of
+ ssh://login.linux.duke.edu/home/groups/yum/git/yum-utils * 'master'
+ of ssh://login.linux.duke.edu/home/groups/yum/git/yum-utils: Fix
+ unreferenced variable in repoclosure.py updated ChangeLog bumped
+ yum-utils version to 1.1.9 bumped yum-utils version to 1.1.9
+
+2007-12-10 Seth Vidal
+
+ * yum-complete-transaction.py: implement yum-util to clean up
+ unfinished/aborted transactions using
+ transaction-done/transaction-all files.
+
+2007-12-07 Luke Macken
+
+ * repoclosure.py: Fix unreferenced variable in repoclosure.py
+
+2007-12-07 Tim Lauridsen
+
+ * ChangeLog: updated ChangeLog
+
2007-12-07 Tim Lauridsen
* ChangeLog, yum-utils.spec: bumped yum-utils version to 1.1.9
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.9/debuginfo-install.py new/yum-utils-1.1.10/debuginfo-install.py
--- old/yum-utils-1.1.9/debuginfo-install.py 2007-12-07 09:59:11.000000000 +0100
+++ new/yum-utils-1.1.10/debuginfo-install.py 2008-01-03 15:57:26.000000000 +0100
@@ -15,6 +15,7 @@
# Copyright 2007 Seth Vidal
import sys
+import os
sys.path.insert(0,'/usr/share/yum-cli/')
import yum
@@ -46,7 +47,10 @@
if len(self.cmds) < 1:
parser.print_help()
sys.exit(0)
-
+ if os.geteuid() != 0:
+ print >> sys.stderr, "You must be root to run this command."
+ sys.exit(1)
+
# Setup yum (Ts, RPM db, Repo & Sack)
self.doUtilYumSetup()
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.9/docs/Makefile new/yum-utils-1.1.10/docs/Makefile
--- old/yum-utils-1.1.9/docs/Makefile 2007-12-07 09:59:11.000000000 +0100
+++ new/yum-utils-1.1.10/docs/Makefile 2008-01-03 15:57:26.000000000 +0100
@@ -1,4 +1,4 @@
-DOCS = repoquery package-cleanup repo-rss yumdownloader yum-builddep yum-changelog reposync
+DOCS = repoquery package-cleanup repo-rss yumdownloader yum-builddep yum-changelog reposync yum-complete-transaction
DOCS5 = yum-changelog.conf
DOCS8 = yum-security
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.9/docs/yum-complete-transaction.1 new/yum-utils-1.1.10/docs/yum-complete-transaction.1
--- old/yum-utils-1.1.9/docs/yum-complete-transaction.1 1970-01-01 01:00:00.000000000 +0100
+++ new/yum-utils-1.1.10/docs/yum-complete-transaction.1 2008-01-03 15:57:26.000000000 +0100
@@ -0,0 +1,48 @@
+.\" yum-complete-transaction
+.TH "yum-complete-transaction" "1" "2007 Dec 10" "Seth Vidal" ""
+.SH "NAME"
+yum-complete-transaction
+.SH "SYNOPSIS"
+\fByum-complete-transaction\fP
+.SH "DESCRIPTION"
+.PP
+\fByum-complete-transaction\fP is a program which finds incomplete or
+aborted yum transactions on a system and attempts to complete them. It
+looks at the transaction-all* and transaction-done* files which can normally
+be found in /var/lib/yum if a yum transaction aborted in the middle of
+execution.
+.PP
+If it finds more than one unfinished transaction it will attempt to complete
+the most recent one first. You can run it more than once to clean up all
+unfinished transactions.
+.PP
+.SH "FILES"
+As yum-complete-transaction uses YUM libraries for retrieving all the information, it
+relies on YUM configuration for its default values like which repositories
+to use. Consult YUM documentation for details:
+.PP
+.nf
+/etc/yum.conf
+/etc/yum/repos.d/
+/var/cache/yum/
+.fi
+
+.PP
+.SH "SEE ALSO"
+.nf
+.I yum.conf (5)
+.\"http://linux.duke.edu/yum-utils/
+http://linux.duke.edu/yum/
+.fi
+
+.PP
+.SH "AUTHORS"
+.nf
+See the Authors file included with this program.
+.fi
+
+.PP
+.SH "BUGS"
+There of course aren't any bugs, but if you find any, they should be sent
+to the mailing list: yum@lists.linux.duke.edu or filed in bugzilla.
+.fi
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.9/.gitignore new/yum-utils-1.1.10/.gitignore
--- old/yum-utils-1.1.9/.gitignore 2007-12-07 09:59:11.000000000 +0100
+++ new/yum-utils-1.1.10/.gitignore 2008-01-03 15:57:26.000000000 +0100
@@ -1,4 +1,4 @@
-*.~
+*~
*.bak
*.pyc
*.pyo
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.9/Makefile new/yum-utils-1.1.10/Makefile
--- old/yum-utils-1.1.9/Makefile 2007-12-07 09:59:11.000000000 +0100
+++ new/yum-utils-1.1.10/Makefile 2008-01-03 15:57:26.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
+UTILS = package-cleanup debuginfo-install repoclosure repomanage repoquery repo-graph repo-rss yumdownloader yum-builddep repotrack reposync yum-complete-transaction
VERSION=$(shell awk '/Version:/ { print $$2 }' ${PKGNAME}.spec)
RELEASE=$(shell awk '/Release:/ { print $$2 }' ${PKGNAME}.spec)
WEBHOST = login.dulug.duke.edu
@@ -34,7 +34,7 @@
@$(MAKE) ChangeLog
@git commit -a -m "updated ChangeLog"
@git push
- @git tag -a -m "Tagged ${PKGNAME}-$(VERSION)" ${PKGNAME}-$(VERSION)
+ @git tag -a -f -m "Tagged ${PKGNAME}-$(VERSION)" ${PKGNAME}-$(VERSION)
@git push --tags origin
@$(MAKE) upload
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.9/plugins/aliases/aliases new/yum-utils-1.1.10/plugins/aliases/aliases
--- old/yum-utils-1.1.9/plugins/aliases/aliases 1970-01-01 01:00:00.000000000 +0100
+++ new/yum-utils-1.1.10/plugins/aliases/aliases 2008-01-03 15:57:26.000000000 +0100
@@ -0,0 +1,57 @@
+
+# These are some aliases that a lot of people might find useful, well those
+# who install yum-aliases plugin anyway :). Note that they require alias
+# recursion, which is the default.
+
+DEV --enablerepo=development
+UPT --enablerepo=updates-testing
+SEC --security
+
+SRC --enablerepo=fedora-source --enablerepo=updates-source
+# Note that we/you can move to =X,Y in 3.2.9 onwards.
+DBG --enablerepo=fedora-debuginfo --enablerepo=updates-debuginfo
+ALLSRC --enablerepo=*-source
+ALLDBG --enablerepo=*-debuginfo
+
+up upgrade
+inst install
+
+ls list
+lsi ls installed
+lsu ls updates
+lss
+lsec list-security
+lssu SEC ls updates
+
+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
+
+dbg-install DBG install
+dbg-inst DBG inst
+
+# These are some example aliases, which probably aren't worth enabling for
+# everyone. Mostly useful for people who use DEV / UPT a lot.
+
+# lsT UPT ls
+# lsD DEV ls
+#
+# lsuT lsT updates
+# lsuD lsD updates
+#
+# lssT SEC lsT
+# lssD SEC lsD
+#
+# lssuT SEC lsT updates
+# lssuD SEC lsD updates
+#
+# lsecT UPT lsec
+# lsecD DEV lsec
+#
+# upT UPT update
+# upD DEV update
+#
+# instT UPT install
+# instD DEV install
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.9/plugins/aliases/aliases.conf new/yum-utils-1.1.10/plugins/aliases/aliases.conf
--- old/yum-utils-1.1.9/plugins/aliases/aliases.conf 1970-01-01 01:00:00.000000000 +0100
+++ new/yum-utils-1.1.10/plugins/aliases/aliases.conf 2008-01-03 15:57:26.000000000 +0100
@@ -0,0 +1,12 @@
+[main]
+enabled=1
+
+# conffile - config. file to use
+# <default> = /etc/yum/aliases.conf
+
+# recursive - whether aliases a resolved recursivly
+# <default> = True
+
+# register - register aliases a yum commands (so they are in yum help, TAB
+# complete things might pick them up then too).
+# <default> = False
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.9/plugins/aliases/aliases.py new/yum-utils-1.1.10/plugins/aliases/aliases.py
--- old/yum-utils-1.1.9/plugins/aliases/aliases.py 1970-01-01 01:00:00.000000000 +0100
+++ new/yum-utils-1.1.10/plugins/aliases/aliases.py 2008-01-03 15:57:26.000000000 +0100
@@ -0,0 +1,142 @@
+#!/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.
+#
+# by James Antill
+
+from yum.plugins import TYPE_INTERACTIVE
+import sys
+import time
+try: # yumex doesn't like import cli, but runs this
+ from cli import CliError
+except:
+ class CliError: # Never used by yumex
+ pass
+from i18n import _
+
+requires_api_version = '2.1'
+plugin_type = (TYPE_INTERACTIVE,)
+
+class AliasedCommand:
+ def __init__(self, cmd):
+ self.cmd = cmd
+
+ def getNames(self):
+ return [self.cmd]
+
+ def getUsage(self):
+ return self.getNames()[0]
+
+ # doCheck and doCommand are never called, for aliased commands.
+
+
+aliases = None
+conffile = None
+recursive = None
+def parse_aliases(conffile):
+ aliases = {}
+ for line in file(conffile):
+ args = line.split()
+ if len(args) < 2 or args[0][0] == '#':
+ continue
+ cmd = args.pop(0)
+ aliases[cmd] = args
+ return aliases
+
+def resolve_aliases(args, log, skip=0):
+ need_rep = True
+ while need_rep:
+ need_rep = False
+ num = skip
+ for arg in args[skip:]:
+ if arg[0] != '-':
+ break
+ num += 1
+
+ if num >= len(args): # Only options
+ break
+
+ enum = num + 1
+ for cmd in aliases:
+ if cmd == args[num]:
+ log(3, 'ALIAS DONE(%s): %s' % (cmd, str(aliases[cmd])))
+ args[num:enum] = aliases[cmd]
+ # Mostly works like the shell, so \ls does no alias lookup on ls
+ if args[num][0] == '\\':
+ args[num] = args[num][1:]
+ else:
+ need_rep = recursive
+ break
+
+
+class AliasCommand(AliasedCommand):
+ def __init__(self):
+ AliasedCommand.__init__(self, "alias")
+
+ def doCheck(self, base, basecmd, extcmds):
+ if len(extcmds) > 1: # Add a new alias
+ try:
+ open(conffile, "a").close()
+ except:
+ base.logger.critical(_("Can't open aliases file: %s") %
+ conffile)
+ raise CliError
+
+ def doCommand(self, base, basecmd, extcmds):
+ if len(extcmds) > 1: # Add a new alias
+ fo = open(conffile, "a")
+ fo.write(_("\n# Alias added on %s\n%s\n") % (time.ctime(),
+ ' '.join(extcmds)))
+ fo.close()
+ return 0, [basecmd + ' done']
+
+ if len(extcmds) == 1: # Show just a single alias
+ cmd = extcmds[0]
+ if cmd not in aliases:
+ return 1, [_("%s, no match for %s") % (basecmd, cmd)]
+
+ args = [cmd]
+ resolve_aliases(args, lambda x,y: base.verbose_logger.debug(y))
+ print _("Alias %s = %s") % (cmd, " ".join(args))
+ return 0, [basecmd + ' done']
+
+
+ for cmd in sorted(aliases.keys()):
+ args = aliases[cmd][:]
+ resolve_aliases(args, lambda x,y: base.verbose_logger.debug(y))
+ print _("Alias %s = %s") % (cmd, " ".join(args))
+
+ return 0, [basecmd + ' done']
+
+
+def config_hook(conduit):
+ global aliases
+ global conffile
+ global recursive
+
+ conffile = conduit.confString('main', 'conffile',
+ default='/etc/yum/aliases.conf')
+ recursive = conduit.confBool('main', 'recursive', default=True)
+ register = conduit.confBool('main', 'register', default=False)
+
+ conduit.registerCommand(AliasCommand())
+ aliases = parse_aliases(conffile)
+ if register:
+ for cmd in aliases:
+ conduit.registerCommand(AliasedCommand(cmd))
+
+ # Skip the yum cmd itself
+ resolve_aliases(args=sys.argv, skip=1, log=conduit.info)
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.9/plugins/basearchonly/basearchonly.py new/yum-utils-1.1.10/plugins/basearchonly/basearchonly.py
--- old/yum-utils-1.1.9/plugins/basearchonly/basearchonly.py 2007-12-07 09:59:11.000000000 +0100
+++ new/yum-utils-1.1.10/plugins/basearchonly/basearchonly.py 2008-01-03 15:57:26.000000000 +0100
@@ -45,8 +45,6 @@
whitelist = []
skippkg = 0
conf , cmd = conduit.getCmdLine()
- packageList = conduit.getPackages()
- excludearch = re.compile(excludearchP);
if not cmd:
return
@@ -54,6 +52,9 @@
if cmd[0] != "install":
return
+ packageList = conduit.getPackages()
+ excludearch = re.compile(excludearchP);
+
""" get whitelist from config file """
conflist = conduit.confString(barch, 'whitelist')
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.9/plugins/fastestmirror/ChangeLog new/yum-utils-1.1.10/plugins/fastestmirror/ChangeLog
--- old/yum-utils-1.1.9/plugins/fastestmirror/ChangeLog 2007-12-07 09:59:11.000000000 +0100
+++ new/yum-utils-1.1.10/plugins/fastestmirror/ChangeLog 2008-01-03 15:57:26.000000000 +0100
@@ -1,3 +1,7 @@
+* Dec 17 2007 Luke Macken - 0.3.2
+- Only display our mirrors if we have any
+- Strip any username:passwords from our mirrors hostname before we display it
+
* Dec 3 2007 Luke Macken - 0.3.1
- Support multiple excludes
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.9/plugins/fastestmirror/fastestmirror.py new/yum-utils-1.1.10/plugins/fastestmirror/fastestmirror.py
--- old/yum-utils-1.1.9/plugins/fastestmirror/fastestmirror.py 2007-12-07 09:59:11.000000000 +0100
+++ new/yum-utils-1.1.10/plugins/fastestmirror/fastestmirror.py 2008-01-03 15:57:26.000000000 +0100
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Version: 0.3.1
+# Version: 0.3.2
#
# A plugin for the Yellowdog Updater Modified which sorts each repo's
# mirrorlist by connection speed prior to download.
@@ -73,7 +73,8 @@
conduit.info(2, "Cleaning up list of fastest mirrors")
os.unlink(hostfilepath)
-host = lambda mirror: mirror.split('/')[2]
+# Get the hostname from a url, stripping away any usernames/passwords
+host = lambda mirror: mirror.split('/')[2].split('@')[-1]
def postreposetup_hook(conduit):
global loadcache, exclude
@@ -94,7 +95,8 @@
conduit.info(2, "Excluding mirror: %s" % host(mirror))
repomirrors[str(repo)].remove(mirror)
repo.urls = repomirrors[str(repo)]
- conduit.info(2, " * %s: %s" % (str(repo), host(repo.urls[0])))
+ if len(repo.urls):
+ conduit.info(2, " * %s: %s" % (str(repo), host(repo.urls[0])))
repo.failovermethod = 'priority'
repo.check()
repo.setupGrab()
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.9/plugins/priorities/priorities.py new/yum-utils-1.1.10/plugins/priorities/priorities.py
--- old/yum-utils-1.1.9/plugins/priorities/priorities.py 2007-12-07 09:59:11.000000000 +0100
+++ new/yum-utils-1.1.10/plugins/priorities/priorities.py 2008-01-03 15:57:26.000000000 +0100
@@ -85,7 +85,7 @@
# Check whether the user specified the --samearch option.
opts, commands = conduit.getCmdLine()
- if opts.samearch:
+ if opts and opts.samearch:
only_samearch = True
cnt = 0
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.9/repoclosure.py new/yum-utils-1.1.10/repoclosure.py
--- old/yum-utils-1.1.9/repoclosure.py 2007-12-07 09:59:11.000000000 +0100
+++ new/yum-utils-1.1.10/repoclosure.py 2008-01-03 15:57:26.000000000 +0100
@@ -170,7 +170,7 @@
try:
my.readMetadata()
except yum.Errors.RepoError, e:
- my.logger.info('Filelists not available for repo: %s' % repo)
+ my.logger.info(e)
my.logger.info('Some dependencies may not be complete for this repository')
my.logger.info('Run as root to get all dependencies or use -t to enable a user temp cache')
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.9/reposync.py new/yum-utils-1.1.10/reposync.py
--- old/yum-utils-1.1.9/reposync.py 2007-12-07 09:59:11.000000000 +0100
+++ new/yum-utils-1.1.10/reposync.py 2008-01-03 15:57:26.000000000 +0100
@@ -222,7 +222,9 @@
continue
if opts.urls:
- url = urljoin(repo.urls[0],remote)
+ if repo.urls[0][-1] != '/':
+ baseurl = repo.urls[0] + '/'
+ url = urljoin(baseurl,remote)
print '%s' % url
continue
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.9/yum-complete-transaction.py new/yum-utils-1.1.10/yum-complete-transaction.py
--- old/yum-utils-1.1.9/yum-complete-transaction.py 1970-01-01 01:00:00.000000000 +0100
+++ new/yum-utils-1.1.10/yum-complete-transaction.py 2008-01-03 15:57:26.000000000 +0100
@@ -0,0 +1,191 @@
+#!/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.
+
+import sys
+sys.path.insert(0,'/usr/share/yum-cli')
+
+import yum
+from yum.misc import getCacheDir
+
+from cli import *
+from utils import YumUtilBase
+
+from urlparse import urljoin
+from urlgrabber.progress import TextMeter
+
+
+try:
+ from yum.misc import find_unfinished_transactions, find_ts_remaining
+except ImportError:
+
+ import glob
+ import os
+ import os.path
+
+ def find_unfinished_transactions(yumlibpath='/var/lib/yum'):
+ """returns a list of the timestamps from the filenames of the unfinished
+ transactions remaining in the yumlibpath specified.
+ """
+ timestamps = []
+ tsallg = '%s/%s' % (yumlibpath, 'transaction-all*')
+ tsdoneg = '%s/%s' % (yumlibpath, 'transaction-done*')
+ tsalls = glob.glob(tsallg)
+ tsdones = glob.glob(tsdoneg)
+
+ for fn in tsalls:
+ trans = os.path.basename(fn)
+ timestamp = trans.replace('transaction-all.','')
+ timestamps.append(timestamp)
+
+ timestamps.sort()
+ return timestamps
+
+ def find_ts_remaining(timestamp, yumlibpath='/var/lib/yum'):
+ """this function takes the timestamp of the transaction to look at and
+ the path to the yum lib dir (defaults to /var/lib/yum)
+ returns a list of tuples(action, pkgspec) for the unfinished transaction
+ elements. Returns an empty list if none.
+
+ """
+
+ to_complete_items = []
+ tsallpath = '%s/%s.%s' % (yumlibpath, 'transaction-all', timestamp)
+ tsdonepath = '%s/%s.%s' % (yumlibpath,'transaction-done', timestamp)
+ tsdone_items = []
+
+ if not os.path.exists(tsallpath):
+ # something is wrong, here, probably need to raise _something_
+ return to_complete_items
+
+
+ if os.path.exists(tsdonepath):
+ tsdone_fo = open(tsdonepath, 'r')
+ tsdone_items = tsdone_fo.readlines()
+ tsdone_fo.close()
+
+ tsall_fo = open(tsallpath, 'r')
+ tsall_items = tsall_fo.readlines()
+ tsall_fo.close()
+
+ for item in tsdone_items:
+ # this probably shouldn't happen but it's worth catching anyway
+ if item not in tsall_items:
+ continue
+ tsall_items.remove(item)
+
+ for item in tsall_items:
+ item = item.replace('\n', '')
+ if item == '':
+ continue
+ (action, pkgspec) = item.split()
+ to_complete_items.append((action, pkgspec))
+
+ return to_complete_items
+
+class YumCompleteTransaction(YumUtilBase):
+ NAME = 'yum-complete-transactions'
+ VERSION = '1.0'
+ USAGE = '"usage: yum-complete-transaction'
+
+ def __init__(self):
+ YumUtilBase.__init__(self,
+ YumCompleteTransaction.NAME,
+ YumCompleteTransaction.VERSION,
+ YumCompleteTransaction.USAGE)
+ self.logger = logging.getLogger("yum.verbose.cli.yumcompletets")
+ self.main()
+
+ def clean_up_ts_files(self, timestamp, path):
+
+ # clean up the transactions
+ tsdone = '%s/transaction-done.%s' % (path, timestamp)
+ tsall = '%s/transaction-all.%s' % (path, timestamp)
+ os.unlink(tsdone)
+ os.unlink(tsall)
+
+ def main(self):
+ # Add util commandline options to the yum-cli ones
+ parser = self.getOptionParser()
+ # Parse the commandline option and setup the basics.
+ try:
+ opts = self.doUtilConfigSetup()
+ except yum.Errors.RepoError, e:
+ self.logger.error("Cannot handle specific enablerepo/disablerepo options.")
+ sys.exit(50)
+
+ # Check if there is anything to do.
+# if len(self.cmds) < 1:
+# parser.print_help()
+# sys.exit(0)
+
+ if self.conf.uid != 0:
+ self.logger.error("Error: You must be root to finish transactions")
+ sys.exit(1)
+
+ # Setup yum (Ts, RPM db, Repo & Sack)
+ self.doUtilYumSetup()
+ # Do the real action
+ # get the list of transactions remaining
+ # list the number of them
+ # take the most recent one
+ # populate the ts
+ # run it
+ times = find_unfinished_transactions(self.conf.persistdir)
+ if not times:
+ print "No unfinished transactions left."
+ sys.exit()
+
+ print "There are %d outstanding transactions to complete. Finishing the most recent one" % len(times)
+
+ timestamp = times[-1]
+ remaining = find_ts_remaining(timestamp, yumlibpath=self.conf.persistdir)
+ print "The remaining transaction had %d elements left to run" % len(remaining)
+ for (action, pkgspec) in remaining:
+ if action == 'install':
+ try:
+ self.install(pattern=pkgspec)
+ except yum.Errors.InstallError, e:
+ pass
+
+ if action == 'erase':
+ (e, m, u) = self.rpmdb.matchPackageNames([pkgspec])
+ for pkg in e:
+ self.remove(po=pkg)
+
+
+
+ self.buildTransaction()
+ if len(self.tsInfo) < 1:
+ print 'Nothing in the unfinished transaction to cleanup.'
+ print "Cleaning up completed transaction file"
+ self.clean_up_ts_files(timestamp, self.conf.persistdir)
+ sys.exit()
+
+ else:
+ if self.doTransaction():
+ print "Cleaning up completed transaction file"
+ self.clean_up_ts_files(timestamp, self.conf.persistdir)
+ sys.exit()
+
+
+
+
+
+
+if __name__ == '__main__':
+ util = YumCompleteTransaction()
+
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-utils-1.1.9/yum-utils.spec new/yum-utils-1.1.10/yum-utils.spec
--- old/yum-utils-1.1.9/yum-utils.spec 2007-12-07 09:59:11.000000000 +0100
+++ new/yum-utils-1.1.10/yum-utils.spec 2008-01-03 15:57:26.000000000 +0100
@@ -1,6 +1,6 @@
Summary: Utilities based around the yum package manager
Name: yum-utils
-Version: 1.1.9
+Version: 1.1.10
Release: 1%{?dist}
License: GPL
Group: Development/Tools
@@ -157,7 +157,7 @@
Requires: yum >= 3.0.5
%description -n yum-security
-This plugin adds ther options --security, --cve, --bz and --advisory flags
+This plugin adds the options --security, --cve, --bz and --advisory flags
to yum and the list-security and info-security commands.
The options make it possible to limit list/upgrade of packages to specific
security relevant ones. The commands give you the security information.
@@ -194,6 +194,15 @@
this plugin allows yum to erase specific packages on install/update based on an additional
metadata file in repositories. It is used to simplify distribution upgrade hangups.
+%package -n yum-aliases
+Summary: Yum plugin to enable aliases filters
+Group: System Environment/Base
+Requires: yum >= 3.0.5
+
+%description -n yum-aliases
+This plugin adds the command alias, and parses the aliases config. file to
+enable aliases.
+
%prep
%setup -q
@@ -206,7 +215,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"
+ security protect-packages basearchonly upgrade-helper aliases"
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/yum/pluginconf.d/ $RPM_BUILD_ROOT/usr/lib/yum-plugins/
@@ -215,6 +224,8 @@
install -m 644 $plug/*.conf $RPM_BUILD_ROOT/%{_sysconfdir}/yum/pluginconf.d/
install -m 644 $plug/*.py $RPM_BUILD_ROOT/usr/lib/yum-plugins/
done
+install -m 644 aliases/aliases $RPM_BUILD_ROOT/%{_sysconfdir}/yum/aliases.conf
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -244,11 +255,13 @@
%{_bindir}/repo-rss
%{_bindir}/yumdownloader
%{_bindir}/yum-builddep
+%{_bindir}/yum-complete-transaction
%{_mandir}/man1/package-cleanup.1.*
%{_mandir}/man1/repo-rss.1.*
%{_mandir}/man1/repoquery.1.*
%{_mandir}/man1/reposync.1.*
%{_mandir}/man1/yum-builddep.1.*
+%{_mandir}/man1/yum-complete-transaction.1.*
%{_mandir}/man1/yumdownloader.1.*
%files -n yum-updateonboot
@@ -346,8 +359,19 @@
%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/upgrade-helper.conf
/usr/lib/yum-plugins/upgrade-helper.*
+%files -n yum-aliases
+%defattr(-, root, root)
+%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/aliases.conf
+%config(noreplace) %{_sysconfdir}/yum/aliases.conf
+/usr/lib/yum-plugins/aliases.*
+
%changelog
+* Thu Jan 3 2008 Tim Lauridsen
+- mark as 1.1.10
+* Thu Dec 12 2007 James Antill
+- Add yum-aliases plugin
+
* Fri Dec 7 2007 Tim Lauridsen
- mark as 1.1.9
* Fri Oct 26 2007 Seth Vidal <skvidal at fedoraproject.org>
++++++ yum-utils-1.1.6.patch ++++++
--- /var/tmp/diff_new_pack.R32739/_old 2008-01-09 21:06:30.000000000 +0100
+++ /var/tmp/diff_new_pack.R32739/_new 2008-01-09 21:06:30.000000000 +0100
@@ -11,7 +11,7 @@
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
- # Version: 0.3.1
+ # Version: 0.3.2
#
# A plugin for the Yellowdog Updater Modified which sorts each repo's
--- plugins/priorities/priorities.py
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org