1 |
On Wed, 21 May 2014 18:41:28 -0400 |
2 |
David Abbott <dabbott@g.o> wrote: |
3 |
|
4 |
> Hi Everyone, |
5 |
> We are putting together this months GMN [1] Looking for some content |
6 |
> to add to the "Tip of the month" section. |
7 |
> Regards |
8 |
> David |
9 |
> |
10 |
> [1] http://blogs.gentoo.org/news |
11 |
|
12 |
You can create a simple shell function like this: |
13 |
|
14 |
whymask() { |
15 |
find /usr/portage/profiles/ -name '*.mask' -exec \ |
16 |
awk -vRS= "/${*/\//.}/ { |
17 |
print \" \" FILENAME \":\", \"\n\" \"\n\" \$0 \"\n\" |
18 |
}" {} + | less |
19 |
} |
20 |
|
21 |
You can do `whymask sys-kernel/gentoo-sources` to get reasons as to why |
22 |
a particular package is masked; very handy to quickly check something |
23 |
up, especially for USE flag masks which Portage doesn't explain. |
24 |
|
25 |
You can do `whymask Gnome 3.12` to get the entire GNOME 3.12 mask, |
26 |
piping it to `grep -v mask: > /etc/portage/package.unmask/gnome3` then |
27 |
allows you to quickly update your GNOME 3.12 unmask; if you want this to |
28 |
happen on sync, you can put this line in /etc/portage/postsync.d/gnome3 |
29 |
and make it executable such that it'll be ran after every sync. |
30 |
|
31 |
The magic trick here is that awk -vRS= "/.../" matches paragraphs; as |
32 |
the record separator is empty, it takes the blank lines. |
33 |
|
34 |
-- |
35 |
With kind regards, |
36 |
|
37 |
Tom Wijsman (TomWij) |
38 |
Gentoo Developer |
39 |
|
40 |
E-mail address : TomWij@g.o |
41 |
GPG Public Key : 6D34E57D |
42 |
GPG Fingerprint : C165 AF18 AB4C 400B C3D2 ABF0 95B2 1FCD 6D34 E57D |