Gentoo Archives: gentoo-dev

From: Steve Long <slong@××××××××××××××××××.uk>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: repoman - I cannot handle it...
Date: Sun, 21 Oct 2007 10:54:25
Message-Id: fffaat$g5b$1@ger.gmane.org
In Reply to: [gentoo-dev] repoman - I cannot handle it... by Markus Rothe
1 Markus Rothe wrote:
2
3 > Attached are the scripts I use to commit packages stable/unstable.
4 > Somewhere must be a bug!
5 >
6 > 'name_split.cpp' splits a package name like sys-devel/gcc-4.1.2 into
7 > category, package name and version number. It's done in c++ as that's the
8 > only language I do more with than 'hello world' programms. Not much more,
9 > just more. ;-)
10 >
11 You can do this quite easily with a shell function. Here's a slightly modded
12 version of the one we use in update:
13 # returns true if there was a version
14 getPkgNameVer() {
15 case "$1" in
16 *-cvs[0-9]*)
17 pName=${1%-cvs[0-9]*}
18 pVer=${1#$pName-}
19 ;; *-[0-9]*)
20 pName=${1%%-[0-9]*} # from first -N
21 pVer=${1#$pName-}
22 ;; *)
23 pName=$1
24 pVer=
25 ;; esac
26 pCat=${pName%/*}; pN=${pName#*/}
27 [ "$pVer" ] && return 0
28 return 1
29 }
30 ..which leaves the results in globals pName (which includes cat) pVer, pCat
31 and pN (no category.) It handles cvs ebuilds as well, and is in sh.
32
33 > 'mp.sh' is the script which calls name_split, repoman etc. It's pretty
34 > straight forward and only does the things I would also do by hand.
35 >
36 > So if I want to mark for example sys-devel/gcc-4.1.2 stable on ppc64 I
37 > call mp.sh like this: mp.sh ppc64 sys-devel/gcc-4.1.2 "Stable on ppc64"
38 >
39 > If someone has a hint where the problem is, I would really appreciate
40 > that.
41 >
42 >From the bugs, it appears that, while you are keywording the packages
43 themselves, the dependencies are not being so marked. This is very similar
44 to the problem autounmask solves, unmasking all deps of a packages. I'd
45 suggest taking a look at it/asking ian about it; I never got into it as
46 it's in Perl, but we do use it as an external for update.
47
48
49 --
50 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] Re: repoman - I cannot handle it... Marius Mauch <genone@g.o>