As discussed on IRC. It just never is called, easy enough to reproduce. portage 2.0.17. emerge and ebuild foo merge work. ebuild foo unpack compile install qmerge or any subset thereof doesn't. I made a kde-base/kde-6 ebuild (see attachement) that has echo statements in every function. Also, the variables foo and foo2 are set in pkg_setup and checked in all the other functions. Demonstration: When using emerge everything works: ------------------------------ laptop kde # emerge kde-5.ebuild Calculating dependencies ...done! >>> emerge kde-base/kde-5 to / in pkg_setup >>> Unpacking source... in src_unpack foo1=bar1 foo2=bar2 >>> Source unpacked. in src_compile foo1=bar1 foo2=bar2 >>> Install kde-5 into /var/tmp/portage/kde-5/image/ category kde-base in src_install foo1=bar1 foo2=bar2 strip: >>> Completed installing into /var/tmp/portage/kde-5/image/ >>> Merging kde-base/kde-5 to / in pkg_postinst foo1= foo2= >>> Regenerating /etc/ld.so.cache... >>> kde-base/kde-5 merged. ------------------------- When using ebuild, it doesn't: ------------------------- laptop kde # ebuild kde-5.ebuild clean unpack compile install qmerge >>> Unpacking source... in src_unpack foo1= foo2= >>> Source unpacked. in src_compile foo1= foo2= >>> Install kde-5 into /var/tmp/portage/kde-5/image/ category kde-base in src_install foo1= foo2= strip: >>> Completed installing into /var/tmp/portage/kde-5/image/ >>> Merging kde-base/kde-5 to / in pkg_postinst foo1= foo2= >>> Regenerating /etc/ld.so.cache... >>> kde-base/kde-5 merged.
Created attachment 2587 [details] kde-5.ebuild
OK, will be fixed in 2.0.18. pkg_setup() now gets called for clean, unpack, compile, install, merge and qmerge, but it doesn't get called before pkg_preinst(),postinst,prerm,postrm. This is intentional because pkg_setup() is for build-related stuff, and pkg_pre/post*() stuff can be used by tbz2s and they're not allowed to call pkg_setup().