Compare commits

...
Sign in to create a new pull request.

16 commits

Author SHA1 Message Date
Seth Vidal
22f20d5fb4 bump and build to fix 640181 2010-10-05 08:59:11 -04:00
James Antill
29f1fae4a9 Fix auto-close bug with GPG key installs. 2010-09-14 10:47:01 -04:00
Seth Vidal
babb970c81 obsolete download order 2010-08-27 13:52:08 -04:00
Seth Vidal
3d71444d5c latest head
clean up spec to make it as similar as possible to f14's
2010-08-12 12:29:28 -04:00
Seth Vidal
ef5e3fd932 latest head for f13 2010-08-09 15:28:54 -04:00
Seth Vidal
0122804688 yum-3.2.28
- new manpages patch
2010-07-30 17:00:06 -04:00
Fedora Release Engineering
9eb92dba9f dist-git conversion 2010-07-29 16:24:09 +00:00
Seth Vidal
75f60bc606 bump the release, for real this time :( 2010-05-03 15:43:41 +00:00
Seth Vidal
7fb329a548 add chroot-without-dupe patch from upstream new number 2010-05-03 15:41:49 +00:00
Seth Vidal
fdf25b7a3b add reget size patch 2010-04-08 21:12:49 +00:00
Seth Vidal
4b08dd1ac3 fix PK on f13, too 2010-03-23 14:25:39 +00:00
Seth Vidal
8813fcbcab 3.2.27 for F13 2010-03-18 18:41:09 +00:00
Seth Vidal
5e178085ec latest head before 3.2.27 2010-03-11 14:53:51 +00:00
Seth Vidal
9b88ed5603 build this one so I can refer to it in koji - fixing the skip-broken issue 2010-03-04 18:30:42 +00:00
Seth Vidal
d06250b69c fix to the fix for f13 2010-02-18 04:07:09 +00:00
Jesse Keating
6058ca4354 Initialize branch F-13 for yum 2010-02-17 03:34:55 +00:00
11 changed files with 747 additions and 16491 deletions

View file

View file

@ -1,21 +0,0 @@
# Makefile for source rpm: yum
# $Id: Makefile,v 1.2 2007/10/15 19:38:44 notting Exp $
NAME := yum
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attempt a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View file

@ -0,0 +1,60 @@
commit f48b1d9f0ede0eae518f5b353ed9dda74dde6d7c
Author: Seth Vidal <skvidal@fedoraproject.org>
Date: Fri Apr 30 12:16:54 2010 -0400
make sure we're not prepending a path which is already been prepended
with the installroot
fixes rh bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=577627
and
https://bugzilla.redhat.com/show_bug.cgi?id=560078
diff --git a/yum/rpmsack.py b/yum/rpmsack.py
index 83268cc..6a40939 100644
--- a/yum/rpmsack.py
+++ b/yum/rpmsack.py
@@ -171,7 +171,10 @@ class RPMDBPackageSack(PackageSackBase):
if cachedir is None:
cachedir = misc.getCacheDir()
self.setCacheDir(cachedir)
- self._persistdir = root + '/' + persistdir
+ if not os.path.normpath(persistdir).startswith(self.root):
+ self._persistdir = root + '/' + persistdir
+ else:
+ self._persistdir = persistdir
self._have_cached_rpmdbv_data = None
self._cached_conflicts_data = None
# Store the result of what happens, if a transaction completes.
@@ -231,7 +234,10 @@ class RPMDBPackageSack(PackageSackBase):
def setCacheDir(self, cachedir):
""" Sets the internal cachedir value for the rpmdb, to be the
"installed" directory from this parent. """
- self._cachedir = self.root + '/' + cachedir + "/installed/"
+ if not os.path.normpath(cachedir).startswith(self.root):
+ self._cachedir = self.root + '/' + cachedir + "/installed/"
+ else:
+ self._cachedir = '/' + cachedir + "/installed/"
def readOnlyTS(self):
if not self.ts:
commit 9714379777bfa6569a46ef8d2cc1131b951eebf7
Author: Seth Vidal <skvidal@fedoraproject.org>
Date: Fri Apr 30 12:28:10 2010 -0400
and do the same for the history db with an --installroot
--- a/yum/history.py~ 2010-02-10 11:40:37.000000000 -0500
+++ b/yum/history.py 2010-05-03 11:38:09.000000000 -0400
@@ -176,7 +176,10 @@
self._conn = None
self.conf = yum.misc.GenericHolder()
- self.conf.db_path = os.path.normpath(root + '/' + db_path)
+ if not os.path.normpath(db_path).startswith(root):
+ self.conf.db_path = os.path.normpath(root + '/' + db_path)
+ else:
+ self.conf.db_path = os.path.normpath('/' + db_path)
self.conf.writable = False
if not os.path.exists(self.conf.db_path):

View file

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

View file

@ -1 +1 @@
84eede25288772f38719d5c9e13ae75e yum-3.2.26.tar.gz
91eff58aa4c25cd4f46b21201bbf9bea yum-3.2.28.tar.gz

File diff suppressed because it is too large Load diff

View file

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

View file

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

View file

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

View file

@ -1,20 +1,38 @@
diff -urN olddocs/yum.8 docs/yum.8
--- olddocs/yum.8 2008-03-17 12:09:29.000000000 -0400
+++ docs/yum.8 2008-03-17 12:08:18.000000000 -0400
@@ -339,8 +339,8 @@
commit 102915d4d402493c48d434ae1d1756225c4468e0
Author: James Antill <james@and.org>
Date: Mon Jun 14 01:15:21 2010 -0400
Port manpage files path fixups.
diff --git a/docs/yum.8 b/docs/yum.8
index d5ede0a..3bdb408 100644
--- a/docs/yum.8
+++ b/docs/yum.8
@@ -568,7 +568,7 @@ option in yum.conf. For a plugin to work, the following conditions must be met:
1. The plugin module file must be installed in the plugin path as just
described.
.LP
-2. The global \fBplugins\fP option in /etc/yum/yum.conf must be set to `1'.
+2. The global \fBplugins\fP option in /etc/yum.conf must be set to `1'.
.LP
3. A configuration file for the plugin must exist in
/etc/yum/pluginconf.d/<plugin_name>.conf and the \fBenabled\fR setting in this
@@ -584,9 +584,9 @@ configuration options.
.PP
.SH "FILES"
.nf
-/etc/yum/yum.conf
-/etc/yum/repos.d/
+/etc/yum.conf
/etc/yum/version-groups.conf
-/etc/yum/repos.d/
+/etc/yum.repos.d/
/etc/yum/pluginconf.d/
/var/cache/yum/
.fi
--- olddocs/yum.conf.5.orig 2009-01-21 13:33:04.000000000 -0500
+++ docs/yum.conf.5 2009-01-21 13:34:47.000000000 -0500
diff --git a/docs/yum.conf.5 b/docs/yum.conf.5
index ca36103..42815b9 100644
--- a/docs/yum.conf.5
+++ b/docs/yum.conf.5
@@ -4,10 +4,10 @@
\fByum.conf\fR \- Configuration file for \fByum(8)\fR.
.SH "DESCRIPTION"
@ -28,9 +46,9 @@ diff -urN olddocs/yum.8 docs/yum.8
See the \fBreposdir\fR option below for further details.
.SH "PARAMETERS"
@@ -38,10 +38,10 @@
.IP \fBreposdir\fR
@@ -42,10 +42,10 @@ of headers and packages after successful installation. Default is '1'
.IP
\fBreposdir\fR
A list of directories where yum should look for .repo files which define
-repositories to use. Default is `/etc/yum/repos.d'. Each
+repositories to use. Default is `/etc/yum.repos.d'. Each
@ -40,8 +58,8 @@ diff -urN olddocs/yum.8 docs/yum.8
+repositories defined in /etc/yum.conf to form the complete set of
repositories that yum will use.
.IP \fBdebuglevel\fR
@@ -511,8 +511,8 @@
.IP
@@ -745,8 +745,8 @@ for any given command. Defaults to False.
.SH "URL INCLUDE SYNTAX"
.LP
@ -52,7 +70,7 @@ diff -urN olddocs/yum.8 docs/yum.8
line of the following format:
include=url://to/some/location
@@ -549,8 +549,8 @@
@@ -812,8 +812,8 @@ data in any value.
.SH "FILES"
.nf
@ -61,5 +79,5 @@ diff -urN olddocs/yum.8 docs/yum.8
+/etc/yum.conf
+/etc/yum.repos.d/
/etc/yum/pluginconf.d/
.SH "SEE ALSO"
/etc/yum/protected.d
/etc/yum/vars

View file

@ -2,8 +2,8 @@
Summary: RPM installer/updater
Name: yum
Version: 3.2.26
Release: 3%{?dist}
Version: 3.2.28
Release: 5%{?dist}
License: GPLv2+
Group: System Environment/Base
Source0: http://yum.baseurl.org/download/3.2/%{name}-%{version}.tar.gz
@ -11,11 +11,13 @@ Source1: yum.conf.fedora
Source2: yum-updatesd.conf.fedora
Patch0: installonlyn-enable.patch
Patch1: yum-mirror-priority.patch
Patch2: yum-manpage-files.patch
Patch3: yum-multilib-policy-best.patch
Patch4: no-more-exactarchlist.patch
Patch5: geode-arch.patch
Patch6: yum-HEAD.patch
Patch7: yum-PK-auto-close-fix.patch
Patch20: yum-manpage-files.patch
URL: http://yum.baseurl.org/
BuildArch: noarch
@ -29,13 +31,24 @@ Requires: python-sqlite
Requires: python-urlgrabber >= 3.9.0-8
Requires: yum-metadata-parser >= 1.1.0
Requires: pygpgme
Obsoletes: yum-skip-broken, yum-basearchonly
Obsoletes: yum-skip-broken <= 1.1.18
Obsoletes: yum-basearchonly <= 1.1.9
Obsoletes: yum-allow-downgrade < 1.1.20-0
Obsoletes: yum-plugin-allow-downgrade < 1.1.22-0
Obsoletes: yum-plugin-protect-packages < 1.1.27-0
Obsoletes: yum-plugin-download-order <= 0.2-2
Provides: yum-skip-broken
Provides: yum-basearchonly
Provides: yum-allow-downgrade
Provides: yum-plugin-allow-downgrade
Provides: yum-protect-packages
Provides: yum-plugin-protect-packages
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
Yum is a utility that can check for and automatically download and
install updated RPM packages. Dependencies are obtained and downloaded
automatically prompting the user as necessary.
automatically, prompting the user for permission as necessary.
%package updatesd
Summary: Update notification daemon
@ -55,11 +68,12 @@ can notify you when they are available via email, syslog or dbus.
%prep
%setup -q
%patch1 -p0
#%%%patch2 -p0
%patch3 -p0
%patch4 -p0
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch20 -p1
%build
make
@ -82,6 +96,12 @@ rm -f $RPM_BUILD_ROOT/%{_sbindir}/yum-updatesd
rm -f $RPM_BUILD_ROOT/%{_mandir}/man*/yum-updatesd*
rm -f $RPM_BUILD_ROOT/%{_datadir}/yum-cli/yumupd.py*
# Ghost files:
mkdir -p $RPM_BUILD_ROOT/var/lib/yum/history
mkdir -p $RPM_BUILD_ROOT/var/lib/yum/plugins
mkdir -p $RPM_BUILD_ROOT/var/lib/yum/yumdb
touch $RPM_BUILD_ROOT/var/lib/yum/uuid
%find_lang %name
%clean
@ -93,7 +113,9 @@ rm -rf $RPM_BUILD_ROOT
%config(noreplace) %{_sysconfdir}/yum.conf
%dir %{_sysconfdir}/yum
%config(noreplace) %{_sysconfdir}/yum/version-groups.conf
%dir %{_sysconfdir}/yum/protected.d
%dir %{_sysconfdir}/yum.repos.d
%dir %{_sysconfdir}/yum/vars
%config(noreplace) %{_sysconfdir}/logrotate.d/yum
%{_sysconfdir}/bash_completion.d
%dir %{_datadir}/yum-cli
@ -103,6 +125,10 @@ rm -rf $RPM_BUILD_ROOT
%{python_sitelib}/rpmUtils
%dir /var/cache/yum
%dir /var/lib/yum
%ghost /var/lib/yum/uuid
%ghost /var/lib/yum/history
%ghost /var/lib/yum/plugins
%ghost /var/lib/yum/yumdb
%{_mandir}/man*/yum.*
%{_mandir}/man*/yum-shell*
# plugin stuff
@ -110,6 +136,55 @@ rm -rf $RPM_BUILD_ROOT
%dir /usr/lib/yum-plugins
%changelog
* Tue Oct 5 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.2.28-5
- bumping to 3.2.28-5 so f12 doesn't have a higher version
- bug # 640181
* Tue Sep 14 2010 James Antill <james at fedoraproject.org> - 3.2.28-4
- Fix auto-close bug with GPG key installs.
- Resolves: bug#622179
* Fri Aug 27 2010 Seth Vidal <skvidal at fedoraproject.org>
- obsoleted yum-plugin-download-order
* Thu Aug 12 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.2.28-3
- latest head
- fix gpg key import
- more unicode fixes
- output slightly more clear depsovling error msgs
- clean up some oddballness in this spec file
* Mon Aug 9 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.2.28-2
- update to HEAD
- fixes a number of unicide issues
* Fri Jul 30 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.2.28-1
- bump to 3.2.28
- add manpage patch
* Mon May 3 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.2.27-4
- add patch to not add a duplicate chroot path - fixes yumdb and history
from anaconda installs
- add obsoletes/provides specificity from rawhide spec
* Thu Apr 8 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.2.27-3
- fix regets on metadata when we run into an old file that's larger
than the new one
* Tue Mar 23 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.2.27-2
- broke searching in PK, this patch fixes it.
* Thu Mar 18 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.2.27-1
- 3.2.27 from upstream (more or less the same as 3.2.26-6 but with a new number
* Thu Mar 11 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.2.26-6
- should be the final HEAD update before 3.2.27
* Thu Feb 24 2010 James Antill <james@fedoraproject.org> - 3.2.26-5
- new HEAD, minor features and speed.
* Wed Feb 17 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.2.26-4
- new HEAD to fix the fix to the fix
* Tue Feb 16 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.2.26-3
- latest head - including fixes to searchPrcos