public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Thomas Sachau <tommy@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Default src_install for EAPI-2 or following EAPI
Date: Sun, 05 Oct 2008 19:58:10 +0200	[thread overview]
Message-ID: <48E90032.3080308@gentoo.org> (raw)
In-Reply-To: <200810051847.09259.rbu@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 2074 bytes --]

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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 315 bytes --]

  parent reply	other threads:[~2008-10-05 17:58 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bcwiO-7zO-1@gated-at.bofh.it>
     [not found] ` <be8YL-33V-3@gated-at.bofh.it>
     [not found]   ` <be9Lf-478-5@gated-at.bofh.it>
2008-09-21  6:18     ` [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI Vaeth
2008-09-21 11:44       ` Thomas Anderson
2008-09-21 12:03       ` [gentoo-dev] " Steve Long
2008-09-21 13:04         ` [gentoo-dev] " Ulrich Mueller
2008-09-21 17:30           ` Kent Fredric
2008-09-21 18:50             ` Ulrich Mueller
2008-09-21 20:23               ` Steve Long
2008-09-21 20:46                 ` Ulrich Mueller
2008-09-21 21:10                   ` Steve Long
2008-09-23 19:39                   ` Thomas Sachau
2008-09-23 23:21                     ` Bo Ørsted Andresen
2008-09-24  5:28                       ` Alec Warner
2008-09-24  9:01                         ` Bo Ørsted Andresen
2008-09-24  7:46                       ` Nirbheek Chauhan
2008-09-27 10:17                         ` Thomas Sachau
2008-09-28 18:24                           ` [gentoo-dev] Usage of econf with an additional || die Thomas Sachau
2008-09-28 18:28                             ` Vlastimil Babka
2008-09-30  6:55                             ` Peter Volkov
2008-09-30 10:36                               ` Ben de Groot
2008-09-30 12:03                                 ` Jeremy Olexa
2008-09-30 16:47                                   ` Thomas Sachau
2008-09-30 17:10                                     ` Matthias Schwarzott
2008-09-30 10:39                               ` Zac Medico
2008-09-29  5:16                           ` [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI Nirbheek Chauhan
2008-09-30 17:05                             ` Petteri Räty
2008-10-05  8:52                               ` [gentoo-dev] " Ulrich Mueller
2008-10-05 14:15                                 ` Robert Buchholz
2008-10-05 15:45                                   ` Ulrich Mueller
2008-10-05 16:47                                     ` Robert Buchholz
2008-10-05 17:03                                       ` Ulrich Mueller
2008-10-05 17:58                                       ` Thomas Sachau [this message]
2008-09-24  0:35                     ` [gentoo-dev] " Robert Buchholz
2008-09-24  8:26                       ` Santiago M. Mola
2008-09-24  1:34                     ` [gentoo-dev] " Steve Long
2008-09-24  6:38                       ` [gentoo-dev] " Ulrich Mueller
2008-09-24 16:21                         ` [gentoo-dev] OT: " Steve Long
2008-09-24 16:33                           ` [gentoo-dev] " Steve Long
2008-09-24  6:40                       ` [gentoo-dev] " Duncan
2008-09-22  1:35       ` Alec Warner
2008-09-22  8:22         ` Duncan
2008-09-16  0:01 [gentoo-dev] Bugzilla3 and Bugzilla Survey 2008 Robin H. Johnson
2008-09-20 11:31 ` [gentoo-dev] Default src_install for EAPI-2 or following EAPI Thomas Sachau
2008-09-20 19:07   ` Petteri Räty
2008-09-21  0:47     ` Thomas Sachau
2008-09-21  7:55       ` Fabian Groffen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48E90032.3080308@gentoo.org \
    --to=tommy@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox