mirror of
https://github.com/openSUSE/osc.git
synced 2025-08-01 21:23:39 +02:00
Use alternative project if specified in parse_repoarchdescr()
This commit is contained in:
@@ -6933,7 +6933,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
if no_repo:
|
if no_repo:
|
||||||
raise oscerr.WrongArgs("Repository is missing. Cannot guess build description without repository")
|
raise oscerr.WrongArgs("Repository is missing. Cannot guess build description without repository")
|
||||||
apiurl = self.get_api_url()
|
apiurl = self.get_api_url()
|
||||||
project = store_read_project('.')
|
project = alternative_project or store_read_project('.')
|
||||||
# some distros like Debian rename and move build to obs-build
|
# some distros like Debian rename and move build to obs-build
|
||||||
if not os.path.isfile('/usr/lib/build/queryconfig') and os.path.isfile('/usr/lib/obs-build/queryconfig'):
|
if not os.path.isfile('/usr/lib/build/queryconfig') and os.path.isfile('/usr/lib/obs-build/queryconfig'):
|
||||||
queryconfig = '/usr/lib/obs-build/queryconfig'
|
queryconfig = '/usr/lib/obs-build/queryconfig'
|
||||||
|
@@ -36,6 +36,10 @@ class TestGitStore(unittest.TestCase):
|
|||||||
store = GitStore(self.tmpdir)
|
store = GitStore(self.tmpdir)
|
||||||
self.assertEqual(store.last_buildroot, ("repo", "arch", "vm_type"))
|
self.assertEqual(store.last_buildroot, ("repo", "arch", "vm_type"))
|
||||||
|
|
||||||
|
def test_scmurl(self):
|
||||||
|
store = GitStore(self.tmpdir)
|
||||||
|
self.assertEqual(store.scmurl, "https://example.com/packages/my-package.git")
|
||||||
|
|
||||||
|
|
||||||
if not shutil.which("git"):
|
if not shutil.which("git"):
|
||||||
TestGitStore = unittest.skip("The 'git' executable is not available")(TestGitStore)
|
TestGitStore = unittest.skip("The 'git' executable is not available")(TestGitStore)
|
||||||
|
Reference in New Issue
Block a user