Gentoo Archives: gentoo-dev

From: Rigo Ketelings <rigo@××××.nl>
To: Tom Prado <tprado@×××××××.net>
Cc: gentoo-dev <gentoo-dev@g.o>
Subject: Re: [gentoo-dev] local package.mask / or unmask
Date: Tue, 10 Sep 2002 15:40:19
Message-Id: 1031689885.29282.13.camel@lappy.rogi.biz
In Reply to: [gentoo-dev] local package.mask / or unmask by Tom Prado
1 There's a script out there (forums I believe I found it) that will tell
2 you what new ebuilds there are, every time you rsync....A little hack
3 overwrites package.mask with your local one (set by the script)....Be
4 carefull though...Once new ebuilds start crawling in (ALWAYS tested in
5 package.mask first; but not for you....if you're using this script
6 anyway ;-)
7
8 It also has functionality for a different thirdpartymirrors file and
9 reservers a package.mask.rsynced (=Current package.mask) in
10 $PORTDIR_OVERLAY
11
12 I named it 'er' after the proces emerge rsync ;-)
13
14 Have fun,
15
16 Rigo
17
18
19
20 <SNIP SCRIPT ER>
21 #!/bin/sh
22 BASE=/var/cache
23 USE_COLORS=yes
24 CHANGE_PACKAGE_MASK=yes
25 PORTDIR_OVERLAY=/home/lemar/portage
26 MIRROR_LIST=thirdpartymirrors.nl
27
28 # end user configuration section
29
30 . /etc/make.globals
31 BEFORE=$BASE/ebuild-rsync.before
32 AFTER=$BASE/ebuild-rsync.after
33 NEW=$BASE/ebuild-rsync.new
34 REMOVED=$BASE/ebuild-rsync.removed
35
36 if [ "$USE_COLORS" == "yes" ]; then
37 RED="\033[;31m"
38 GREEN="\033[;32m"
39 NORMAL="\033[m"
40 fi
41
42 function portagetree () {
43 find $PORTDIR -type d -mindepth 2 -maxdepth 2
44 }
45
46 # do it
47 portagetree >$BEFORE
48 emerge $@ rsync
49 portagetree >$AFTER
50 diff $BEFORE $AFTER | grep ">" | sed "s/> //g" > $NEW
51 diff $BEFORE $AFTER | grep "<" | sed "s/< //g" > $REMOVED
52
53 # cleanup
54 rm $BEFORE $AFTER
55
56 # display new ebuilds
57 if ! diff -q $NEW /dev/null >/dev/null; then
58 echo
59 echo Nieuwe ebuilds:
60 echo
61 for i in $(cat $NEW); do
62 . $(ls $i/*.ebuild --sort=time | head -n 1)
63 echo -e $GREEN${i##$PORTDIR/}$NORMAL: $DESCRIPTION
64 done
65 fi
66 if [ "$CHANGE_PACKAGE_MASK==yes" ]; then
67 cp $PORTDIR/profiles/package.mask $PORTDIR_OVERLAY/package.mask.rsynced
68 cp $PORTDIR_OVERLAY/package.mask $PORTDIR/profiles/package.mask
69 cp $PORTDIR_OVERLAY/$MIRROR_LIST $PORTDIR/profiles/thirdpartymirrors
70 fi
71 # display removed ebuilds
72 if ! diff -q $REMOVED /dev/null >/dev/null; then
73 echo
74 echo Verwijderde ebuilds:
75 echo
76 for i in $(cat $REMOVED); do
77 echo -e $RED${i##$PORTDIR/}$NORMAL
78 done
79 fi
80 </SNIP SCRIPT ER>
81
82
83
84
85
86 Op di 10-09-2002, om 05:08 schreef Tom Prado:
87 > Hello all,
88 >
89 > There's probably something in the documentation describing how to do
90 > this but I couldn't seem to find anything anywhere. I have
91 > modifications to my /usr/portage/profiles/package.mask but everytime I
92 > emerge rsync, I loose them all and have to reapply. Is there a way to
93 > have a local package.mask file that I can use to both mask specific
94 > versions of packages and unmask others that are currently masked in the
95 > central one? I tried creating one in /usr/portage.local/profiles (after
96 > setting PORTDIR_OVERLAY in /etc/make.conf) but that didn't seem to have
97 > any effect.
98 >
99 > Thank you for your time,
100 > Tom Prado
101 >
102 >
103 > _______________________________________________
104 > gentoo-dev mailing list
105 > gentoo-dev@g.o
106 > http://lists.gentoo.org/mailman/listinfo/gentoo-dev

Replies

Subject Author
Re: [gentoo-dev] local package.mask / or unmask Tom Prado <tprado@×××××××.net>