mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-26 22:56:15 +01:00
smarter default platform for osc build
This commit is contained in:
parent
8aadd6e400
commit
d85d38f613
3
NEWS
3
NEWS
@ -35,6 +35,9 @@
|
||||
- request list -M shows open SRs created by the user.
|
||||
- Fixed build support for images, only refered packages from buildinfo get used. (#485047)
|
||||
- "req" command got renamed to "api" to avoid clash with "request" command
|
||||
- osc build has a smarter default platform selection - it checks the
|
||||
availibility config value, 'standard' and 'opensuse_Factory' in platforms list and in case
|
||||
of fail it uses the last entry from that list
|
||||
|
||||
0.117:
|
||||
- support checkout of single package via "osc co PACKAGE" when local dir is project
|
||||
|
@ -2249,7 +2249,24 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
arg_platform, arg_arch, arg_descr = args
|
||||
|
||||
arg_arch = arg_arch or osc.build.hostarch
|
||||
arg_platform = arg_platform or conf.config['build_platform']
|
||||
|
||||
platforms = get_platforms_of_project( \
|
||||
store_read_apiurl('.'), \
|
||||
opts.alternative_project or store_read_project('.'))
|
||||
if not arg_platform:
|
||||
|
||||
# Use a default value from config, but just even if it's available
|
||||
# unless try standard, or openSUSE_Factory
|
||||
for platform in (conf.config['build_platform'], 'standard', 'openSUSE_Factory'):
|
||||
if platform in platforms:
|
||||
arg_platform = platform
|
||||
break
|
||||
|
||||
arg_platform = arg_platform or platforms[len(platforms)-1]
|
||||
|
||||
if not arg_platform in platforms:
|
||||
raise oscerr.WrongArgs('%s is not a valid platform, use one of: %s' % (arg_platform, ", ".join(platforms)))
|
||||
|
||||
descr = [ i for i in os.listdir('.') if i.endswith('.spec') or i.endswith('.dsc') ]
|
||||
# FIXME:
|
||||
# * request repos from server and select by build type.
|
||||
|
Loading…
Reference in New Issue
Block a user