branching from working copy fails

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

branching from working copy fails

Olaf Hering-2
Branching a pkg from one prj to another fails if osc is called from a copy of prj:

olaf@satriani:~/work/obs/home:olh:ocaml $  obs branch devel:languages:ocaml ocaml-curses home:olh:ocaml
Traceback (most recent call last):
  File "/usr/bin/osc", line 41, in <module>
    r = babysitter.run(osccli)
  File "/usr/lib/python2.7/site-packages/osc/babysitter.py", line 61, in run
    return prg.main(argv)
  File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 343, in main
    return self.cmd(args)
  File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 366, in cmd
    retval = self.onecmd(argv)
  File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 500, in onecmd
    return self._dispatch_cmd(handler, argv)
  File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 1230, in _dispatch_cmd
    return handler(argv[0], opts, *args)
  File "/usr/lib/python2.7/site-packages/osc/commandline.py", line 3414, in do_branch
    if conf.get_configParser().get('general', 'apiurl') != apiurl:
  File "/usr/lib64/python2.7/ConfigParser.py", line 607, in get
    raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'general'
olaf@satriani:~/work/obs/home:olh:ocaml $ ..
olaf@satriani:~/work/obs $  obs branch devel:languages:ocaml ocaml-curses home:olh:ocaml
BuildService API error: failed to branch: branch target package already exists: home:olh:ocaml/ocaml-curses


To me it looks like doing the branch is working fine, but dealing with the result is what confuses osc.
I tried it with another pkg (ocaml-dbus) and that one failed in the same way.

 rpm -q --changelog osc | head
 * Di Mai 09 2017 [hidden email]
 - 0.158.0

Olaf

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: branching from working copy fails

Marcus Hüwe
On 2017-05-09 18:22:30 +0200, Olaf Hering wrote:

> Branching a pkg from one prj to another fails if osc is called from a copy of prj:
>
> olaf@satriani:~/work/obs/home:olh:ocaml $  obs branch devel:languages:ocaml ocaml-curses home:olh:ocaml
> Traceback (most recent call last):
>   File "/usr/bin/osc", line 41, in <module>
>     r = babysitter.run(osccli)
>   File "/usr/lib/python2.7/site-packages/osc/babysitter.py", line 61, in run
>     return prg.main(argv)
>   File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 343, in main
>     return self.cmd(args)
>   File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 366, in cmd
>     retval = self.onecmd(argv)
>   File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 500, in onecmd
>     return self._dispatch_cmd(handler, argv)
>   File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 1230, in _dispatch_cmd
>     return handler(argv[0], opts, *args)
>   File "/usr/lib/python2.7/site-packages/osc/commandline.py", line 3414, in do_branch
>     if conf.get_configParser().get('general', 'apiurl') != apiurl:
>   File "/usr/lib64/python2.7/ConfigParser.py", line 607, in get
>     raise NoSectionError(section)
> ConfigParser.NoSectionError: No section: 'general'
> olaf@satriani:~/work/obs/home:olh:ocaml $ ..

This looks really strange... in case of a missing [general] section,
osc is supposed to fail earlier. Can you check if your oscrc has a
[general] section?

Is "obs" an alias for or a wrapper around osc? If so, how is it
defined?

> olaf@satriani:~/work/obs $  obs branch devel:languages:ocaml ocaml-curses home:olh:ocaml
> BuildService API error: failed to branch: branch target package already exists: home:olh:ocaml/ocaml-curses
>
>
> To me it looks like doing the branch is working fine, but dealing with the result is what confuses osc.
> I tried it with another pkg (ocaml-dbus) and that one failed in the same way.
>
Yep, the actual branching worked.

>  rpm -q --changelog osc | head
>  * Di Mai 09 2017 [hidden email]
>  - 0.158.0
>
I'm pretty sure it also fails with the previous release.


Marcus
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: branching from working copy fails

Olaf Hering-2
Am Tue, 9 May 2017 23:35:18 +0200
schrieb Marcus Hüwe <[hidden email]>:

> This looks really strange... in case of a missing [general] section,
> osc is supposed to fail earlier. Can you check if your oscrc has a
> [general] section?

There is no ~/.oscrc, but a ~/.osc/oscrc:
[general]
packagecachedir = /abuild_disk/olaf/OSbuild-packagecache
su-wrapper = sudo nice -n -13 ionice -c 1 -t
build-root = /abuild_disk/olaf/oscbuild/%(apihost)s/%(project)s-%(package)s/%(repo)s-%(arch)s
extra-pkgs = vim ctags quilt vim-data gdb strace
plaintext_passwd = 0
use_keyring = 0
[https://api.opensuse.org]
user=olh
passx=whatever
trusted_prj=SUSE:SLE-11:SP1 openSUSE:Factory openSUSE:11.4 multimedia:libs openSUSE:11.4:Update:Test openSUSE:11.4:Update system:install:head openSUSE:12.1:Update openSUSE:12.1 Fedora:16 Mandriva:2011 RedHat:RHEL-6 Fedora:15 openSUSE:Factory:Staging:Gcc47 Kernel:HEAD devel:tools:building SUSE:SLE-11:SP2 openSUSE:12.2 home:olh:kernel:sles11sp1 openSUSE:12.2:Update devel:languages:ocaml Kernel:SLE11-SP2 Virtualization Base:System SUSE:SLE-11:SP2:Update openSUSE:Evergreen:11.4 openSUSE:12.3:Update openSUSE:12.3 Fedora:18 filesystems SUSE:SLE-11:SP3 Kernel:SLE11-SP3 openSUSE:13.1 openSUSE:13.1:Update devel:languages:go openSUSE:Factory:ARM devel:tools SUSE:SLE-12:GA Kernel:SLE12 openSUSE:13.2 devel:tools:scm network:utilities home:olh:xen-buildrequires openSUSE:13.2:Update CentOS:CentOS-7 RedHat:RHEL-7 Kernel:SLE11-SP4 SUSE:SLE-11:SP4 openSUSE:Leap:42.1 Fedora:23 Fedora:22 Fedora:21 devel:languages:ruby SUSE:SLE-12-SP1:GA openSUSE:Leap:42.1:Update devel:libraries:c_c++ devel:languages:ruby:extensions devel:languages:python KDE:Frameworks5 graphics openSUSE:Leap:42.2 security home:olh:branches:multimedia:libs SUSE:SLE-12-SP2:GA openSUSE:Leap:42.2:Update multimedia:apps

> Is "obs" an alias for or a wrapper around osc? If so, how is it
> defined?

obs is just a wrapper:
#/bin/sh
exec /usr/bin/osc --config=$HOME/.osc/oscrc -A https://api.opensuse.org "$@"

There where various spots in the code that hardcode ~/.oscrc. Not sure if they are all fixed already.

Olaf

attachment0 (201 bytes) Download Attachment
Loading...