I think it only makes sense that I shouldn't have to type `svn upgrade /home/binki/gentoo/var/lib/layman/sunrise' myself. I know I just did, but I didn't yet type it into a terminal... and I think layman should handle this ;-). It'd be awesome if this could be in the stable layman before >=dev-vcs/subversion-1.7.0 is stable... To reproduce, I think the following should work: # emerge '<subversion-1.7.0' # layman -d sunrise # layman -a sunrise # emerge '>=subversion-1.7.0' # layman -s sunrise The errors I expect app-portage/layman to manage for me: `` binki@fox ~/julian.old/util/ccel/trunk/monitor-scripts $ layman -s sunrise * Fetching remote list,... * Remote list already up to date: http://www.gentoo.org/proj/en/overlays/repositories.xml * Last-modified: Mon, 12 Mar 2012 20:00:15 GMT * Fetch Ok * Syncing selected overlays,... * Running Subversion... # /home/binki/gentoo/usr/bin/svn up /home/binki/gentoo/var/lib/layman/sunrise svn: E155036: Please see the 'svn upgrade' command svn: E155036: Working copy '/home/binki/gentoo/var/lib/layman/sunrise' is too old (format 10, created by Subversion 1.6) * Failure result returned from Subversion * * Errors: * ------ * Failed to sync overlay "sunrise". * Error was: Syncing overlay "sunrise" returned status 1! * db.sync() * * CLI: Errors occured processing action sync * * Errors: * ------ * Failed to sync overlay "sunrise". * Error was: Syncing overlay "sunrise" returned status 1! * db.sync() * ''
Layman does not currently parse the output of of any of the binary commands it runs for any of the vcs types it supports. Looking at the main subversion site, starting with 1.6 it has a new python api with some high level python classes. It may be possible to re-write the subversion overlay type to use the python api instead. I will check into it to see how much work is involved. Parsing terminal output of a shell run command sucks badly and prone to breakage if the specific error message changes over time. That is something I do not want to do. That said, the majority of available overlays listed by layman are git based. svn type overlays are diminishing rapidly. By rapidly, I am referring to the fact that infra is busy working on converting all o.g.o hosted overlays to git. They plan to eliminate the work of maintaining svn repos on our infrastructure. the sunrise overlay already has git based overlays being tested and the bugs worked out of the system. Some old obsolete developer overlays are being eliminated in the process. So, will all the work to port layman to using the svn python api be worth it? maybe, too early to know. But don't look for it in 2.0.0 final.
(In reply to comment #1) > Layman does not currently parse the output of of any of the binary commands > it runs for any of the vcs types it supports. Looking at the main > subversion site, starting with 1.6 it has a new python api with some high > level python classes. It may be possible to re-write the subversion overlay > type to use the python api instead. Why not just check the version of the installed svn. If it is older than 1.7, do nothing. Otherwise, check if <repo_path>/.svn/wc.db exists. If that file doesn't exist, `svn upgrade' needs to be run. With this method, the only time you'd be parsing svn's output is when running `svn --version'.
Done, it will check and perform an svn upgrade when needed. commit: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=fc3cd9942ac71e118796d823fe3303a8c7cecdc2
This has been released in rc4 and rc5 without any more bugs reported. closing this one
Re-opening, since I've just been informed svn upgrade will need to be run for any version upgrade 1.6.x ==> 1.7.x ==> 1.8.x... 1.8 is soon to be released. doing some timing on my system, it takes the same time to run svn upgrade as it does to run svn -q --version. So, it may just be easiest to quietly run svn upgrade every time. One Caveat, is that a svn downgrade will render the checkout unusable and will need to be deleted and re-added with the downgraded svn version.
fixed in commit: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=8f96019f53b570163ddcf255551595fedca42bf4
Final patch is released in layman-2.0.0-r3.