mirror of
https://github.com/openSUSE/osc.git
synced 2025-10-12 20:00:04 +02:00
tabs to spaces. Damit kein Unglueck nicht geschicht. Hello Danny.
This commit is contained in:
@@ -3229,8 +3229,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
def do_distributions(self, subcmd, opts, *args):
|
def do_distributions(self, subcmd, opts, *args):
|
||||||
"""${cmd_name}: Shows all available distributions
|
"""${cmd_name}: Shows all available distributions
|
||||||
|
|
||||||
This command shows the available distributions. For active distributions
|
This command shows the available distributions. For active distributions
|
||||||
it shows the name, project and name of the repository and a suggested default repository name.
|
it shows the name, project and name of the repository and a suggested default repository name.
|
||||||
|
|
||||||
usage:
|
usage:
|
||||||
osc distributions
|
osc distributions
|
||||||
@@ -3269,7 +3269,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
${cmd_usage}
|
${cmd_usage}
|
||||||
${cmd_option_list}
|
${cmd_option_list}
|
||||||
"""
|
"""
|
||||||
apiurl = self.get_api_url()
|
apiurl = self.get_api_url()
|
||||||
|
|
||||||
if len(files) == 0:
|
if len(files) == 0:
|
||||||
if not '/' in project:
|
if not '/' in project:
|
||||||
@@ -4548,45 +4548,45 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
if architecture is None:
|
if architecture is None:
|
||||||
arches = [i.arch for i in get_repos_of_project(apiurl, project) if repository == i.name]
|
arches = [i.arch for i in get_repos_of_project(apiurl, project) if repository == i.name]
|
||||||
|
|
||||||
if package is None:
|
if package is None:
|
||||||
package = meta_get_packagelist(apiurl, project)
|
package = meta_get_packagelist(apiurl, project)
|
||||||
else:
|
else:
|
||||||
package = [package]
|
package = [package]
|
||||||
|
|
||||||
for arch in arches:
|
for arch in arches:
|
||||||
for pac in package:
|
for pac in package:
|
||||||
binaries = get_binarylist(apiurl, project, repository, arch,
|
binaries = get_binarylist(apiurl, project, repository, arch,
|
||||||
package=pac, verbose=True)
|
package=pac, verbose=True)
|
||||||
if not binaries:
|
if not binaries:
|
||||||
print >>sys.stderr, 'no binaries found: Either the package %s ' \
|
print >>sys.stderr, 'no binaries found: Either the package %s ' \
|
||||||
'does not exist or no binaries have been built.' % pac
|
'does not exist or no binaries have been built.' % pac
|
||||||
continue
|
continue
|
||||||
target_dir = opts.destdir
|
target_dir = opts.destdir
|
||||||
if architecture is None:
|
if architecture is None:
|
||||||
# we're going to fetch all repo arches
|
# we're going to fetch all repo arches
|
||||||
target_dir = '%s/%s' % (opts.destdir, arch)
|
target_dir = '%s/%s' % (opts.destdir, arch)
|
||||||
target_dir = os.path.normpath(target_dir)
|
target_dir = os.path.normpath(target_dir)
|
||||||
if not os.path.isdir(target_dir):
|
if not os.path.isdir(target_dir):
|
||||||
print 'Creating %s' % target_dir
|
print 'Creating %s' % target_dir
|
||||||
os.makedirs(target_dir, 0755)
|
os.makedirs(target_dir, 0755)
|
||||||
|
|
||||||
for i in binaries:
|
for i in binaries:
|
||||||
# skip source rpms
|
# skip source rpms
|
||||||
if not opts.sources and i.name.endswith('.src.rpm'):
|
if not opts.sources and i.name.endswith('.src.rpm'):
|
||||||
continue
|
continue
|
||||||
fname = '%s/%s' % (target_dir, i.name)
|
fname = '%s/%s' % (target_dir, i.name)
|
||||||
if os.path.exists(fname):
|
if os.path.exists(fname):
|
||||||
st = os.stat(fname)
|
st = os.stat(fname)
|
||||||
if st.st_mtime == i.mtime and st.st_size == i.size:
|
if st.st_mtime == i.mtime and st.st_size == i.size:
|
||||||
continue
|
continue
|
||||||
get_binary_file(apiurl,
|
get_binary_file(apiurl,
|
||||||
project,
|
project,
|
||||||
repository, arch,
|
repository, arch,
|
||||||
i.name,
|
i.name,
|
||||||
package = pac,
|
package = pac,
|
||||||
target_filename = fname,
|
target_filename = fname,
|
||||||
target_mtime = i.mtime,
|
target_mtime = i.mtime,
|
||||||
progress_meter = not opts.quiet)
|
progress_meter = not opts.quiet)
|
||||||
|
|
||||||
|
|
||||||
@cmdln.option('-b', '--bugowner', action='store_true',
|
@cmdln.option('-b', '--bugowner', action='store_true',
|
||||||
|
@@ -3737,7 +3737,7 @@ def get_distibutions(apiurl, discon=False):
|
|||||||
r.insert(1,'------------ -------')
|
r.insert(1,'------------ -------')
|
||||||
|
|
||||||
else:
|
else:
|
||||||
result_line_templ = '%(name)-25s %(project)-25s %(repository)-25s %(reponame)s'
|
result_line_templ = '%(name)-25s %(project)-25s %(repository)-25s %(reponame)s'
|
||||||
f = http_GET(makeurl(apiurl, ['distributions']))
|
f = http_GET(makeurl(apiurl, ['distributions']))
|
||||||
root = ET.fromstring(''.join(f))
|
root = ET.fromstring(''.join(f))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user