Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 159051

Summary: app-portage/layman claims success when ctrl+c out of svn
Product: Gentoo Linux Reporter: Harrison Metzger <harrisonmetz>
Component: New packagesAssignee: Gunnar Wrobel (RETIRED) <wrobel>
Status: RESOLVED FIXED    
Severity: minor CC: agaffney
Priority: Normal    
Version: 2006.1   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch to check return codes of sync

Description Harrison Metzger 2006-12-24 20:22:17 UTC
When syncing an overlay with layman 1.0.8 to a server that was going slow, I ctrl+c out of it but it claimed success. Here is the output:

* Running command "/usr/bin/svn update "/usr/portage/local/layman/initng""...
svn: PROPFIND request failed on '/portage/gentoo'
svn: PROPFIND of '/portage/gentoo': could not connect to server (https://svn.initng.org)
*
* Success:
* ------
*
* Successfully synchronized overlay "initng".

Perhaps layman does not check the return status of SVN?
Comment 1 Harrison Metzger 2006-12-24 20:26:26 UTC
*** Bug 159052 has been marked as a duplicate of this bug. ***
Comment 2 Andrew Gaffney (RETIRED) gentoo-dev 2006-12-24 20:51:07 UTC
If I'm reading the code correct, layman doesn't seem to check the return code of any call to sync(), even though the return code is sent back by overlay.cmd()'s call to os.system(). Patches are welcome ;)
Comment 3 Harrison Metzger 2006-12-24 22:08:14 UTC
Yep. I see that on line 182 of db.py in /usr/lib/python2.4/site-packages/layman.
I don't know python but let me read a tutorial and see if i can solve this.
Comment 4 Harrison Metzger 2006-12-25 08:34:33 UTC
Created attachment 104712 [details, diff]
Patch to check return codes of sync

Very small patch to db.py in /usr/lib/python2.4/site-packages/layman/. All it does is check the return code and if its non 0. I looked and all, svn, rsync, and cvs code all use the cmd to execute their sync command, so it should work for all of them. I patched mine and its working fine.
Comment 5 Gunnar Wrobel (RETIRED) gentoo-dev 2006-12-30 08:15:53 UTC
Fixed in layman-1.0.9. The new version was added to my overlay (http://overlays.gentoo.org/dev/wrobel) and will be moved to the overlay soon.

Thanks for the patch.