mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-13 17:16:23 +01:00
- fix + beautify
This commit is contained in:
parent
116fec879e
commit
8d1c1804bf
@ -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()
|
||||
|
@ -96,7 +96,7 @@ class RepoDataQuery(object):
|
||||
|
||||
release = element.get("rel")
|
||||
if release is not None:
|
||||
entry += "-%s" % (release,)
|
||||
entry += "-%s" % release
|
||||
|
||||
return entry
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user