Bug 678868

Summary: osc up -u truncates .osc/_files due to lack of error handling
Product: [Internal Novell Products] openSUSE Build Service Reporter: Olaf Hering <ohering>
Component: oscAssignee: Adrian Schröter <adrian.schroeter>
Status: RESOLVED DUPLICATE QA Contact: Adrian Schröter <adrian.schroeter>
Severity: Critical    
Priority: P5 - None CC: suse-tux
Version: master   
Target Milestone: ---   
Hardware: x86-64   
OS: Linux   
Whiteboard:
Found By: Outsourced Testing Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Olaf Hering 2011-03-11 12:19:16 UTC
sles11sp1 with official updates on bax.arch.suse.de, osc --version
0.125.5


I have a script which syncs the svn tree to the buildservice. Its in Devel:Virt:svn_autotest-xen/scripts.
It contains also a 'osc up -u' run, which essentially does nothing since there are no upstream changes to pull.

However, at random times .osc/_files of some package gets trunctated, at the next run the script runs into a corrupted checkout:
...
alias '11.3'  
svn_dir 'branches/openSUSE-11.3-Branch'
ibs_suffix 'openSUSE-11.3-Branch'
ibs_project 'openSUSE.org:openSUSE:11.3'
packages 'xen kernel libvirt libvirt-cim virt-manager virt-viewer vhostmd'
Using Devel:Virt:svn_autotest-xen:openSUSE-11.3-Branch as IBS working copy
Working copy state:
'./installation-images' is not a valid working copy.
When parsing .osc/_files, the following error was encountered:
no element found: line 1, column 0
...

Looking at /usr/lib64/python2.6/site-packages/osc/core.py:update_local_filesmeta() I see nothing that prevents that from happening. There is no check wether http_GET() returns anything. Instead whatever happens is written to '_files', in my case nothing.
Please fix and release as bugfix update.
Comment 1 Marcus Hüwe 2011-04-07 22:08:18 UTC
This bug shouldn't happen with a recent osc version (>= 0.130). The whole update mechnism was rewritten in the meantime.
Comment 2 Olaf Hering 2011-05-17 17:36:29 UTC
(In reply to comment #1)
> This bug shouldn't happen with a recent osc version (>= 0.130). The whole
> update mechnism was rewritten in the meantime.

It was probably rewritten, but not fixed.
A failed update or checkout will still leave a mess behind.
bug #690492
Comment 3 Adrian Schröter 2012-04-03 13:50:58 UTC
duplicate

*** This bug has been marked as a duplicate of bug 690492 ***