Gentoo Archives: gentoo-user

From: Eugene Rosenzweig <eugene259@××××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] xorg-x11-7.2 and portage
Date: Fri, 26 Jan 2007 15:42:32
Message-Id: 45BA1F89.6070906@internode.on.net
In Reply to: [gentoo-user] xorg-x11-7.2 and portage by "Matthew R. Lee"
1 Matthew R. Lee wrote:
2 > I've just been doing my regular emerge -pvu world and the system wants to
3 > update xorg-x11 to 7.2, fine. To do this I needed to add some packages to
4 > the packages.keywords file, again fine.
5 > My problem is I had to go through the cycle emerge -pvu world add a package to
6 > package.keywords 11 times, to deal with the 11 masked packages that
7 > xorg-x11-7.2 required.
8 > So the question is, is there anyway to get emerge to list all the masked
9 > dependencies required all at once? (i.e. when I run emerge -pvu world the
10 > first time). I've looked at the man page but didn't see an obvious solution.
11 > Thanks
12 > Matt
13 >
14
15 It is a mini-repeat of what one had to do to get 7.0 installed.
16 There were a lot more masked packages to add at that time. I still have
17 a script I wrote for that purpose, it adds any encountered unstable
18 ebuilds to the /etc/portage/portage.keywords file and masked ebuilds to /etc/portage/portage.unmask file:
19
20 ------------------
21
22 #!/bin/sh
23
24 LASTADD=''
25 UNMASK=''
26
27 if [ -z "$*" ]; then
28 echo Need package name to emerge
29 exit
30 fi
31
32 until emerge --deep --nocolor --verbose --pretend $* >/tmp/autokw$$; do
33 if egrep "All ebuilds that could satisfy \".*\" have been masked." /tmp/autokw$$; then
34 #echo error from portage looking at output
35 EBUILD=`grep "^- " /tmp/autokw$$ | head -n 1 |\
36 sed -e 's/^- \(.*\)-[0-9].*$/\1/'`
37 if [ "$EBUILD" == "$LASTADD" -o -z "$EBUILD" ]; then
38 echo oops same as last time or null: [$EBUILD]
39 if [ ! -z "$UNMASK" ]; then
40 echo already tried to unmask package
41 rm /tmp/autokw$$
42 exit
43 fi
44 echo trying to add to unmask
45 if grep "All ebuilds that could satisfy" /tmp/autokw$$; then
46 EBUILD=`grep "All ebuilds that " /tmp/autokw$$ | head -n 1 |\
47 sed -e 's/.*"\([^"]*\).*$/\1/'`
48 echo $EBUILD >> /etc/portage/package.unmask
49 UNMASK="yes"
50 LASTADD=''
51 fi
52 else
53 echo adding [$EBUILD] to keywords file
54 echo -e "$EBUILD\t~x86" >>/etc/portage/package.keywords;
55 LASTADD=$EBUILD
56 UNMASK=''
57 fi
58 else
59 echo could not parse output
60 cat /tmp/autokw$$
61 break
62 fi
63 done
64 [ -e "/tmp/autokw$$" ] && rm /tmp/autokw$$
65
66 ------------------
67
68 It's just a hack but it has worked for me a couple of days ago for 7.2 ebuild. On that note, I have also found the etcportclean script useful (just google for it). It scans your /etc/portage files and tells you if you have any redundant entries there. The script might be broken a little from memory but it has worked quite well for me over a long time.
69
70 Eugene.
71
72 --
73 gentoo-user@g.o mailing list