1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-26 18:06:13 +01:00

do not download large debug packages by default with "getbinaries"

This commit is contained in:
Adrian Schröter 2010-09-27 17:43:44 +02:00
parent e8859a6a74
commit 5feac3f242

View File

@ -4654,6 +4654,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
help='destination directory') help='destination directory')
@cmdln.option('--sources', action="store_true", @cmdln.option('--sources', action="store_true",
help='also fetch source packages') help='also fetch source packages')
@cmdln.option('--debug', action="store_true",
help='also fetch debug packages')
def do_getbinaries(self, subcmd, opts, *args): def do_getbinaries(self, subcmd, opts, *args):
"""${cmd_name}: Download binaries to a local directory """${cmd_name}: Download binaries to a local directory
@ -4729,7 +4731,13 @@ Please submit there instead, or use --nodevelproject to force direct submission.
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:
if i.name.endswith('.src.rpm'):
continue
if i.name.find('-debugsource-') >= 0:
continue
if not opts.debug:
if i.name.find('-debuginfo-') >= 0:
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):