1 |
Having read the email exchange on the possibility of using |
2 |
'package.use' as a directory, I thought I would give that a try. |
3 |
|
4 |
Here is what I have attempted so far. |
5 |
|
6 |
cd /etc/portage |
7 |
mv package.use package.use.COPY |
8 |
mkdir package.use |
9 |
cd package.use |
10 |
awk -F'[/\t ]+' '{printf("echo \047%s\047 >> ", $0); sub("-[0-9]+.*", |
11 |
"", $2); print $2}' ../package.use.COPY |
12 |
|
13 |
NOTE; the awk output just generates the command lines for the shell to |
14 |
run. If the output is acceptable, it should be piped through to the |
15 |
shell. |
16 |
|
17 |
Here is the contents of the original 'package.use' file: |
18 |
|
19 |
cat package.use |
20 |
=dev-lang/python-2.7.9-r1 sqlite |
21 |
>=dev-ruby/json-1.8.2-r1 ruby_targets_ruby21 |
22 |
>=dev-ruby/racc-1.4.11 ruby_targets_ruby21 |
23 |
>=dev-ruby/rake-0.9.6-r1 ruby_targets_ruby21 |
24 |
>=dev-ruby/rdoc-4.0.1-r2 ruby_targets_ruby21 |
25 |
>=dev-ruby/rubygems-2.2.5-r1 ruby_targets_ruby21 |
26 |
>=media-libs/harfbuzz-0.9.38 icu |
27 |
>=media-video/ffmpeg-2.6.3 theora |
28 |
>=sys-libs/zlib-1.2.8-r1 minizip |
29 |
>=virtual/rubygems-10 ruby_targets_ruby21 |
30 |
gnome-base/gvfs -http gphoto2 mtp |
31 |
media-video/vlc a52 aac bidi cdda cdio dts dvd flac freetype gnutls |
32 |
httpd libass live lua mad matroska mpeg ogg oggvorbis qt4 stream svga |
33 |
theora vcd vlm wxwindows xv |
34 |
net-print/hplip scanner qt4 |
35 |
sys-apps/busybox -pam |
36 |
sys-devel/gcc objc |
37 |
sys-process/cronie anacron |
38 |
x11-base/xorg-server udev |
39 |
xfce-extra/xfce4-power-manager -udisks |
40 |
xfce-extra/xfce4-sensors-plugin hddtemp lm_sensors |
41 |
|
42 |
NOTE: There are two entries for 'rubygems' there. |
43 |
|
44 |
Here is the awk script output: |
45 |
|
46 |
echo '=dev-lang/python-2.7.9-r1 sqlite' >> python |
47 |
echo '>=dev-ruby/json-1.8.2-r1 ruby_targets_ruby21' >> json |
48 |
echo '>=dev-ruby/racc-1.4.11 ruby_targets_ruby21' >> racc |
49 |
echo '>=dev-ruby/rake-0.9.6-r1 ruby_targets_ruby21' >> rake |
50 |
echo '>=dev-ruby/rdoc-4.0.1-r2 ruby_targets_ruby21' >> rdoc |
51 |
echo '>=dev-ruby/rubygems-2.2.5-r1 ruby_targets_ruby21' >> rubygems |
52 |
echo '>=media-libs/harfbuzz-0.9.38 icu' >> harfbuzz |
53 |
echo '>=media-video/ffmpeg-2.6.3 theora' >> ffmpeg |
54 |
echo '>=sys-libs/zlib-1.2.8-r1 minizip' >> zlib |
55 |
echo '>=virtual/rubygems-10 ruby_targets_ruby21' >> rubygems |
56 |
echo 'gnome-base/gvfs -http gphoto2 mtp' >> gvfs |
57 |
echo 'media-video/vlc a52 aac bidi cdda cdio dts dvd flac freetype |
58 |
gnutls httpd libass live lua mad matroska mpeg ogg oggvorbis qt4 |
59 |
stream svga theora vcd vlm wxwindows xv' >> vlc |
60 |
echo 'net-print/hplip scanner qt4' >> hplip |
61 |
echo 'sys-apps/busybox -pam' >> busybox |
62 |
echo 'sys-devel/gcc objc' >> gcc |
63 |
echo 'sys-process/cronie anacron' >> cronie |
64 |
echo 'x11-base/xorg-server udev' >> xorg-server |
65 |
echo 'xfce-extra/xfce4-power-manager -udisks' >> xfce4-power-manager |
66 |
echo 'xfce-extra/xfce4-sensors-plugin hddtemp lm_sensors' >> |
67 |
xfce4-sensors-plugin |
68 |
|
69 |
The two 'rubygems' entries I had in the original 'package.use' file |
70 |
went into a single 'rubygems' file: |
71 |
|
72 |
cat rubygems |
73 |
>=dev-ruby/rubygems-2.2.5-r1 ruby_targets_ruby21 |
74 |
>=virtual/rubygems-10 ruby_targets_ruby21 |
75 |
|
76 |
Is this format acceptable? Or should I have used two separate files, |
77 |
one for 'dev-lang/rubygems', and another for 'virtual/rubygems'? |
78 |
|
79 |
I have run 'emerge -auUND @world' since the transition, which voiced |
80 |
no complaints so far. |
81 |
|
82 |
The list's input would be appreciated. |