Skip to content

Commit

Permalink
Merge pull request #1558 from dmach/getbinaries-single-file
Browse files Browse the repository at this point in the history
Improve 'getbinaries' command by ignoring source and debuginfo filters when a binary name is specified
  • Loading branch information
dmach committed May 9, 2024
2 parents aa2cbb2 + 6218fc7 commit fe1fe52
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""


Expand All @@ -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
"""


Expand Down
5 changes: 5 additions & 0 deletions osc/commandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -8151,6 +8151,11 @@ def do_getbinaries(self, subcmd, opts, *args):
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):
Expand Down

0 comments on commit fe1fe52

Please sign in to comment.