add patch for bz#816315
- upstream 2.11 release
This commit is contained in:
parent
22c38caa0d
commit
f9814be8bc
39
pungi-2.11-wildcard-fix.patch
Normal file
39
pungi-2.11-wildcard-fix.patch
Normal file
@ -0,0 +1,39 @@
|
||||
diff --git a/src/pypungi/__init__.py b/src/pypungi/__init__.py
|
||||
index 059b748..337b32a 100644
|
||||
--- a/src/pypungi/__init__.py
|
||||
+++ b/src/pypungi/__init__.py
|
||||
@@ -506,22 +506,22 @@ class Pungi(pypungi.PungiBase):
|
||||
else:
|
||||
# nogreedy
|
||||
for name in searchlist:
|
||||
- arch = None
|
||||
- if "." in name:
|
||||
- name, arch = name.rsplit(".", 1)
|
||||
+ packages_by_name = {}
|
||||
+ exactmatched, matched, unmatched = yum.packages.parsePackages(self.ayum.pkgSack.returnPackages(), [name], casematch=1)
|
||||
+ matches = filter(self._filtersrcdebug, exactmatched + matched)
|
||||
|
||||
- pkg_sack = self.ayum.pkgSack.searchNevra(name=name, arch=arch)
|
||||
- # filter sources out of the package sack
|
||||
- pkg_sack = [ i for i in pkg_sack if i.arch not in ("src", "nosrc") ]
|
||||
- pkg_sack = self.excludePackages(pkg_sack)
|
||||
-
|
||||
- match = self.ayum._bestPackageFromList(pkg_sack)
|
||||
- if not match:
|
||||
+ if not matches:
|
||||
self.logger.warn('Could not find a match for %s in any configured repo' % name)
|
||||
continue
|
||||
|
||||
- self.ayum.tsInfo.addInstall(match)
|
||||
- self.logger.info('Found %s.%s' % (match.name, match.arch))
|
||||
+ for i in matches:
|
||||
+ packages_by_name.setdefault(i.name, []).append(i)
|
||||
+
|
||||
+ for i, pkg_sack in packages_by_name.iteritems():
|
||||
+ pkg_sack = self.excludePackages(pkg_sack)
|
||||
+ match = self.ayum._bestPackageFromList(pkg_sack)
|
||||
+ self.ayum.tsInfo.addInstall(match)
|
||||
+ self.logger.info('Found %s.%s' % (match.name, match.arch))
|
||||
|
||||
if len(self.ayum.tsInfo) == 0:
|
||||
raise yum.Errors.MiscError, 'No packages found to download.'
|
@ -2,13 +2,14 @@
|
||||
|
||||
Name: pungi
|
||||
Version: 2.11
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Distribution compose tool
|
||||
|
||||
Group: Development/Tools
|
||||
License: GPLv2
|
||||
URL: https://fedorahosted.org/pungi
|
||||
Source0: https://fedorahosted.org/pungi/attachment/wiki/%{version}/%{name}-%{version}.tar.bz2
|
||||
Patch0: pungi-2.11-wildcard-fix.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Requires: anaconda >= 14.3, yum => 3.2.19, repoview, createrepo >= 0.4.11
|
||||
Requires: lorax
|
||||
@ -22,7 +23,7 @@ A tool to create anaconda based installation trees/isos of a set of rpms.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%{__python} setup.py build
|
||||
@ -56,6 +57,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu May 03 2012 Dennis Gilmore <dennis@ausil.us> - 2.11-2
|
||||
- add patch for bz#816315
|
||||
|
||||
* Mon Apr 16 2012 Dennis Gilmore <dennis@ausil.us> - 2.11-1
|
||||
- upstream 2.11 release
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user