Markus Rothe wrote:
> Attached are the scripts I use to commit packages stable/unstable.
> Somewhere must be a bug!
>
> 'name_split.cpp' splits a package name like sys-devel/gcc-4.1.2 into
> category, package name and version number. It's done in c++ as that's the
> only language I do more with than 'hello world' programms. Not much more,
> just more. ;-)
>
You can do this quite easily with a shell function. Here's a slightly modded
version of the one we use in update:
# returns true if there was a version
getPkgNameVer() {
case "$1" in
*-cvs[0-9]*)
pName=${1%-cvs[0-9]*}
pVer=${1#$pName-}
;; *-[0-9]*)
pName=${1%%-[0-9]*} # from first -N
pVer=${1#$pName-}
;; *)
pName=$1
pVer=
;; esac
pCat=${pName%/*}; pN=${pName#*/}
[ "$pVer" ] && return 0
return 1
}
..which leaves the results in globals pName (which includes cat) pVer, pCat
and pN (no category.) It handles cvs ebuilds as well, and is in sh.
> 'mp.sh' is the script which calls name_split, repoman etc. It's pretty
> straight forward and only does the things I would also do by hand.
>
> So if I want to mark for example sys-devel/gcc-4.1.2 stable on ppc64 I
> call mp.sh like this: mp.sh ppc64 sys-devel/gcc-4.1.2 "Stable on ppc64"
>
> If someone has a hint where the problem is, I would really appreciate
> that.
>
>From the bugs, it appears that, while you are keywording the packages
themselves, the dependencies are not being so marked. This is very similar
to the problem autounmask solves, unmasking all deps of a packages. I'd
suggest taking a look at it/asking ian about it; I never got into it as
it's in Perl, but we do use it as an external for update.
--
[EMAIL PROTECTED] mailing list