Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 428678 - sys-apps/portage-2.1.10.65 omits some variables from cascaded profiles make.defaults
Summary: sys-apps/portage-2.1.10.65 omits some variables from cascaded profiles make.d...
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Configuration (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on: 414961
Blocks:
  Show dependency tree
 
Reported: 2012-07-30 16:51 UTC by Ed Wildgoose
Modified: 2022-10-20 02:43 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Wildgoose 2012-07-30 16:51:44 UTC
A recent upgrade to portage 2.1.10.65 and now my custom profiles no longer seem to be pulling some of the variables from the make.defaults

So given /etc/make.conf:
/etc/make.conf 
USE=""
MAKEOPTS="-j4"
PORTAGE_ELOG_MAILFROM="portage@quad.nippynetworks.com"
VDIRBASE=/vservers/images

# ls -l /etc/make.profile
lrwxrwxrwx 1 root root 59 Oct 19  2009 /etc/make.profile -> /usr/local/portage/profiles/my-hardened/vserver-host

and that profile points to parent up one directory, which then has a make.defaults of:
USE="-git -gpm -nls -openmp -perl -python bash-completion bzip2 ipv6 ithreads logrotate unicode xattr"
PORTDIR=/usr/portage
PORTDIR_OVERLAY=/usr/local/portage
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
MAKEOPTS="-j4"
PORTAGE_NICENESS=3=
FEATURES="buildpkg sandbox distlocks parallel-fetch"
# ccache
CCACHE_SIZE="512M"
CCACHE_DIR="${PORTAGE_TMPDIR}/ccache"
# Portage
PORTAGE_ELOG_CLASSES="warn error log"
PORTAGE_ELOG_SYSTEM="echo save mail"
PORTAGE_ELOG_MAILURI="portage@mydomain.com mail.example.com"
PORTAGE_ELOG_MAILFROM="portage@renameme.example.com"
# Compiler
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CXXFLAGS="${CFLAGS}"
# PHP defaults
PHP_INI_VERSION=production


However, we can see on emerge --info that variables such as PORTDIR_OVERLAY aren't set (and difficult to be sure, but perhaps neither are CCACHE_* or PORTAGE_ELOG_* ?).  Other variables are picked up such as CHOST/CFLAGS, etc...  For different reasons I have also found that variables such as "NGINX_MODULES_HTTP" and "XTABLES_ADDONS" can't be set in the profile either (but this extends back to previous versions of portage also)

Can someone help with how to setup default variables in cascaded profiles and effectively set variables other than in make.conf?


# emerge --info
Portage 2.1.10.65 (!/usr/local/portage/profiles/mailasail-hardened/vserver-host, gcc-4.5.3, glibc-2.14.1-r3, 2.6.36.2-grsec2.2.1-vs2.3.0.36.38.4 x86_64)
=================================================================
System uname: Linux-2.6.36.2-grsec2.2.1-vs2.3.0.36.38.4-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.1
Timestamp of tree: Sat, 28 Jul 2012 05:15:01 +0000
app-shells/bash:          4.2_p20
dev-lang/python:          2.6.8, 2.7.3-r2, 3.1.5, 3.2.3
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.3.4, 4.4.5, 4.5.3-r2
sys-devel/gcc-config:     1.6
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.4 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages/local"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="acl amd64 bash-completion berkdb bzip2 caps cli cracklib crypt cups cxx dri gdbm hardened iconv ipv6 ithreads justify lm_sensors logrotate mmx modules mudflap multilib ncurses nptl pam pax_kernel pcre pppd readline session snmp sse sse2 ssl tcpd truetype unicode urandom vim-syntax xattr xml zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Zac Medico gentoo-dev 2012-07-30 19:38:32 UTC
Due to bug #414961, PORTDIR and PORTDIR_OVERLAY are evaluated prior to the profile, which makes it possible for profiles to reference repositories.

USE_EXPAND variables like NGINX_MODULES_HTTP and XTABLES_ADDONS are special. They behave like incremental variables, but don't support negative seeings. If you want full incremental control, you can modify them via the corresponding USE flags. For example, USE="-xtables_addons_*" can be used to discard inherited XTABLES_ADDONS flags.
Comment 2 Ed Wildgoose 2012-07-31 10:08:36 UTC
Thanks for the feedback.  I'm not sure I understand the final conclusion - how do I set PORTDIR_OVERLAY from a local profile?  If it's possible with some later version of portage it would be interesting to know?  If it's not possible and will not be possible in the future, then workarounds would be appreciated (profile/bashrc?)

With regards to the other variables, that makes a lot of sense, thanks.  For the benefit of google, the variables which are subject to use_expand are listed in /usr/portage/profiles/desc/
  see: http://devmanual.gentoo.org/general-concepts/use-flags/index.html

Can you confirm therefore that in a profile one should apply non incremental flags with something like:
  USE="-xtables_addons_*"
  XTABLES_ADDONS="something" 

Thanks
Comment 3 Zac Medico gentoo-dev 2012-07-31 10:28:23 UTC
(In reply to comment #2)
> Thanks for the feedback.  I'm not sure I understand the final conclusion -
> how do I set PORTDIR_OVERLAY from a local profile?

You can't.

> If it's possible with
> some later version of portage it would be interesting to know?

I wasn't planning to support that, because the behavior from bug 414961 means that the repository configuration needs to be loaded before the profile.

> If it's not
> possible and will not be possible in the future, then workarounds would be
> appreciated (profile/bashrc?)

Maybe you have have make.conf source the file from your profile which contains PORTDIR_OVERLAY. The make.conf source command is similar to a shell like bash.

> With regards to the other variables, that makes a lot of sense, thanks.  For
> the benefit of google, the variables which are subject to use_expand are
> listed in /usr/portage/profiles/desc/
>   see: http://devmanual.gentoo.org/general-concepts/use-flags/index.html
> 
> Can you confirm therefore that in a profile one should apply non incremental
> flags with something like:
>   USE="-xtables_addons_*"
>   XTABLES_ADDONS="something" 

You'll probably have to do it more like this:

USE="-xtables_addons_* xtables_addons_something"
Comment 4 Ed Wildgoose 2012-08-06 18:45:31 UTC
Hmm, this doesn't seem to leave me a satisfactory solution here.  I picked a bad example in my original post, in fact I don't think any of my vserver machines have anything in /etc/make.conf, except the "PORTAGE_ELOG_MAILFROM" line (would like to get rid of that also..), I maintain everything in profiles at present.  To have to add a line to every make.conf on 30 odd virtual machines is kind of annoying

Having /etc/make.conf source some file in /etc/make.profile is also not cool because either you need to add some logic to go searching up the profile to find the inherited file, or duplicate this file in every profile..

I'm not sure I understand how bug 414961 actually affects this anyway.  Are you saying that ":" now will search relative to both "PORTDIR/profiles" *and* "PORTDIR_OVERLAY/profiles"?  If not the latter, then why does this change affect the overlay variable?

At the very least could we default PORTDIR_OVERLAY=/usr/local/portage ?

Thanks
Comment 5 Zac Medico gentoo-dev 2012-08-07 05:00:31 UTC
(In reply to comment #4)
> I'm not sure I understand how bug 414961 actually affects this anyway.  Are
> you saying that ":" now will search relative to both "PORTDIR/profiles"
> *and* "PORTDIR_OVERLAY/profiles"?  If not the latter, then why does this
> change affect the overlay variable?

The extension from bug 414961 allows profiles to reference profiles from other repositories. For example, you can have a profile in an overlay that inherits from the gentoo:targets/desktop profile.

> At the very least could we default PORTDIR_OVERLAY=/usr/local/portage ?

That would result in warning messages if /usr/local/portage doesn't exist.