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

Merge pull request #1558 from dmach/getbinaries-single-file

Improve 'getbinaries' command by ignoring source and debuginfo filters when a binary name is specified
This commit is contained in:
Daniel Mach 2024-05-09 21:56:20 +02:00 committed by GitHub
commit fe1fe52847
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View File

@ -32,6 +32,7 @@ Scenario: Run `osc getbinaries <project> <package> <repo> <arch> <file>` where f
When I execute osc with args "getbinaries test:factory multibuild-pkg standard x86_64 multibuild-pkg-1-1.src.rpm"
Then directory listing of "{context.osc.temp}/binaries/" is
"""
multibuild-pkg-1-1.src.rpm
"""
@ -47,6 +48,7 @@ Scenario: Run `osc getbinaries <project> <package> <repo> <arch> <file>` where f
When I execute osc with args "getbinaries test:factory multibuild-pkg standard x86_64 multibuild-pkg-debuginfo-1-1.x86_64.rpm"
Then directory listing of "{context.osc.temp}/binaries/" is
"""
multibuild-pkg-debuginfo-1-1.x86_64.rpm
"""

View File

@ -8151,6 +8151,11 @@ Please submit there instead, or use --nodevelproject to force direct submission.
else:
package = [package]
if binary is not None:
output.print_msg("Binary filename was specified, ignoring source and debuginfo filters", print_to="debug")
opts.sources = True
opts.debuginfo = True
# Set binary target directory and create if not existing
target_dir = os.path.normpath(opts.destdir)
if not os.path.isdir(target_dir):