For portage-2.2: * live git tree generates 'vX.Y_rcZ-N-...' * ebuilds use 'X.Y_rcZ_pN' This means that to parse portage.VERSION, I need to use regular expression as complex as: ^v?((?:\d+\.)*\d+)(?:_rc(\d+))?(?:(?:_p|-)(\d+))? I guess a little unification may be a good idea. Not sure how to embed the hash but the first part could be really ebuild-like, in order to be parsable by the standard PV splitting functions.
Created attachment 247979 [details, diff] make valid version and append _p with unix time if modified relative to HEAD Examples: python -c 'import portage ; print portage.VERSION' 2.2_rc84_p1 # modify some source files python -c 'import portage ; print portage.VERSION' 2.2_rc84_p1_p1284893343
(In reply to comment #1) > python -c 'import portage ; print portage.VERSION' > 2.2_rc84_p1_p1284893343 Hm, seems a little long. Maybe you could subtract the HEAD timestamp from it?
(In reply to comment #2) > Hm, seems a little long. Maybe you could subtract the HEAD timestamp from it? Ok, it's in git now: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=213dce575a3302ea3b24a81382a587533fd665e1
Marking as fixed since this only matters for checkouts.