1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-20 09:16:16 +02:00

Use './binaries' as default directory for getbinaries.

Previously, there was no directory set when fetching multiple arches and
distinct dirs for specific arches. Should be more consistent now.
This commit is contained in:
Sascha Peilicke 2011-01-21 10:35:47 +01:00
parent fe8febe56e
commit 0a40037d27

View File

@ -4885,7 +4885,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
@cmdln.option('-q', '--quiet', action='store_true',
help='do not show downloading progress')
@cmdln.option('-d', '--destdir', default='./', metavar='DIR',
@cmdln.option('-d', '--destdir', default='./binaries', metavar='DIR',
help='destination directory')
@cmdln.option('--sources', action="store_true",
help='also fetch source packages')
@ -4947,6 +4947,12 @@ Please submit there instead, or use --nodevelproject to force direct submission.
else:
package = [package]
# Set binary target directory and create if not existing
target_dir = os.path.normpath(opts.destdir)
if not os.path.isdir(target_dir):
print 'Creating %s' % target_dir
os.makedirs(target_dir, 0755)
for arch in arches:
for pac in package:
binaries = get_binarylist(apiurl, project, repository, arch,
@ -4955,14 +4961,6 @@ Please submit there instead, or use --nodevelproject to force direct submission.
print >>sys.stderr, 'no binaries found: Either the package %s ' \
'does not exist or no binaries have been built.' % pac
continue
target_dir = opts.destdir
if architecture is None:
# we're going to fetch all repo arches
target_dir = '%s/%s' % (opts.destdir, arch)
target_dir = os.path.normpath(target_dir)
if not os.path.isdir(target_dir):
print 'Creating %s' % target_dir
os.makedirs(target_dir, 0755)
for i in binaries:
# skip source rpms