Skip to content

Commit

Permalink
Merge pull request #1497 from badshah400/master
Browse files Browse the repository at this point in the history
Allow `osc rpmlint` to infer prj/pkg from CWD.
  • Loading branch information
dmach committed Feb 26, 2024
2 parents af24f3c + 78b07e6 commit 58c3e2c
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion osc/commandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -6206,7 +6206,23 @@ def do_rpmlintlog(self, subcmd, opts, *args):
apiurl = self.get_api_url()
args = slash_split(args)

if len(args) == 4:
if len(args) <= 3:
project = store_read_project(Path.cwd())
package = store_read_package(Path.cwd())
if len(args) == 1:
repository, arch = self._find_last_repo_arch(args[0], fatal=False)
if repository is None:
# no local build with this repo was done
print('failed to guess arch, using hostarch')
repository = args[0]
arch = osc_build.hostarch
elif len(args) == 2:
repository, arch = args
elif len(args) == 3:
raise oscerr.WrongArgs('Too many arguments.')
else: # len(args) = 0 case
self.print_repos()
elif len(args) == 4:
project, package, repository, arch = args
else:
raise oscerr.WrongArgs('please provide project package repository arch.')
Expand Down

0 comments on commit 58c3e2c

Please sign in to comment.