Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 408039 - app-portage/layman-2.0.0_rc3 does not handle 'svn upgrade' for >=dev-vcs/subversion-1.7.0
Summary: app-portage/layman-2.0.0_rc3 does not handle 'svn upgrade' for >=dev-vcs/subv...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Brian Dolbec
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 375789
  Show dependency tree
 
Reported: 2012-03-13 15:54 UTC by Nathan Phillip Brink (binki) (RETIRED)
Modified: 2014-03-10 03:28 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2012-03-13 15:54:23 UTC
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()
 * 
''
Comment 1 Brian Dolbec (RETIRED) gentoo-dev 2012-03-13 19:51:32 UTC
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.
Comment 2 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2012-03-13 22:11:24 UTC
(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'.
Comment 3 Brian Dolbec (RETIRED) gentoo-dev 2012-10-08 04:39:09 UTC
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
Comment 4 Brian Dolbec (RETIRED) gentoo-dev 2012-12-16 16:33:42 UTC
This has been released in rc4 and rc5 without any more bugs reported.

closing this one
Comment 5 Brian Dolbec (RETIRED) gentoo-dev 2012-12-17 04:51:59 UTC
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.
Comment 7 Brian Dolbec (RETIRED) gentoo-dev 2014-03-10 03:28:34 UTC
Final patch is released in layman-2.0.0-r3.