Gentoo Archives: gentoo-dev

From: John Jawed <johnjawed@×××××.com>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] FEATURES to cut the excess in portage
Date: Sun, 05 Nov 2006 18:06:09
1 Two patches which allow a user to bypass files created with doman and
2 dodoc in FEATURES:
4 FEATURES="noman nodoc" emerge -av foo
9 Quick background/inspiration:
11 I found myself having to make an initrd suitable to do PXE boots for
12 our business and educational clusters. I was exploiting the ever so
13 useful ROOT option for portage to emerge packages into the initrd
14 build directory. However, because this was an initrd being sent over
15 the network, total size was important.
17 At larger sizes the loading the initrd would actually cause a kernel
18 panic on pivoting root...whether this was a result of a kernel config,
19 a set maximum size limit, or something else I'm not exactly sure of.
21 Looking at the output of du, I started first by removing the man and
22 documentation files. This brought the size of my final initrd down
23 significantly (~287MiB to ~242MiB).
25 Possible issues/bigger picture:
27 While I was making the changes to doman and prepman, I kept thinking
28 of how this really is part of a bigger picture, [I think] maybe the
29 whole minimal concept should be abstracted out of USE (for packages
30 that have it) and be part of FEATURES (for all packages).
31 In my case because I was using ROOT in portage to build out an initrd,
32 I didn't really need or want man or documentation for the packages I
33 was putting in.
35 At the end of the day, maybe there should be a specific mix of
36 FEATURES such as "nodoc noman" and/or a granular mix of "minimal"
37 which encompasses the previous+more. Obviously it's open for a lot of
38 discussion and the patches attached should/would probably not be a
39 final solution...the goal was that this would be a start.
41 We've been using this patch and it's worked out for us well. Your
42 mileage may vary, if it does, please say something! :-)
44 Thanks,
45 John
47 PS Sorry to the devs I was working with (you know who you are :-) for
48 my inactivity lately...moving my life 1600 miles on a weeks' notice
49 hasn't exactly been the easiest thing, definitely hasn't helped for
50 the free time column.
51 --
52 gentoo-dev@g.o mailing list