On Wed, May 20, 2009 at 5:01 AM, Ulrich Mueller wrote: > > > ${PORTDIR}/app-misc/foo/foo-1a_live.ebuild > ${PORTDIR}/app-misc/foo-1a/foo-1a-live.ebuild > > With our current versioning scheme the rule is very simple: ${P} is > split into ${PN} and ${PV} at the last hyphen. This can be done in a > straight forward way by regexp matching, and I would really hate to > lose this nice property. > > Ulrich > > $str="app-misc/foo/foo-1a_live.ebuild"; $str =~ /([^/]+)/([^/]+)/\2(.*).ebuild/ ( $category, $package, $version ) = ( $1, $2, $3 ) Simple enough on a supporting language. Naive maybe, but has worked well for me thus far. It appears to be more a problem disambiguating from the user-input end of the spectrum, and this scenario would be more likely to happen if for some insane crack-fueled reason both packages were to exist. Even then, app-misc/foo-1a # must always resolve to "app-misc/foo-1a" due to no = stating that it needs a version part =app-misc/foo-1a # must always resolve to "app-misc/foo" due to the = stating a mandatory version part. ( =cat/pack is invalid ) -- Kent