1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-13 17:16:23 +01:00

- fix + beautify

This commit is contained in:
Marcus Huewe 2010-02-05 15:14:48 +01:00
parent 116fec879e
commit 8d1c1804bf
3 changed files with 6 additions and 5 deletions

View File

@ -252,6 +252,7 @@ def get_prefer_pkgs(dirs, wanted_arch, type):
import glob
from util import repodata, packagequery, cpio
paths = []
repositories = []
suffix = '*.rpm'
if type == 'dsc':
@ -265,10 +266,10 @@ def get_prefer_pkgs(dirs, wanted_arch, type):
else:
repositories.append(repository)
packageQueries = osc.util.packagequery.PackageQueries(wanted_arch)
packageQueries = packagequery.PackageQueries(wanted_arch)
for repository in repositories:
repodataPackageQueries = osc.util.repodata.queries(repository)
repodataPackageQueries = repodata.queries(repository)
for packageQuery in repodataPackageQueries:
packageQueries.add(packageQuery)
@ -282,7 +283,7 @@ def get_prefer_pkgs(dirs, wanted_arch, type):
packageQueries.add(packageQuery)
prefer_pkgs = dict((name, packageQuery.path())
for (name, packageQuery) in packageQueries.iteritems())
for name, packageQuery in packageQueries.iteritems())
depfile = create_deps(packageQueries.values())
cpio = cpio.CpioWrite()

View File

@ -96,7 +96,7 @@ class RepoDataQuery(object):
release = element.get("rel")
if release is not None:
entry += "-%s" % (release,)
entry += "-%s" % release
return entry

View File

@ -62,7 +62,7 @@ class RpmQuery(packagequery.PackageQuery):
def __init__(self, fh):
self.__file = fh
self.__filename = os.path.abspath(fh.name)
self.__path = os.path.abspath(fh.name)
self.filename_suffix = 'rpm'
self.header = None