mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-11 13:29:19 +01:00
Merge branch 'obs-build' of https://github.com/bluca/osc
On debian /usr/lib/build was renamed to /usr/lib/obs-build.
This commit is contained in:
commit
24fa0ae9d5
@ -12,6 +12,7 @@ import sys
|
|||||||
import time
|
import time
|
||||||
import imp
|
import imp
|
||||||
import inspect
|
import inspect
|
||||||
|
import os
|
||||||
try:
|
try:
|
||||||
from urllib.parse import urlsplit
|
from urllib.parse import urlsplit
|
||||||
from urllib.error import HTTPError
|
from urllib.error import HTTPError
|
||||||
@ -5867,7 +5868,12 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
with tempfile.NamedTemporaryFile() as f:
|
with tempfile.NamedTemporaryFile() as f:
|
||||||
f.write(bc)
|
f.write(bc)
|
||||||
f.flush()
|
f.flush()
|
||||||
recipe = return_external('/usr/lib/build/queryconfig', '--dist', f.name, 'type')
|
# 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'):
|
||||||
|
queryconfig = '/usr/lib/obs-build/queryconfig'
|
||||||
|
else:
|
||||||
|
queryconfig = '/usr/lib/build/queryconfig'
|
||||||
|
recipe = return_external(queryconfig, '--dist', f.name, 'type')
|
||||||
recipe = recipe.strip()
|
recipe = recipe.strip()
|
||||||
if recipe == 'arch':
|
if recipe == 'arch':
|
||||||
recipe = 'PKGBUILD'
|
recipe = 'PKGBUILD'
|
||||||
|
@ -183,6 +183,12 @@ DEFAULTS = {'apiurl': 'https://api.opensuse.org',
|
|||||||
'vc-cmd': '/usr/lib/build/vc'
|
'vc-cmd': '/usr/lib/build/vc'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# some distros like Debian rename and move build to obs-build
|
||||||
|
if not os.path.isfile('/usr/bin/build') and os.path.isfile('/usr/bin/obs-build'):
|
||||||
|
DEFAULTS['build-cmd'] = '/usr/bin/obs-build'
|
||||||
|
if not os.path.isfile('/usr/lib/build/vc') and os.path.isfile('/usr/lib/obs-build/vc'):
|
||||||
|
DEFAULTS['vc-cmd'] = '/usr/lib/obs-build/vc'
|
||||||
|
|
||||||
# being global to this module, this dict can be accessed from outside
|
# being global to this module, this dict can be accessed from outside
|
||||||
# it will hold the parsed configuration
|
# it will hold the parsed configuration
|
||||||
config = DEFAULTS.copy()
|
config = DEFAULTS.copy()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user