Gentoo Logo
Gentoo Spaceship

Installation:
Gentoo Handbook
Installation Docs

Documentation:
Home
Listing
About Gentoo
Philosophy
Social Contract

Resources:
Bug Tracker
Developer List
Discussion Forums
Gentoo BitTorrents
Gentoo Linux Enhancement Proposals
IRC Channels
Mailing Lists
Mirrors
Name and Logo Guidelines
Online Package Database
Security Announcements
Staffing Needs
Supporting Vendors
View our CVS

Graphics:
Logos and themes
Icons
ScreenShots

Miscellaneous Resources:
Gentoo Linux Store
Gentoo-hosted projects
IBM dW/Intel article archive




List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Thomas Sachau <tommy@g.o>
Subject: Re: Default src_install for EAPI-2 or following EAPI
Date: Sun, 05 Oct 2008 19:58:10 +0200
Robert Buchholz schrieb:
> On Sunday, 5. October 2008, Ulrich Mueller wrote:
>>>>>>> On Sun, 5 Oct 2008, Robert Buchholz wrote:
>>>>> It's not. If you want to have default DOCS then you should loop
>>>>> through the items and check with [[ -e ]] before trying to
>>>>> install them.
>>>> So, maybe just do a 'dodoc "${DOCS}"' and omit the die? Then it won't
>>>> fail but the warning message would be preserved.
>>> I understood Petteri's comment to be related to the default case
>>> (i.e. the else-branch), and I have to agree there: Ebuilds that do
>>> not override src_install should not emit a warning when some
>>> ChangeLog file is missing that the ebuild never specified to
>>> install.
>> The default would be an empty DOCS variable, or did I miss something?
> 
> Correct.
> 
>> So if the ebuild includes non-existing files in DOCS, then why would
>> you want to suppress the warnings?
> 
> I don't. My point was that the default action on an empty DOCS variable is 
> to "dodoc AUTHORS ChangeLog NEWS README", and this should not emit 
> warnings, because it is merely a heuristic.
> 
> To be clearer:
>          else
> -                # No die here because we don't know if any of these exist
> -                dodoc AUTHORS ChangeLog NEWS README
> +                for x in AUTHORS ChangeLog NEWS README; do
> +                        if [ -e ${x} ]; then
> +                                dodoc ${x} || die "dodoc ${x} failed"
> +                        fi
> +                done
>          fi
> 
> 
> Robert

So what about this funcion for the next EAPI and also implementation in base.eclass?

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} || die "dodoc failed"
	else
		for x in AUTHORS ChangeLog NEWS README; do
			if [ -e ${x} ]; then
				dodoc ${x} || die "dodoc ${x} failed"
			fi
		done
	fi
}

-- 
Thomas Sachau

Gentoo Linux Developer

Attachment:
signature.asc (OpenPGP digital signature)
References:
Re: Default src_install for EAPI-2 or following EAPI
-- Robert Buchholz
Re: Default src_install for EAPI-2 or following EAPI
-- Ulrich Mueller
Re: Default src_install for EAPI-2 or following EAPI
-- Robert Buchholz
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: Default src_install for EAPI-2 or following EAPI
Next by thread:
Re: Re: Default src_install for EAPI-2 or following EAPI
Previous by date:
Re: [RFC] PROPERTIES=set for meta-packages that should behave like package sets
Next by date:
Re: Changing doc use flag on gtk-doc packages to gtk-doc-rebuild or something else


Updated Jun 17, 2009

Donate to support our development efforts.

Gentoo Centric Hosting: vr.org

VR Hosted

Tek Alchemy

Tek Alchemy

SevenL.net

SevenL.net

php|architect

php|architect

Copyright 2001-2007 Gentoo Foundation, Inc. Questions, Comments? Email www@gentoo.org.