-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

[Please excuse the improper naming for this subject. I'll take any
suggestions to improve it :-) ]

Donnie Berkholz schrieb:
| Marius Mauch wrote:
|>I meant the option is redundant if it just triggers a feature setting,
|>as it's the same as `FEATURES=debug-build emerge foo`
|
| OK, where's my package.features and packages.cflags files then? I can do
| what I want through Mike's proposal, which is to build a specific
| collection of packages with debugging. I also don't need to duplicate
| the same list of packages in one file with FEATURES=nostrip and in
| another with debugging CFLAGS.

I'd love to have one package.env (or similarly named) file that can set
environmental options on a per-package-base. This is just a proposal,
but i personally would like it this way:

# First define a category of environmental options:
stable=( \
        "ACCEPT_KEYWORDS=\"arch\"" \
        "CFLAGS=\"-pipe -O -march=foo\"" \
)
debug=( \
        "FEATURES=\"debug-build keepwork\"" \
        "CFLAGS=\"-pipe -O0 -ggdb\"" \
)
# then tell portage to use a env-category for certain packages:
app-foo/totallybroken           debug
=app-bar/anotherbrokenpkg       debug
# Also, system packages should get their own category that would
# be used by default on them.
system=( \
        "ACCEPT_KEYWORDS=\"arch\"" \
        "FEATURES=\"buildpkg\"" \
)

This proposed format could even be more easily parsed when split into to
files. One file to define the categories and one to define the
package-to-category bindings. The first file would be pure bash and
could be loaded like this:

mycat=$(
        . ${CATEGORY_FILE}
        cat=${!cat}
        for i in $(seq 0 $(( [EMAIL PROTECTED] - 1)) ) ; do
                echo -e "${cat[${i}]}"
        done
)

Comments? Please keep in mind that the code snippets here are just
proof-of-concept code and not meant literally!

Danny
- --
Danny van Dyk <[EMAIL PROTECTED]>
Gentoo/AMD64 Project, Gentoo Scientific Project
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFD1SA1aVNL8NrtU6IRAn/eAKCl2VcCAayy6TgsU3voRZvd+JQtOgCgpXNX
+9G+//2+O/DxhcSXXyMjE6w=
=LtXA
-----END PGP SIGNATURE-----
--
gentoo-dev@gentoo.org mailing list

Reply via email to