public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] How is /etc/portage/env supposed to work?
@ 2015-10-20 14:04 Nikos Chantziaras
  2015-10-20 14:26 ` Michael Orlitzky
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Nikos Chantziaras @ 2015-10-20 14:04 UTC (permalink / raw
  To: gentoo-user

I'm following the documentation here:

https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/Advanced#Using_.2Fetc.2Fportage.2Fenv

to hook into the postinst phase of an ebuild. The docs only provide an 
actual example for the global hook case (/etc/portage/bashrc), but it 
says it works the same way on a per-ebuild basis using /etc/portage/env. 
But it is totally silent on how to actually do that :-/

So I assume, since the docs don't mention anything special, that I 
should put the code in a conf file. So I created this file:

   /etc/portage/env/test.conf

and in it:

   if [ "${EBUILD_PHASE}" == "postinst" ];
   then
       echo ":: TEST"
   fi

Then I added this line to /etc/portage/package.env:

   app-misc/mc test.conf

But when I "emerge app-misc/mc", I get:

!!! Problem in 'app-misc/mc' dependencies.
!!! "/etc/portage/env/test.conf", line 1: Invalid token '[' (not '=') 
portage.exception
... done!
"/etc/portage/env/test.conf", line 1: Invalid token '[' (not '=')

I don't get it... Can't I have a per-package bashrc or something? The 
docs are suggesting that I can, but don't tell me how.



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-10-23  2:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-20 14:04 [gentoo-user] How is /etc/portage/env supposed to work? Nikos Chantziaras
2015-10-20 14:26 ` Michael Orlitzky
2015-10-20 16:35   ` [gentoo-user] " Nikos Chantziaras
2015-10-20 18:24   ` [gentoo-user] " Alan McKinnon
2015-10-22 20:03   ` [gentoo-user] " Nikos Chantziaras
2015-10-23  2:05     ` Michael Orlitzky
2015-10-20 14:58 ` [gentoo-user] " Alexander Kapshuk
2015-10-20 15:37 ` Neil Bothwick
2015-10-20 16:32   ` [gentoo-user] " Nikos Chantziaras
2015-10-20 20:20     ` Neil Bothwick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox