Re: [gentoo-portage-dev] profile.bashrc variables
On 11/19/19 11:38 PM, Joakim Tjernlund wrote: > On Tue, 2019-11-19 at 22:40 -0800, Zac Medico wrote: >> On 11/19/19 2:17 PM, Joakim Tjernlund wrote: >>> cat profile.bashrc >>> if [ "${HOSTNAME}" == "gentoo64.infinera.com" ]; then >>># This does not work, why? >>>[ -z "$_once" ] && EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} -k n" && >>> _once=1 >>>[ -z "$_fonce" ] && FEATURES="${FEATURES} buildpkg" && _fonce=1 >>>export EMERGE_DEFAULT_OPTS >>>export FEATURES >>> fi >>> >>> If I add logging inside I see that these are set but emerge >>> does not build binpkgs, what am I missing ? >>> >>> sys-apps/portage-2.3.79 >>> >>> Jocke >>> >> >> You can use /etc/portage/package.env to modify FEATURES. The bashrc is >> evaluated only when executing ebuilds, so it's not appropriate for >> FEATURES modifications. > > I did try adding --buildpkg to EMERGE_DEFAULT_OPTS too, same result > I do need to do this in the profile and last I tried package.env it didn't > work > in profiles, has that changed? Oh, no that hasn't changed. The barrier for profile extensions is a bit higher because it's governed by PMS, but we can also use profile-formats to bypass PMS. We've got a similar bug open here: https://bugs.gentoo.org/651208 > In general I think /etc/portage is just another profile so things like > package.env should also work in a regular profile. > While at package.env, the other day I wanted do in package.env: > if not "cat/pkg" do my_extra.conf but I could not find > a NOT syntax for package.env, is there one? No, there's not. I guess we could express that as !cat/pkg. -- Thanks, Zac signature.asc Description: OpenPGP digital signature
Re: [gentoo-portage-dev] profile.bashrc variables
On Tue, 2019-11-19 at 22:40 -0800, Zac Medico wrote: > On 11/19/19 2:17 PM, Joakim Tjernlund wrote: > > cat profile.bashrc > > if [ "${HOSTNAME}" == "gentoo64.infinera.com" ]; then > ># This does not work, why? > >[ -z "$_once" ] && EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} -k n" && > > _once=1 > >[ -z "$_fonce" ] && FEATURES="${FEATURES} buildpkg" && _fonce=1 > >export EMERGE_DEFAULT_OPTS > >export FEATURES > > fi > > > > If I add logging inside I see that these are set but emerge > > does not build binpkgs, what am I missing ? > > > > sys-apps/portage-2.3.79 > > > > Jocke > > > > You can use /etc/portage/package.env to modify FEATURES. The bashrc is > evaluated only when executing ebuilds, so it's not appropriate for > FEATURES modifications. I did try adding --buildpkg to EMERGE_DEFAULT_OPTS too, same result I do need to do this in the profile and last I tried package.env it didn't work in profiles, has that changed? In general I think /etc/portage is just another profile so things like package.env should also work in a regular profile. While at package.env, the other day I wanted do in package.env: if not "cat/pkg" do my_extra.conf but I could not find a NOT syntax for package.env, is there one? Jocke
Re: [gentoo-portage-dev] profile.bashrc variables
On 11/19/19 2:17 PM, Joakim Tjernlund wrote: > cat profile.bashrc > if [ "${HOSTNAME}" == "gentoo64.infinera.com" ]; then ># This does not work, why? >[ -z "$_once" ] && EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} -k n" && > _once=1 >[ -z "$_fonce" ] && FEATURES="${FEATURES} buildpkg" && _fonce=1 >export EMERGE_DEFAULT_OPTS >export FEATURES > fi > > If I add logging inside I see that these are set but emerge > does not build binpkgs, what am I missing ? > > sys-apps/portage-2.3.79 > > Jocke > You can use /etc/portage/package.env to modify FEATURES. The bashrc is evaluated only when executing ebuilds, so it's not appropriate for FEATURES modifications. -- Thanks, Zac signature.asc Description: OpenPGP digital signature
[gentoo-portage-dev] profile.bashrc variables
cat profile.bashrc if [ "${HOSTNAME}" == "gentoo64.infinera.com" ]; then # This does not work, why? [ -z "$_once" ] && EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} -k n" && _once=1 [ -z "$_fonce" ] && FEATURES="${FEATURES} buildpkg" && _fonce=1 export EMERGE_DEFAULT_OPTS export FEATURES fi If I add logging inside I see that these are set but emerge does not build binpkgs, what am I missing ? sys-apps/portage-2.3.79 Jocke