Gentoo Archives: gentoo-dev

From: Danny van Dyk <kugelfang@g.o>
To: gentoo-dev@l.g.o
Cc: gentoo-portage-dev@l.g.o
Subject: "Environement categories" (was Re: [gentoo-dev] fix binary debug support, part elevenity billion 1/2)
Date: Mon, 23 Jan 2006 18:26:18
Message-Id: 43D52035.5030902@gentoo.org
In Reply to: Re: [gentoo-dev] fix binary debug support, part elevenity billion 1/2 by Donnie Berkholz
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Hi,
5
6 [Please excuse the improper naming for this subject. I'll take any
7 suggestions to improve it :-) ]
8
9 Donnie Berkholz schrieb:
10 | Marius Mauch wrote:
11 |>I meant the option is redundant if it just triggers a feature setting,
12 |>as it's the same as `FEATURES=debug-build emerge foo`
13 |
14 | OK, where's my package.features and packages.cflags files then? I can do
15 | what I want through Mike's proposal, which is to build a specific
16 | collection of packages with debugging. I also don't need to duplicate
17 | the same list of packages in one file with FEATURES=nostrip and in
18 | another with debugging CFLAGS.
19
20 I'd love to have one package.env (or similarly named) file that can set
21 environmental options on a per-package-base. This is just a proposal,
22 but i personally would like it this way:
23
24 # First define a category of environmental options:
25 stable=( \
26 "ACCEPT_KEYWORDS=\"arch\"" \
27 "CFLAGS=\"-pipe -O -march=foo\"" \
28 )
29 debug=( \
30 "FEATURES=\"debug-build keepwork\"" \
31 "CFLAGS=\"-pipe -O0 -ggdb\"" \
32 )
33 # then tell portage to use a env-category for certain packages:
34 app-foo/totallybroken debug
35 =app-bar/anotherbrokenpkg debug
36 # Also, system packages should get their own category that would
37 # be used by default on them.
38 system=( \
39 "ACCEPT_KEYWORDS=\"arch\"" \
40 "FEATURES=\"buildpkg\"" \
41 )
42
43 This proposed format could even be more easily parsed when split into to
44 files. One file to define the categories and one to define the
45 package-to-category bindings. The first file would be pure bash and
46 could be loaded like this:
47
48 mycat=$(
49 . ${CATEGORY_FILE}
50 cat=${!cat}
51 for i in $(seq 0 $(( ${#cat[@]} - 1)) ) ; do
52 echo -e "${cat[${i}]}"
53 done
54 )
55
56 Comments? Please keep in mind that the code snippets here are just
57 proof-of-concept code and not meant literally!
58
59 Danny
60 - --
61 Danny van Dyk <kugelfang@g.o>
62 Gentoo/AMD64 Project, Gentoo Scientific Project
63 -----BEGIN PGP SIGNATURE-----
64 Version: GnuPG v1.4.2 (GNU/Linux)
65
66 iD8DBQFD1SA1aVNL8NrtU6IRAn/eAKCl2VcCAayy6TgsU3voRZvd+JQtOgCgpXNX
67 +9G+//2+O/DxhcSXXyMjE6w=
68 =LtXA
69 -----END PGP SIGNATURE-----
70 --
71 gentoo-dev@g.o mailing list

Replies