mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 10:50:11 +01:00
contrib/rh-bkr: add dummy RPM provider "none"
If you don't want to install any RPMs, this will lead to an error sustituing $RPM_LIST template. Add a dummy provider that can be used: ./bkr.py submit -r none ... You are still expected to explicitly pass the -r argument. We don't want to interpret a missing argument as "none" by default, because it's a rather uncommon usecase.
This commit is contained in:
parent
e953304dad
commit
16e342cf13
1 changed files with 9 additions and 0 deletions
|
|
@ -316,6 +316,13 @@ class UploadFile:
|
|||
pass
|
||||
def prepare(self, dry_run):
|
||||
raise NotImplementedError("not implemented")
|
||||
class UploadFileNone(UploadFile):
|
||||
def __init__(self, uri, arch):
|
||||
UploadFile.__init__(self, uri, arch)
|
||||
def url(self):
|
||||
return []
|
||||
def prepare(self, dry_run):
|
||||
pass
|
||||
class UploadFileUrl(UploadFile):
|
||||
def __init__(self, uri, arch):
|
||||
UploadFile.__init__(self, uri, arch)
|
||||
|
|
@ -573,6 +580,8 @@ class CmdSubmit(CmdBase):
|
|||
ctor = UploadFileBrew
|
||||
elif r.startswith('repo:'):
|
||||
ctor = UploadFileRepo
|
||||
elif r == 'none':
|
||||
ctor = UploadFileNone
|
||||
else:
|
||||
ctor = UploadFileSsh
|
||||
uf = ctor(r, self._get_var ("ARCH"))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue