Summary: | src_install should have a default like src_compile | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Seemant Kulleen (RETIRED) <seemant> |
Component: | Core | Assignee: | PMS/EAPI <pms> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | avuton, billie, coldwind, dberkholz, esigra, masterdriverz, mr_bones_, rbu |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | in-eapi-4 | ||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 174380 |
Description
Seemant Kulleen (RETIRED)
![]() actually can we have it do a `make install DESTDIR=${D}` ? If it's automatic, it'll be emake. see EXTRA_ECONF and EXTRA_EMAKE please don't make it use emake install. some broken packages fail if you try to do make install with -j2. there's just no good reason I can think of to use emake for install. I'd be willing to hear why it's a good idea though - maybe I don't have a fancy enough imagination. you could always have it automatically be emake -j1 install if you still want to take advantage of EXTRA_EMAKE yep, here's my 2 cents for: emake -j1 install DESTDIR=${D} spanky's suggestion in comment 5 is probably fine, but you *could* do this instead: if [ -f Makefile -o -f GNUmakefile -o -f makefile ]; then if find . -name \[Mm]akefile -o -name GNUmakefile -print0 | \ xargs --null grep -Fq '$.DESTDIR' then emake -j1 install DESTDIR=${D} || die "emake -j1 install failed" else einstall || die "einstall failed" fi fi I'd prefer to see emake -j1 DESTDIR=${D} install like it shows in the man page instead of emake -j1 install DESTDIR=${D} So is QA voting no on this one? Current opinions? Needs to support MYDOC or something to be useful but I for one am not voting "no" on this. I think a generic src_install could be useful. So this as default? src_install() { emake -j1 DESTDIR="${D}" install dodoc ${MYDOC} } needs to error check like it does in comment #6 [[ -n ${MYDOC} ]] && dodoc ${MYDOC} Requires EAPI change, leaving it for a bit so that EAPI portage's make it into the wild. ...and should people wonder why, the EAPI change is required so that ebuilds that rely on the default src_install aren't horked when running under an older portage that lacks the default src_install. Yes, dep on portage does the same, but it's also going to result in a crapload of duplicate deps on portage... Here's the default src_install being used currently on exheres-0: http://paludis.pioto.org/trac/browser/trunk/paludis/repositories/e/ebuild/exheres-0/src_install.bash It may be useful as inspiration. (In reply to comment #15) > Here's the default src_install being used currently on exheres-0: > > http://paludis.pioto.org/trac/browser/trunk/paludis/repositories/e/ebuild/exheres-0/src_install.bash > > It may be useful as inspiration. > That one contains a big hardcoded list of dodoc arguments. If we put the default implementation in eapi-2.eclass, we have ebuilds with EAPI=2 automatically inherit it. Ebuilds that override the default src_install will be able to call eapi-2_src_install if they just want to add something to the default implementation. This was the result of the collaboration on -dev in last September, and I would like to propose it for future EAPI. default_src_install() { if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then emake DESTDIR="${D}" install || die "emake install failed" fi if [ -n "${DOCS}" ]; then dodoc ${DOCS} else for x in AUTHORS ChangeLog NEWS README; do if [ -e ${x} ]; then dodoc ${x} fi done fi } (In reply to comment #17) > if [ -e ${x} ]; then > dodoc ${x} > fi Maybe it is a good idea to check if the files are are existant and non empty. There are many applications out there for which this is true. Afaik the gnu autotools require that files but many developers leave them empty and use others instead. if [ -s ${x} ]; then dodoc ${x} fi (In reply to comment #18) > Maybe it is a good idea to check if the files are are existant and non empty. I believe current portage dodoc itself already does that check itself, but might not QA-warn about it, but just won't install the file listed to dodoc. EAPI 4 has been approved by the council. |