Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 5580 - pkg_setup() doesn't work when ebuild is used
Summary: pkg_setup() doesn't work when ebuild is used
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Daniel Robbins (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-25 15:42 UTC by Dan Armak (RETIRED)
Modified: 2011-10-30 22:21 UTC (History)
1 user (show)

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


Attachments
kde-5.ebuild (kde-5.ebuild,1.21 KB, text/plain)
2002-07-25 15:43 UTC, Dan Armak (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Armak (RETIRED) gentoo-dev 2002-07-25 15:42:53 UTC
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.
Comment 1 Dan Armak (RETIRED) gentoo-dev 2002-07-25 15:43:36 UTC
Created attachment 2587 [details]
kde-5.ebuild
Comment 2 Daniel Robbins (RETIRED) gentoo-dev 2002-07-25 18:06:23 UTC
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().