Mailinglist Archive: opensuse-buildservice (213 mails)

< Previous Next >
[opensuse-buildservice] [PATCH] RFC: read platfrom from BS
  • From: Michal Vyskocil <mvyskocil@xxxxxxx>
  • Date: Mon, 8 Jun 2009 10:26:24 +0200
  • Message-id: <200906081026.24688.mvyskocil@xxxxxxx>

current behavior of osc build is confusing as a default build platform is
reads from ~/.oscrc, even if this is a attribute of a project. So in many
cases user get a confising wrong repo/arch error message.

This patch reads the platform list from BS and uses the last one as a default
one. It also brings a better help message, if user type a wrong platform. This
makes the conf.config['build_platform'] obsoleted.

Index: osc/
--- osc/ (revision 7508)
+++ osc/ (working copy)
@@ -2249,7 +2249,11 @@
arg_platform, arg_arch, arg_descr = args

arg_arch = arg_arch or
- arg_platform = arg_platform or conf.config['build_platform']
+ platforms = get_platforms_of_project(store_read_apiurl('.'),
opts.alternative_project or store_read_project('.'))
+ 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') ]
# * request repos from server and select by build type.

What do you think about it?

Michal Vyskocil
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups