View previous topic :: View next topic |
Author |
Message |
miscdebris n00b

Joined: 30 Mar 2005 Posts: 70
|
Posted: Tue Dec 19, 2006 6:07 pm Post subject: Per package variables [unsolved] |
|
|
Is there a way to set variables per package? I've a couple packages (db and pam) that simply do not like FEATURES=distcc, and I would like to disable it for those packages. Is there a way to do so? |
|
Back to top |
|
 |
Roman_Gruber Advocate

Joined: 03 Oct 2006 Posts: 3846 Location: Austro Bavaria
|
Posted: Tue Dec 19, 2006 6:09 pm Post subject: |
|
|
yes, there is an way
you could set usefalgs dependend on this file for packages only , here is mine, have a look
Code: | notebook roman # cat /etc/portage/package.use
#dev-libs/cyrus-sasl -gdbm berkdb
app-text/acroread nsplugin
#>=x11-base/xorg-sever-1.1.1-r1 minimal
sys-libs/ncurses minimal
x11-apps/xinit minimal
net-dns/openldap minimal
app-editors/nano minimal
dev-libs/libcdio minimal
sys-apps/miscfiles minimal
media-video/vcdimager minimal
#11.Dez.2006
app-cdr/cdrdao -gnome
net-misc/openvpn minimal
app-office/openoffice -gstreamer
notebook roman # |
|
|
Back to top |
|
 |
sonicbhoc Veteran


Joined: 24 Oct 2005 Posts: 1805 Location: In front of the computer screen
|
Posted: Tue Dec 19, 2006 6:11 pm Post subject: |
|
|
He didn't mean use flags, he meant portage variables. And as far as I know, you can't do that yet. _________________ I'm too lazy to keep this stupid signature up to date, so here's something more interesting:
My friend Hetdegon can draw if you ask me.
Now using PClinuxOS on my laptop and Gentoo on my desktop and new laptop. |
|
Back to top |
|
 |
miscdebris n00b

Joined: 30 Mar 2005 Posts: 70
|
Posted: Tue Dec 19, 2006 6:12 pm Post subject: |
|
|
That doesn't work for FEATURES, does it? |
|
Back to top |
|
 |
miscdebris n00b

Joined: 30 Mar 2005 Posts: 70
|
Posted: Tue Dec 19, 2006 6:41 pm Post subject: |
|
|
Well, I suppose I COULD hack somethiong together using those handy variables below and a new file or three in /etc/portage and hide it neatly in /etc/portage/bashrc like I did my Dynamic DISTCC_HOSTS and MAKEOPTS generator. I was just hoping to avoid that. I'll wait before I start that.
declare -x FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict userfetch userpriv usersandbox"
declare -x EBUILD="/usr/portage/sys-libs/pam/pam-0.78-r3.ebuild"
declare -x PORTDIR="/usr/portage"
declare -x PORTDIR_OVERLAY="/home/portage/overlay" _________________ Dynamic DISTCC_HOSTS & MAKEOPTS Generation for Portage
Last edited by miscdebris on Tue Dec 19, 2006 7:29 pm; edited 1 time in total |
|
Back to top |
|
 |
Rumil Tux's lil' helper


Joined: 08 Dec 2003 Posts: 108 Location: Krakow, Poland
|
Posted: Tue Dec 19, 2006 7:04 pm Post subject: |
|
|
I don't know if it will work for $FEATURES, but works good enough for $CFLAGS and $LDFLAGS:
make file eg. /etc/portage/env/media-sound/amarok for amarok and put in it your definition of variable: FEATURES="bleble". You could also try FEATURES="${FEATURES} -distcc" but I don't know how portage reacts for setting both distcc and -distcc (it should use the last one, I believe). |
|
Back to top |
|
 |
swimmer Veteran


Joined: 15 Jul 2002 Posts: 1330 Location: Netherlands
|
Posted: Tue Jan 09, 2007 1:49 pm Post subject: |
|
|
This does not work for me :-/
emerge --info
Portage 2.1.1-r2 (default-linux/amd64/2006.1/desktop, gcc-4.1.1, glibc-2.4-r4, 2.6.19-gentoo-r3 x86_64)
=================================================================
System uname: 2.6.19-gentoo-r3 x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System version 1.12.6
Last Sync: Tue, 09 Jan 2007 05:00:03 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python: 2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache: [Not Present]
dev-util/confcache: [Not Present]
sys-apps/sandbox: 1.2.17
sys-devel/autoconf: 2.13, 2.61
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils: 2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool: 1.5.22
virtual/os-headers: 2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -pipe -O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=k8 -pipe -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig digest distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict" |
|
Back to top |
|
 |
Genone Retired Dev


Joined: 14 Mar 2003 Posts: 9629 Location: beyond the rim
|
Posted: Wed Jan 10, 2007 1:09 am Post subject: |
|
|
Rumil wrote: | I don't know if it will work for $FEATURES, but works good enough for $CFLAGS and $LDFLAGS:
make file eg. /etc/portage/env/media-sound/amarok for amarok and put in it your definition of variable: FEATURES="bleble". You could also try FEATURES="${FEATURES} -distcc" but I don't know how portage reacts for setting both distcc and -distcc (it should use the last one, I believe). |
/etc/portage/env works for variables that are only used by the bash side of portage or the build system (like *FLAGS vars that portage itself doesn't care about). It may work for a few values of FEATURES (though for disabling you can't use the usual negation syntax), but generally it won't, same for most other variables usually found in make.conf as they are used before /etc/portage/env is parsed (which btw isn't done by portage itself). |
|
Back to top |
|
 |
swimmer Veteran


Joined: 15 Jul 2002 Posts: 1330 Location: Netherlands
|
Posted: Wed Jan 10, 2007 2:23 am Post subject: |
|
|
Genone wrote: | /etc/portage/env works for variables that are only used by the bash side of portage or the build system (like *FLAGS vars that portage itself doesn't care about). It may work for a few values of FEATURES (though for disabling you can't use the usual negation syntax), but generally it won't, same for most other variables usually found in make.conf as they are used before /etc/portage/env is parsed (which btw isn't done by portage itself). |
Thanks for the info Genone - so I better return to /etc/portage/bashrc?
I had something previously working for that with the following: Code: | # Workaround for creating different environments for specific packages
# For every package you need a separate file in /etc/portage/env.d !!!
# In this file you can specify the specific environment variables like
# FEATURES="-ccache"
#
# Thanks to Neil Bothwick <neil@digimed.co.uk> - 2006
for MY_ENV in ${PN} ${P} ${PF}; do
if [ -f /etc/portage/env.d/${CATEGORY}/${MY_ENV} ]; then
source /etc/portage/env.d/${CATEGORY}/${MY_ENV}
fi
done |
but this does not work anymore and seems similar to /usr/portage/profiles/base/profile.bashrc :-/
Is there anything else I can do?
Greetz
swimmer |
|
Back to top |
|
 |
Genone Retired Dev


Joined: 14 Mar 2003 Posts: 9629 Location: beyond the rim
|
Posted: Wed Jan 10, 2007 4:39 am Post subject: |
|
|
swimmer wrote: | Genone wrote: | /etc/portage/env works for variables that are only used by the bash side of portage or the build system (like *FLAGS vars that portage itself doesn't care about). It may work for a few values of FEATURES (though for disabling you can't use the usual negation syntax), but generally it won't, same for most other variables usually found in make.conf as they are used before /etc/portage/env is parsed (which btw isn't done by portage itself). |
Thanks for the info Genone - so I better return to /etc/portage/bashrc? |
Same restrictions there. Anything with "bash" in the name can't influence the python side of portage. |
|
Back to top |
|
 |
swimmer Veteran


Joined: 15 Jul 2002 Posts: 1330 Location: Netherlands
|
Posted: Wed Jan 10, 2007 11:00 am Post subject: |
|
|
Genone wrote: | Same restrictions there. Anything with "bash" in the name can't influence the python side of portage. |
Thanks again for the fast response Genone
This brings me back to the question: "Is there anything else I can do?"
Greetz
swimmer |
|
Back to top |
|
 |
Genone Retired Dev


Joined: 14 Mar 2003 Posts: 9629 Location: beyond the rim
|
Posted: Wed Jan 10, 2007 11:10 am Post subject: |
|
|
Not really. |
|
Back to top |
|
 |
swimmer Veteran


Joined: 15 Jul 2002 Posts: 1330 Location: Netherlands
|
Posted: Wed Jan 10, 2007 11:18 am Post subject: |
|
|
Ok
Thanks for the fast response
swimmer |
|
Back to top |
|
 |
miscdebris n00b

Joined: 30 Mar 2005 Posts: 70
|
Posted: Wed Jan 10, 2007 2:51 pm Post subject: |
|
|
Well, I know you can effectively do FEATURES=-distcc simply by setting your $DISTCC_HOSTS to localhost/2 and your MAKEOPTS to -j2 in /etc/portage/bashrc after you read in a file and see if you want to use avoid distcc with it. I have a good start on [/topic]something semi-related here. _________________ Dynamic DISTCC_HOSTS & MAKEOPTS Generation for Portage |
|
Back to top |
|
 |
tekknokrat Apprentice

Joined: 17 Apr 2005 Posts: 278 Location: Magdeburg
|
Posted: Tue Mar 13, 2007 5:27 pm Post subject: |
|
|
how do I get which env belongs to python and which belongs to bash part of portage? _________________ Optimism is solely an absence of information. / Optimismus ist nur ein Mangel an Information.
(Arthur Schopenhauer) |
|
Back to top |
|
 |
Genone Retired Dev


Joined: 14 Mar 2003 Posts: 9629 Location: beyond the rim
|
Posted: Tue Mar 13, 2007 8:01 pm Post subject: |
|
|
tekknokrat wrote: | how do I get which env belongs to python and which belongs to bash part of portage? |
a) read the code
b) experience |
|
Back to top |
|
 |
desastre n00b

Joined: 22 May 2007 Posts: 32 Location: Duesseldorf
|
Posted: Tue Jun 10, 2008 7:49 am Post subject: |
|
|
I noticed that an export of the variable from /etc/portage/env/<cat>/<pkg> helps in some cases, like setting the $F77. |
|
Back to top |
|
 |
|