Home Home
Sign up | Login

Deprecation notice: openSUSE Lizards user blog platform is deprecated, and will remain read only for the time being. Learn more...

Author Archive

[gsoc] osc code cleanup – summary of week 4

June 19th, 2011 by

Hi,

here’s a small summary of the 4th (coding) week. I spent most of the
time with writing the RemoteFile classes and the BuildResult class
(+ testcases of course:) ).

TODO for this week:

  • improve RemoteFile classes
  • add APIInfo class:
    – resolve url-like parameters (api://foo/bar repo/arch)
    – raise an exception if required parameters are missing
    – initialize optional parameters with the config default
    – encapsulate “context-sensitivity” logic (sometimes parameters
    should be read from the working copy (like apiurl, project or
    package))

Marcus

[gsoc] summary of week 3

June 10th, 2011 by

Hi,

here’s a small summary of the 3rd (coding) week. This week I spent
most of my time with developing the remote model classes. The goal
was to put most of the code into a base class from which all remote
models will be derived (if you’re interested how it works have a
look at it). So far we have classes for:

  • a remote project (RemoteProject – manages project metadata)
  • a remote package (RemotePackage – manages package metadata)
  • a request (Request)

TODO for this week:

  • add exception handling to the httprequest.py module
  • add a RemoteFile class which can be used to access a remote file
    like a buildlog, prjconf or a source file
  • add a BuildResult class:
    – get the build results for a project or package
    – get the buildlog of a package
    – get the binary/binaries from the api

[gsoc] summary of week 2

June 3rd, 2011 by

Hi,

here’s a small summary of the 2nd (coding) week. This
week I spent most of my time with working on an OO-style class
for doing http requests:

  • it’s possible to switch the http(s) implementation without touching any
    library code
  • supports response validation (if a schema was specified for the request)

Currently I’m still working on the “remote models”:

  • decided to use lxml.objectify:
  • – goal is to encapsulate the xml logic solely into the object itself
  • – example workflow:
    prj = RemoteProject(‘some_name’)
    prj.title = ‘dummy’
    prj.description = ‘foo bar’
    repo = prj.add_repository(name=’openSUSE_Factory’)
    repo.add_path(project=’openSUSE:Factory’, repository=’standard’)
    repo.add_arch(‘i586’)
    # change arch to x86_64
    repo.arch[0] = ‘x86_64’
    repo.save()

Minor stuff:

  • decided to use the “logging” module:
    this way we can easily add “debug” and “info” etc. messages and it’s up to
    the “client” which messages it wants to display (I’m not talking about
    the messages which are displayed when “osc up” is called or something like
    that)

[gsoc] summary of week 1

May 28th, 2011 by

Hi,

this is a short summary of this week:

  • published proposal of the new user interface:
    we got some really constructive feedback (see thread)

The next task is to create model classes which represent a project, package, request etc.
This way we can modify the package metadata (for instance) in a object orientated manner. Our plan
is to write tests first and afterwards we start with the implementation (TDD).

GSoC – new osc user interface proposal

May 23rd, 2011 by

Hi,

as a part of our Google Summer of Code Project to cleanup osc our
first task was to define a new commandline user interface for osc.
The current user interface is quite “inconsistent” (with regard to
the expected arguments for different commands) and has some other
“flaws”.
Here are some examples to show some flaws of the current user
interface:

* inconsistent ui:
– osc results project package –repo repo –arch arch
– osc rebuild project package repo arch
– osc build repo arch
– osc ls project package repo arch -b
– osc ls project package -r repo -a arch -b
– osc undelete project package_1 … package_N
– osc rdelete project package_1

* counterintuitive commands:
– osc abortbuild project package
– osc abortbuild project package repo arch
– osc abortbuild (in a package working copy)
– osc abortbuild –repo repo –arch arch (in a package working copy)
– osc abortbuild repo arch (in a package working copy)
=> treats “repo” “arch” as “project” “package”

* “duplicated” commands:
– diff, rdiff
– buildlog, remotebuildlog, localbuildlog
– delete, rdelete, rremove

Additionally we support lots of commands and the output of
“osc –help”is quite long. In order to tackle this problem we decided
to introduce “groups” with subcommands, for instance:
attribute list
attribute create…
attribute set…

As a result we get rid of “god commands” (commands which supported
lots of different options for different things (like osc meta)) and
the new commands are easier to use because they support less arguments
and/or options (note: this doesn’t mean we lose functionality – the
functionality is just moved to another command/command group).

The attached table is just a _proposal_ for a new commandline user
interface.

Some additional explanations:

The biggest change with regard to our current user interface is the
introduction of an url-like syntax:
For example:
osc ls api://project/package
instead of
osc ls project package

In this case “api” means that the request is issued to the default
apiurl (in most cases https://api.opensuse.org) which can be
configured in the ~/.oscrc.
To issue the “list” request to a different obs instance one can use:
osc ls https://api.somehost/project/package
or
osc ls alias://project/package
“alias” is an alias for this apiurl which can be configured in the
~/.oscrc.

If you see this url-like syntax for the first time you might think
that it makes things much more complicated (and even more to type)
but it is advantageous:

– in most cases it is obvious if a command is a remote command or
local working copy command
– this way we get rid of ambiguities:
Suppose we support the following command (“<foo>” indicate that
“foo” is an optional argument):
binaries get api://project/package <repo/arch>
binaries get <repo/arch>
(if $PWD is a package working copy
the project and package arguments will be read from it)

Possible invocations are:
osc binaries get api://foo/bar standard/i586 # get all binaries
for this repo and arch
osc binaries get api://foo/bar # get all binaries for all repos
and all arches

# now suppose $PWD is a package working copy:
osc binaries get standard/i586 # get all binaries for this repo
and arch (project and package are read from the working copy)

osc binaries get api://foo/bar # gets all binaries for all repos
and all arches (project is “foo” and package is “bar”)

In the latter invocation we’re still in a package working copy
but ignore it and use the project and package arguments which
were specified.

Note: in this case a special (like the url-like) syntax is required
otherwise osc is unable to distinguish between a project/package and
repo/arch argument.

Once again this is just a _proposal_ – feedback is very welcome!
(please send the feedback to the opensuse-buildservice@opensuse.org mailinglist – thread)

Marcus

init, list, meta, attribute, request, submitrequest, review, link, copy, maintenance, branch, delete, undelete, diff, checkout, status, add, addremove, commit, update, resolved, distributions, results, buildlog, buildmeta, build, chroot, log, service, abortbuild, rebuild, binaries, search, my,
importsrcpkg, person, cat, less, repair, pull, signkey, vc, mv, config, revert, api, aggregate, mkpac, setlinkrev, linktobranch, detachbranch

setlinkrev, linktobranch and detachbranch might be grouped into group “other”.
Deleted commands:

cmd replacement reason
deleterequest args request create –delete args
reqeuestmaintainership args request create –role maintainer args
changedevelrequest args request create –changedevel args
request approvenew project <package> request –interactive-review could be used (but it’s no real replacement)
request log id request show id –log
linkpac link
copypac copy
releaserequest maintenance releaserequest
createincident maintenance createincident
maintenancerequest maintenance request
mbranch maintenance branch
getpac use branch
rdelete delete
updatepacmetafromspec
rdiff diff
linkdiff no replacement atm (current implementation partly broken); diff could support it
repourls isn’t needed IMHO
prjresults results
remotebuildlog buildlog
localbuildlog buildlog –local
buildinfo buildmeta info
buildconfig buildmeta config
triggerreason buildmeta triggerreason
dependson buildmeta dependson
buildhistory buildmeta history
jobhistory buildmeta jobhistory
info not needed anymore
getbinaries binaries get
wipebinaries binaries wipe
list –binaries binaries list
search –binary binaries search
bugowner no real replacement use person maintainer -b (if we support this)
maintainer person maintainer
maintainer project –add user –role role person add api://project role user
maintainer project –delete user person delete api://project user
whois person meta
meta user person meta
cat/less http://api/source/project/package/file not needed (IMHO)
repairlink repair link
repairwc repair wc
signkey signkey it’s not context-sensitive anymore
rremove do we really need this?
aggregatepac aggregate
develproject meta meta should display the xml in a nice way so that it’s easy to see whether a develprj is defined or not
repositories meta meta should display the xml in a nice way so that all repos are displayed

new commandline user interface

init

cmd subcmd prj wc pkg wc params/opts note
init api://project
init api://project/package

list

cmd subcmd prj wc pkg wc params/opts note
ls x list all remote packages for the wc project
ls x list all remote files for the wc package
ls api://
ls api://project
ls api://project/package
ls api://project/package/file just for backward compatibility

meta

cmd subcmd prj wc pkg wc params/opts note
meta x shows/edits project meta
meta x shows/edits package meta
meta api://project
meta api://project/package
meta api://project/_prjconf

attribute

cmd subcmd prj wc pkg wc params/opts note
attribute is not context sensitive
attribute list api://project show all attributes
attribute list api://project attribute show specific attribute
attribute set api://project attribute newval set attribute to newval
attribute create api://project attribute create new attribute
attribute delete api://project attribute delete attribute
attribute list api://project/package show all attributes
attribute list api://project/package/binary show all attributes – /binary works for all commands below, too
attribute list api://project/package attribute show specific attribute
attribute set api://project/package attribute newval set attribute to newval
attribute create api://project/package attribute create new attribute
attribute delete api://project/package attribute delete attribute

request

cmd subcmd prj wc pkg wc params/opts note
request is not context sensitive
request create –submit api://project/package api://tgt_projet/<package>
request create –submit api://project/package api://tgt_projet/<package>
request create –changedevel api://project/package api://tgt_projet/<package>
request create –role role user api://project/<package>
request create –grouprole role group api://project/<package>
request create –bugowner user api://project/<package> alternatively we treat bugowner as a “role” and use –role bugowner…
request create –delete api://project/<package>
request list api://<project>/<package> list all/project/package requests
in the following we support both: “api://id” and “id” (if the latter format is specified the default apiurl is used – regardless if the cmd is executed in a wc)
request show api://id apart from –brief also support –log which just shows the statehistory + current state
request supersede api://id api://supersede_id
request accept api://id
request decline api://id
request revoke api://id
request reopen api://id
request wipe api://id
request checkout (x) api://id if the package’s package belongs to the wc’s project the package will be added to this project (if it already exists an error will be printed)

submitrequest

cmd subcmd prj wc pkg wc params/opts note
submitrequest x semantic change: creates a sr for all local packages (instead of all remote)
submitrequest x wc has to be a source link
submitrequest x api://tgt_project/<tgt_package>
submitrequest api://project/package api://tgt_project/<tgt_package>

review

cmd subcmd prj wc pkg wc params/opts note
review accept api://id
review decline api://id
review reopen api://id
review susersede api://id api://supsersede_id
review add api://id –user user –group group –package package –project project at least one option is required
review list api://<project>/<package> just for convenience; “request list –state review” should lead to the same result

link

cmd subcmd prj wc pkg wc params/opts note
link api://link_project api://project
link api://link_project/link_package api://project/&tl;package>

copy

cmd subcmd prj wc pkg wc params/opts note
copy api://copy_project api://project could be supported
copy api://copy_project/copy_package api://project/&tl;package>

maintenance

cmd subcmd prj wc pkg wc params/opts note
maintenance releaserequest x
maintenance releaserequest api://project
maintenance createincident <api://project>
maintenance request api://project <api://tgt_project>
maintenance branch package <tgt_project> XXX: this voilates the url schema

branch

cmd subcmd prj wc pkg wc params/opts note
branch api://project/package <api://tgt_project/tgt_package>

undelete

cmd subcmd prj wc pkg wc params/opts note
undelete api://project/<package>

delete

cmd subcmd prj wc pkg wc params/opts note
delete api://project/<package> multiple arguments can be specified
delete /path/to/package
delete /path/to/file

diff

cmd subcmd prj wc pkg wc params/opts note
diff x
diff x
diff /path/to/file multiple args are supported
diff /path/to/package
diff /path/to/project
diff api://project/package
diff api://project/package api://original_project/original_package

checkout

cmd subcmd prj wc pkg wc params/opts note
checkout api://project/<package> checking out a file is not supported anymore
checkout x package adds the package to the wc
checkout x package adds the package to the wc

status

cmd subcmd prj wc pkg wc params/opts note
status x
status x
status /path/to/project_or_package_or_file multiple arguments are supported

add

cmd subcmd prj wc pkg wc params/opts note
add /path/to/dir_or_file multiple arguments are supported
add URL create a _service file

addremove

cmd subcmd prj wc pkg wc params/opts note
addremove x
addremove x
addremove /path/to/package multiple arguments are supported

commit

cmd subcmd prj wc pkg wc params/opts note
commit x
commit x
commit /path/to/project_or_package_or_file multiple arguments are supported

update

cmd subcmd prj wc pkg wc params/opts note
update x
update x
update /path/to/project_or_package multiple arguments are supported

resolved

cmd subcmd prj wc pkg wc params/opts note
resolved /path/to/file multiple arguments are supported

distributions

cmd subcmd prj wc pkg wc params/opts note
distributions api://

results

cmd subcmd prj wc pkg wc params/opts note
results x
results x
results api://project/<package>

buildlog
if repo/arch is not specified the config values will be used (default_repo, default_arch)

cmd subcmd prj wc pkg wc params/opts note
buildlog x <repo/arch>
buildlog x <repo/arch> –local
buildlog api://project/package <repo/arch>

buildmeta
if repo/arch is not specified the config values will be used (default_repo, default_arch)

cmd subcmd prj wc pkg wc params/opts note
buildmeta info x <repo/arch> <build_descr> distingiush between repo/arch build_descr, /arch build_descr via the file extension of build_descr
buildmeta info api://project/package <repo/arch> <build_descr> distingiush between repo/arch build_descr, /arch build_descr via the file extension of build_descr
buildmeta config x <repo/arch> <build_descr>
buildmeta config api://project/package <repo>
buildmeta triggerreason x <repo/arch>
buildmeta triggerreason api://project/package <repo/arch>
buildmeta dependson x <repo/arch>
buildmeta dependson api://project/package <repo/arch>
buildmeta log x <repo/arch> same as buildlog (just for consistency)
buildmeta log x <repo/arch> –local same as buildlog (just for consistency)
buildmeta log api://project/package <repo/arch> same as buildlog (just for consistency)
buildmeta history x <repo/arch>
buildmeta history api://project/package <repo/arch>
buildmeta jobhistory x <repo/arch>
buildmeta jobhistory x <repo/arch>
buildmeta jobhistory api://project/<package> <repo/arch>

build
if repo/arch is not specified the config values will be used (default_repo, default_arch)

cmd subcmd prj wc pkg wc params/opts note
build x <repo/arch> <build_descr>

chroot
if repo/arch is not specified the config values will be used (default_repo, default_arch)

cmd subcmd prj wc pkg wc params/opts note
chroot x <repo/arch> <build_descr> build_descr is not needed for the command itself

log

cmd subcmd prj wc pkg wc params/opts note
log x
log x
log api://project/<package>

service

cmd subcmd prj wc pkg wc params/opts note
service run x <service_name>
service disabledrun x
service remoterun api://project/package

abortbuild
if repo/arch is not specified the config values will be used (default_repo, default_arch)

cmd subcmd prj wc pkg wc params/opts note
abortbuild x <repo/arch> to abort all builds specifiy –all
abortbuild x <repo/arch> to abort all builds specifiy –all
abortbuild api://project/<package> <repo/arch> to abort all builds specifiy –all

rebuild
if repo/arch is not specified the config values will be used (default_repo, default_arch)

cmd subcmd prj wc pkg wc params/opts note
rebuild x <repo/arch> to rebuild all packages specifiy –all
rebuild x <repo/arch> to rebuild all packages specifiy –all
rebuild api://project/<package> <repo/arch> to rebuild all packages specifiy –all

rebuild
if repo/arch is not specified the config values will be used (default_repo, default_arch)

cmd subcmd prj wc pkg wc params/opts note
binaries get x <repo/arch> to get all binaries specifiy –all
binaries get x <repo/arch> to get all binaries specifiy –all
binaries get api://project/<package> <repo/arch> to get all binaries specifiy –all
binaries list x <repo/arch> to list all binaries specifiy –all
binaries list x <repo/arch> to list all binaries specifiy –all
binaries list api://project/<package> <repo/arch> to list all binaries specifiy –all
binaries wipe x <repo/arch> to wipe all binaries specifiy –all
binaries search api://<project> search_term
binaries wipe api://project/<package> <repo/arch> to wipe all binaries specifiy –all

my

cmd subcmd prj wc pkg wc params/opts note
my requests
my submitrequests
my projects
my packages

search

cmd subcmd prj wc pkg wc params/opts note
search search_term

importsrcpkg

cmd subcmd prj wc pkg wc params/opts note
importsrcpkg x /path/to/srpm

person
For groups we can add a new “group” command

cmd subcmd prj wc pkg wc params/opts note
person meta api://username <–edit>
person maintainer api://project/<package> show maintainer of the project/package
person maintainer api://project/<package> show maintainer of the project/package
person add api://project/<package> user role
person delete api://project/<package> user <role>

cat

cmd subcmd prj wc pkg wc params/opts note
cat api://project/package/file

less

cmd subcmd prj wc pkg wc params/opts note
cat api://project/package/file

repair

cmd subcmd prj wc pkg wc params/opts note
repair link x
repair link api://project/package <api://into_project/<into_package>>
repair wc x
repair wc x

pull

cmd subcmd prj wc pkg wc params/opts note
pull x

signkey

cmd subcmd prj wc pkg wc params/opts note
signkey api://project

vc

cmd subcmd prj wc pkg wc params/opts note
vc

mv

cmd subcmd prj wc pkg wc params/opts note
mv x filename new_filename should we support this for packages, too?

config

cmd subcmd prj wc pkg wc params/opts note
config section option
config section option value

revert

cmd subcmd prj wc pkg wc params/opts note
revert x
revert /path/to/file multiple arguments are supported

api

cmd subcmd prj wc pkg wc params/opts note
api api://path/to/something

aggregate

cmd subcmd prj wc pkg wc params/opts note
aggregate api://project/package api://tgt_project/<tgt_packge>

mkpac

cmd subcmd prj wc pkg wc params/opts note
mkpac x package_name

setlinkrev

cmd subcmd prj wc pkg wc params/opts note
setlinkrev x
setlinkrev api://project/<package>

linktobranch

cmd subcmd prj wc pkg wc params/opts note
linktobranch x
linktobranch api://project/package

detachbranch

cmd subcmd prj wc pkg wc params/opts note
detachbranch x
detachbranch api://project/package

(please send the feedback to the opensuse-buildservice@opensuse.org mailinglist – thread)

new osc feature to edit a request

January 30th, 2011 by

Hi,

I just pushed a new osc feature to git master which allows you to edit a submit action. Use case: suppose you review a request (which has at least one submit action) and you find a small typo (for instance in the spec file) but except the typo everything is fine. So instead of declining the request you can fix the typo, create a new request (which contains the fix + the original changes), accept the newly created request and supersede the original request (that’s basically what osc does behind the scenes).

Example:

# request with id 80 needs a small fix
marcus@linux:~> osc rq show 80 –edit
Request: #80

submit:       home:Admin/foo  -> home:foobar/dest
delete:       home:foobar/xxx

Message:
deletes package xxx and fixes dest.

State:   new        2011-01-30T15:04:03 Admin
Comment: <no comment>
A    /tmp/osc_editsrr2iDcI/test.spec
A    /tmp/osc_editsrr2iDcI/src.tar.bz2
At revision 1.
Checked out package ‘foo.home_Admin’ to /tmp/osc_editsrr2iDcI. Started a new shell (/bin/bash).
Please fix the package and close the shell afterwards.
marcus@linux:/tmp/osc_editsrr2iDcI> # fix it and commit changes
marcus@linux:/tmp/osc_editsrr2iDcI> exit
exit
Request: #None

submit:       home:Admin:branches:REQUEST_80/foo.home_Admin(cleanup) -> home:foobar/dest
delete:        home:foobar/xxx

Message:
<no message>
d(i)ff/(a)ccept/(b)uildstatus/(e)dit/(s)kip/(c)ancel > a -m “accepted request and applied small fix”
Supersede original request? (y|N) y
marcus@linux:~>

By the way you can also do it manually (osc rq clone <id>; osc co <clone project>; fix package(s) and commit changes; create a new request, accept it and supersede original request).

osc 0.130.1 (bugfix release)

December 18th, 2010 by

Hi,

I just released a new osc version: 0.130.1 (bugfix release).
The following issues were fixed:

  • don’t crash if a file marked as ‘A’ does not exist (bnc#658664)
  • fixed proxy handling (bnc#657958)
  • fixed repairwc (bnc#657838)
  • fixed build for python2.4

The new version is available in the openSUSE:Tools repo.

osc 0.130

December 6th, 2010 by

Hi,

we just released a new osc version: 0.130.

The main changes/features are:

  • – new “revert” command to restore the original working copy file (without
    downloading it)
  • – rewrote “diff” logic
  • – added new “–http-full-debug” option, “–http-debug” filters the “Authentication” and “Set-Cookie” header
  • – added new “–disabled-cpio-bulk-download” option: disable downloading packages as cpio archive from api
  • – added new “repairwc” command which tries to repair an inconsistent working copy
  • – workaround for broken urllib2 in python 2.6.5: wrong credentials lead to an infinite recursion
  • – support –interactive-review option when running “osc rq list <project>”
  • – improved “osc rq show <id> –interactive-review”
  • – do_config: added new options –stdin, –prompt, –no-echo:
    –stdin: read value from stdin
    –prompt: prompt for a value
    –no-echo: prompt for a value but don’t echo entered characters (for instance to enter a passwd)
  • – added template support for a submitrequest accept/decline message
  • – lots of internal rewrites (new working copy handling etc.)
  • – support added for osc search ‘perl(Foo::Bar)’
  • – New “service” command to run source services locally or trigger a re-run on the server.
  • – setlinkrev is setting now the revision to xsrcmd5 by default to avoid later breakage on indirect links by default.
  • Features which requires OBS 2.1:
    support reliable diff for an accepted request

NOTE:
Due to the rewrite of the working copy handling osc might fail with the following error:
Your working copy ‘.’ is in an inconsistent state.
Please run ‘osc repairwc .’ (Note this might _remove_
files from the .osc/ dir). Please check the state
of the working copy afterwards (via ‘osc status .’)

Simply run “osc repairwc” which might fetch files from the api or delete some files from the storedir (.osc/). It won’t touch locally modified files. For more information see section “WORKING COPY INCONSISTENT” in the README.

The new packages should be available soon in the openSUSE:Tools repo.

Thanks to everyone who contributed to osc!

osc 0.126

April 22nd, 2010 by

Hi,

I just submitted the new osc 0.126 release to the openSUSE:Tools
project. The new packages should be available soon at
http://download.opensuse.org/repositories/openSUSE:/Tools

(user visible) Changes:
0.126

  • – added VM autosetup to osc. This requires appropriate OBS version and build script version.
  • – enhanced QEMU cross build support with ‘armv4l’ ‘armv5el’ ‘armv6el’ ‘armv7el’ ‘armv8el’ ‘mips’ ‘mips64’ ‘ppc’ ‘ppc64’ ‘sh4’ arch strings now supported on x86 host
  • – suggest git, svn, … if indicated, after oscerr.NoWorkingCopy
  • – “osc cat” & “osc ls” now auto-expands through link.
  • – fixed “osc add” after “osc delete”.
  • – fix “osc patchinfo” command (crashed before)
  • – fixed SSL proxy support
  • – fixed meta attribute create and set calls
  • – osc remotebuildlog supports a buildlogurl
  • – Allow –prefer-pkgs to parse repodata
  • – new “osc build –no-service” option to skip source service update
  • – fix linktobranch apiurl usage
  • – “maintained package” search is telling relevant projects now
  • * requires OBS 1.7.2 or 2.0
  • – added “osc chroot” command
  • – fixed #547005 (“osc co could show download progress”)
  • – added “–interactive” option to “osc request”
  • – store commit message so it doesn’t get lost on failure
  • – added “–cpio-bulk-download” and “–download-api-only” options to “osc build”
  • – added “osc localbuildlog” command
  • – added “–build-uid uid:gid|caller” option to “osc build” to specify abuild id in chroot
  • – verify files using rpm bindings and keys supplied by buildservice
  • – added “–exclude-target-project <prj>” option to “osc rq list”
  • – added “–message” option to “osc branch”
  • – added “osc config” command to set/get/delete a config option
  • – added “–binary” and “–baseproject” options to “osc search”
  • – added “-o/–offline” and “-l/–preload” options to osc build
  • – osc build -l standard i586 foo.spec (to cache all dependencies)
  • – osc build -o standard i586 foo.spec (to build without contacting the api)

Thanks to everyone who contributed to osc!

new “osc config” command

March 8th, 2010 by

Hi,

recently I implemented a “osc config” command to set or get a configuration option.

Syntax: osc config <section> <option> [<value>]
(<section> is either an apiurl (see sections in the configfile) or an apiurl alias or ‘general’)

Here are some small examples how to use it:
# get the current value
marcus@linux:~> osc config general build-root
‘general’: ‘build-root’ is set to ‘/var/tmp/build-root-%(repo)s-%(arch)s’
# set an option
marcus@linux:~> osc config https://api.opensuse.org aliases obs
‘https://api.opensuse.org’: ‘aliases’ is set to ‘obs’
# remove an option
marcus@linux:~> osc config obs aliases –delete
‘obs’: ‘aliases’ got removed
# remove/reset an option
marcus@linux:~> osc config general build-root –delete
‘general’: ‘build-root’ is set to ‘/var/tmp/build-root’

Feedback, comments etc. are always welcome 🙂