* [gentoo-dev] Bugzilla3 and Bugzilla Survey 2008
@ 2008-09-16 0:01 Robin H. Johnson
2008-09-20 11:31 ` [gentoo-dev] Default src_install for EAPI-2 or following EAPI Thomas Sachau
0 siblings, 1 reply; 12+ messages in thread
From: Robin H. Johnson @ 2008-09-16 0:01 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 518 bytes --]
For those asking about Bugzilla3 for Gentoo, it's a work-in-progress for
the test version. Hopefully I'll announce testing access in the next
week or two.
On a side note, upstream Bugzilla was doing a survey on large Bugzilla
installs, and contacted me to get the Gentoo perspective. The results
are up now: https://wiki.mozilla.org/Bugzilla:Survey
--
Robin Hugh Johnson
Gentoo Linux Developer & Infra Guy
E-Mail : robbat2@gentoo.org
GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85
[-- Attachment #2: Type: application/pgp-signature, Size: 329 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* [gentoo-dev] Default src_install for EAPI-2 or following EAPI
2008-09-16 0:01 [gentoo-dev] Bugzilla3 and Bugzilla Survey 2008 Robin H. Johnson
@ 2008-09-20 11:31 ` Thomas Sachau
2008-09-20 12:12 ` [gentoo-dev] " Steve Long
2008-09-20 19:07 ` [gentoo-dev] " Petteri Räty
0 siblings, 2 replies; 12+ messages in thread
From: Thomas Sachau @ 2008-09-20 11:31 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 451 bytes --]
I see, we have a default src_unpack and a default src_compile but a default src_install is still
missing. Here is my suggestion (taken and modified from bug 33544):
src_install() {
if [ -f Makefile -o -f GNUmakefile -o -f makefile ]; then
emake DESTDIR=${D} install || die "emake install failed"
[[ -n ${DOCS} ]] && dodoc ${DOCS}
else
einstall || die "einstall failed"
[[ -n ${DOCS} ]] && dodoc ${DOCS}
fi
}
Any comments?
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 315 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI
2008-09-20 11:31 ` [gentoo-dev] Default src_install for EAPI-2 or following EAPI Thomas Sachau
@ 2008-09-20 12:12 ` Steve Long
2008-09-20 19:07 ` [gentoo-dev] " Petteri Räty
1 sibling, 0 replies; 12+ messages in thread
From: Steve Long @ 2008-09-20 12:12 UTC (permalink / raw
To: gentoo-dev
Thomas Sachau wrote:
> I see, we have a default src_unpack and a default src_compile but a
> default src_install is still missing. Here is my suggestion (taken and
> modified from bug 33544):
>
> src_install() {
> if [ -f Makefile -o -f GNUmakefile -o -f makefile ]; then
> emake DESTDIR=${D} install || die "emake install failed"
You need to quote $D there, eg: DESTDIR="$D" as it's a parameter to a
command there, not a temporary export (as: DESTDIR=$D emake.. would be.)
> [[ -n ${DOCS} ]] && dodoc ${DOCS}
> else
> einstall || die "einstall failed"
> [[ -n ${DOCS} ]] && dodoc ${DOCS}
> fi
> }
>
> Any comments?
It might be wise to use an array for DOCS there, so that filenames with
spaces are dealt with correctly. (I'm thinking of all those lovely GUI
apps.)
To keep compatibility with space-separated values, I use this function:
isArr() [[ $(declare -p "$1" 2>/dev/null) = 'declare -a'* ]]
(Yes I know, it's fugly.)
So this kinda logic deals with both:
if isArr DOCS; then
((${#DOCS[@]})) && dodoc "${DOCS[@]}"
else [[ $DOCS ]] && dodoc $DOCS
fi
(There's no need to repeat it, just move it to after the previous if.)
That can easily be initialised with a glob, eg DOCS=("$S"/doc/*) (although I
recommend nullglob if doing so.)
[See http://wooledge.org:8000/BashFAQ/073 (half way down) if you need to
strip prefixes or the like.]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] Default src_install for EAPI-2 or following EAPI
2008-09-20 11:31 ` [gentoo-dev] Default src_install for EAPI-2 or following EAPI Thomas Sachau
2008-09-20 12:12 ` [gentoo-dev] " Steve Long
@ 2008-09-20 19:07 ` Petteri Räty
2008-09-21 0:47 ` Thomas Sachau
1 sibling, 1 reply; 12+ messages in thread
From: Petteri Räty @ 2008-09-20 19:07 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 582 bytes --]
Thomas Sachau kirjoitti:
> I see, we have a default src_unpack and a default src_compile but a default src_install is still
> missing. Here is my suggestion (taken and modified from bug 33544):
>
> src_install() {
> if [ -f Makefile -o -f GNUmakefile -o -f makefile ]; then
> emake DESTDIR=${D} install || die "emake install failed"
> [[ -n ${DOCS} ]] && dodoc ${DOCS}
> else
> einstall || die "einstall failed"
> [[ -n ${DOCS} ]] && dodoc ${DOCS}
> fi
> }
>
> Any comments?
>
einstall uses make so doesn't really make sense.
Regards,
Petteri
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] Default src_install for EAPI-2 or following EAPI
2008-09-20 19:07 ` [gentoo-dev] " Petteri Räty
@ 2008-09-21 0:47 ` Thomas Sachau
2008-09-21 7:55 ` Fabian Groffen
0 siblings, 1 reply; 12+ messages in thread
From: Thomas Sachau @ 2008-09-21 0:47 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 964 bytes --]
Petteri Räty schrieb:
> Thomas Sachau kirjoitti:
>> I see, we have a default src_unpack and a default src_compile but a
>> default src_install is still
>> missing. Here is my suggestion (taken and modified from bug 33544):
>>
>> src_install() {
>> if [ -f Makefile -o -f GNUmakefile -o -f makefile ]; then
>> emake DESTDIR=${D} install || die "emake install failed"
>> [[ -n ${DOCS} ]] && dodoc ${DOCS}
>> else
>> einstall || die "einstall failed"
>> [[ -n ${DOCS} ]] && dodoc ${DOCS}
>> fi
>> }
>>
>> Any comments?
>>
>
> einstall uses make so doesn't really make sense.
>
> Regards,
> Petteri
>
updated version:
src_install() {
if [ -f Makefile -o -f GNUmakefile -o -f makefile ]; then
emake DESTDIR="${D}" install || einstall
if [[ $?>0 ]]; then
die "install failed"
else
if [[ -n ${DOCS} ]]; then
dodoc ${DOCS} || die "dodoc failed"
fi
fi
fi
}
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 315 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] Default src_install for EAPI-2 or following EAPI
2008-09-21 0:47 ` Thomas Sachau
@ 2008-09-21 7:55 ` Fabian Groffen
0 siblings, 0 replies; 12+ messages in thread
From: Fabian Groffen @ 2008-09-21 7:55 UTC (permalink / raw
To: gentoo-dev
On 21-09-2008 02:47:41 +0200, Thomas Sachau wrote:
> updated version:
> if [ -f Makefile -o -f GNUmakefile -o -f makefile ]; then
> emake DESTDIR="${D}" install || einstall
> if [[ $?>0 ]]; then
Please either use POSIX or bash, mixing them looks so ugly and pointless
to me.
Apart from that I don't think calling einstall when emake install fails
makes sense. Ideally einstall should never be used IMO.
--
Fabian Groffen
Gentoo on a different level
^ permalink raw reply [flat|nested] 12+ messages in thread
[parent not found: <bcwiO-7zO-1@gated-at.bofh.it>]
* [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI
@ 2008-09-21 20:46 ` Ulrich Mueller
2008-09-23 19:39 ` Thomas Sachau
0 siblings, 1 reply; 12+ messages in thread
From: Ulrich Mueller @ 2008-09-21 20:46 UTC (permalink / raw
To: gentoo-dev
>>>>> On Sun, 21 Sep 2008, Steve Long wrote:
> That works for that specific case, yes, but it's still not a general
> solution, which is what BASH arrays were invented for. For instance,
> an ebuild author cannot specifically include a file with spaces, and
> ignore all the other files in the same directory.
The better solution would be to rename a such strange files ...
How about an "edetox"? ;-)
And I still don't see why we would need the most general solution for
a *default* function. There's always the possibility to write your own
src_install() for the few ebuilds that need it.
Ulrich
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI
2008-09-21 20:46 ` [gentoo-dev] " Ulrich Mueller
@ 2008-09-23 19:39 ` Thomas Sachau
2008-09-23 23:21 ` Bo Ørsted Andresen
0 siblings, 1 reply; 12+ messages in thread
From: Thomas Sachau @ 2008-09-23 19:39 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1439 bytes --]
Ulrich Mueller schrieb:
>>>>>> On Sun, 21 Sep 2008, Steve Long wrote:
>
>> That works for that specific case, yes, but it's still not a general
>> solution, which is what BASH arrays were invented for. For instance,
>> an ebuild author cannot specifically include a file with spaces, and
>> ignore all the other files in the same directory.
>
> The better solution would be to rename a such strange files ...
> How about an "edetox"? ;-)
>
> And I still don't see why we would need the most general solution for
> a *default* function. There's always the possibility to write your own
> src_install() for the few ebuilds that need it.
>
> Ulrich
>
>
I aggree with Ulrich in this case. This is just a suggestion for a default src_install funcion,
nothing that should cover every possible case. So if you have some special DOC that does not work
with the default install, you can still do it the normal way. So my suggestion for a default
src_install:
default_src_install() {
if [ -f Makefile -o -f GNUmakefile -o -f makefile ]; then
if emake DESTDIR="${D} install || einstall ; then
die "install failed"
else
if [[ -n ${DOCS} ]]; then
dodoc ${DOCS} || die "dodoc failed"
fi
fi
fi
}
Any more comments? Good? Bad? Interested?
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 315 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI
2008-09-23 19:39 ` Thomas Sachau
@ 2008-09-23 23:21 ` Bo Ørsted Andresen
2008-09-24 7:46 ` Nirbheek Chauhan
0 siblings, 1 reply; 12+ messages in thread
From: Bo Ørsted Andresen @ 2008-09-23 23:21 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 677 bytes --]
On Tuesday 23 September 2008 21:39:52 Thomas Sachau wrote:
> default_src_install() {
> if [ -f Makefile -o -f GNUmakefile -o -f makefile ]; then
> if emake DESTDIR="${D} install || einstall ; then
> die "install failed"
> else
> if [[ -n ${DOCS} ]]; then
> dodoc ${DOCS} || die "dodoc failed"
> fi
> fi
> fi
> }
>
> Any more comments? Good? Bad? Interested?
Now figure out the four flaws in the above code.
--
Bo Andresen
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI
2008-09-23 23:21 ` Bo Ørsted Andresen
@ 2008-09-24 7:46 ` Nirbheek Chauhan
2008-09-27 10:17 ` Thomas Sachau
0 siblings, 1 reply; 12+ messages in thread
From: Nirbheek Chauhan @ 2008-09-24 7:46 UTC (permalink / raw
To: gentoo-dev
On Wed, Sep 24, 2008 at 4:51 AM, Bo Ørsted Andresen <bo.andresen@zlin.dk> wrote:
> On Tuesday 23 September 2008 21:39:52 Thomas Sachau wrote:
>> default_src_install() {
>> if [ -f Makefile -o -f GNUmakefile -o -f makefile ]; then
>> if emake DESTDIR="${D} install || einstall ; then
>> die "install failed"
>> else
>> if [[ -n ${DOCS} ]]; then
>> dodoc ${DOCS} || die "dodoc failed"
>> fi
>> fi
>> fi
>> }
>>
>> Any more comments? Good? Bad? Interested?
>
> Now figure out the four flaws in the above code.
Even though IMO that comment is quite condescending, I'll list out the
flaws in that code:
>> if [ -f Makefile -o -f GNUmakefile -o -f makefile ]; then
[...]
>> fi
- So if those makefiles don't exist, the package should just carry on
without installing anything?
>> if emake DESTDIR="${D} install || einstall ; then
>> die "install failed"
- It is quite useless to run *both* emake install and einstall.
Default are not supposed to be lazy-maintainer-proof. The maintainer
should make sure that the ebuild works with emake install, and *if* it
doesn't, use einstall
- The above code will cause a die when either one of emake install or
einstall are *successful*. The opposite behaviour is desired.
>> else
>> if [[ -n ${DOCS} ]]; then
>> dodoc ${DOCS} || die "dodoc failed"
>> fi
- So, if emake install || einstall fails, one should just install the
docs? The opposite behaviour is desired.
If a default src_install is desired, it should cater to the most
common use-cases and leave it to the maintainer to override it if
desired.
default_src_install() {
emake DESTDIR="${D}" install || die "emake install failed"
if [ -n "${DOCS}" ]; then
dodoc ${DOCS} || die "dodoc failed"
else
# No die here because we don't know if any of these exist
dodoc AUTHORS ChangeLog NEWS README
fi
}
--
~Nirbheek Chauhan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI
2008-09-24 7:46 ` Nirbheek Chauhan
@ 2008-09-27 10:17 ` Thomas Sachau
2008-09-29 5:16 ` Nirbheek Chauhan
0 siblings, 1 reply; 12+ messages in thread
From: Thomas Sachau @ 2008-09-27 10:17 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 2037 bytes --]
Nirbheek Chauhan schrieb:
> On Wed, Sep 24, 2008 at 4:51 AM, Bo Ørsted Andresen <bo.andresen@zlin.dk> wrote:
>> On Tuesday 23 September 2008 21:39:52 Thomas Sachau wrote:
>
>>> if [ -f Makefile -o -f GNUmakefile -o -f makefile ]; then
> [...]
>>> fi
>
> - So if those makefiles don't exist, the package should just carry on
> without installing anything?
This is imho a good idea, else virtuals and meta packages would need an extra (empty) src_install().
>
>>> if emake DESTDIR="${D} install || einstall ; then
>>> die "install failed"
>
> - The above code will cause a die when either one of emake install or
> einstall are *successful*. The opposite behaviour is desired.
Eh, sure, my mistake.
>
>>> else
>>> if [[ -n ${DOCS} ]]; then
>>> dodoc ${DOCS} || die "dodoc failed"
>>> fi
>
> - So, if emake install || einstall fails, one should just install the
> docs? The opposite behaviour is desired.
see above
>
> If a default src_install is desired, it should cater to the most
> common use-cases and leave it to the maintainer to override it if
> desired.
>
> default_src_install() {
> emake DESTDIR="${D}" install || die "emake install failed"
> if [ -n "${DOCS}" ]; then
> dodoc ${DOCS} || die "dodoc failed"
> else
> # No die here because we don't know if any of these exist
> dodoc AUTHORS ChangeLog NEWS README
> fi
> }
>
So what about this one?
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
# No die here because we don't know if any of these exist
dodoc AUTHORS ChangeLog NEWS README
fi
}
--
Thomas Sachau
Gentoo Linux Developer
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 315 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI
2008-09-27 10:17 ` Thomas Sachau
@ 2008-09-29 5:16 ` Nirbheek Chauhan
2008-09-30 17:05 ` Petteri Räty
0 siblings, 1 reply; 12+ messages in thread
From: Nirbheek Chauhan @ 2008-09-29 5:16 UTC (permalink / raw
To: gentoo-dev
On Sat, Sep 27, 2008 at 3:47 PM, Thomas Sachau <tommy@gentoo.org> wrote:
> So what about this one?
>
> 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
> # No die here because we don't know if any of these exist
> dodoc AUTHORS ChangeLog NEWS README
> fi
> }
This seems alright fine to me
Cheers,
~Nirbheek Chauhan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI
2008-09-29 5:16 ` Nirbheek Chauhan
@ 2008-09-30 17:05 ` Petteri Räty
2008-10-05 8:52 ` [gentoo-dev] " Ulrich Mueller
0 siblings, 1 reply; 12+ messages in thread
From: Petteri Räty @ 2008-09-30 17:05 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 840 bytes --]
Nirbheek Chauhan kirjoitti:
> On Sat, Sep 27, 2008 at 3:47 PM, Thomas Sachau <tommy@gentoo.org> wrote:
>> So what about this one?
>>
>> 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
>> # No die here because we don't know if any of these exist
>> dodoc AUTHORS ChangeLog NEWS README
>> fi
>> }
>
> This seems alright fine to me
>
> Cheers,
>
> ~Nirbheek Chauhan
>
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.
Regards,
Petteri
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] Default src_install for EAPI-2 or following EAPI
2008-09-30 17:05 ` Petteri Räty
@ 2008-10-05 8:52 ` Ulrich Mueller
2008-10-05 14:15 ` Robert Buchholz
0 siblings, 1 reply; 12+ messages in thread
From: Ulrich Mueller @ 2008-10-05 8:52 UTC (permalink / raw
To: gentoo-dev
>>>>> On Tue, 30 Sep 2008, Petteri Räty wrote:
>>> dodoc ${DOCS} || die "dodoc failed"
>> This seems alright fine to me
> 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.
I'm not convinced that this is a good idea. Then you won't catch cases
where upstream removes or renames files.
Besides, dodoc already checks for -e by itself (and emits a warning if
the file does not exist).
So, maybe just do a 'dodoc "${DOCS}"' and omit the die? Then it won't
fail but the warning message would be preserved.
Ulrich
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] Default src_install for EAPI-2 or following EAPI
2008-10-05 8:52 ` [gentoo-dev] " Ulrich Mueller
@ 2008-10-05 14:15 ` Robert Buchholz
2008-10-05 15:45 ` Ulrich Mueller
0 siblings, 1 reply; 12+ messages in thread
From: Robert Buchholz @ 2008-10-05 14:15 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 987 bytes --]
On Sunday, 5. October 2008, Ulrich Mueller wrote:
> >>>>> On Tue, 30 Sep 2008, Petteri Räty wrote:
> >>>
> >>> dodoc ${DOCS} || die "dodoc failed"
> >>
> >> This seems alright fine to me
> >
> > 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.
>
> I'm not convinced that this is a good idea. Then you won't catch cases
> where upstream removes or renames files.
>
> Besides, dodoc already checks for -e by itself (and emits a warning if
> the file does not exist).
>
> 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.
Robert
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] Default src_install for EAPI-2 or following EAPI
2008-10-05 14:15 ` Robert Buchholz
@ 2008-10-05 15:45 ` Ulrich Mueller
2008-10-05 16:47 ` Robert Buchholz
0 siblings, 1 reply; 12+ messages in thread
From: Ulrich Mueller @ 2008-10-05 15:45 UTC (permalink / raw
To: gentoo-dev
>>>>> 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?
So if the ebuild includes non-existing files in DOCS, then why would
you want to suppress the warnings?
Ulrich
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] Default src_install for EAPI-2 or following EAPI
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
0 siblings, 2 replies; 12+ messages in thread
From: Robert Buchholz @ 2008-10-05 16:47 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1515 bytes --]
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
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] Default src_install for EAPI-2 or following EAPI
2008-10-05 16:47 ` Robert Buchholz
@ 2008-10-05 17:03 ` Ulrich Mueller
2008-10-05 17:58 ` Thomas Sachau
1 sibling, 0 replies; 12+ messages in thread
From: Ulrich Mueller @ 2008-10-05 17:03 UTC (permalink / raw
To: gentoo-dev
>>>>> On Sun, 5 Oct 2008, Robert Buchholz wrote:
>> 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
I agree. You (and Petteri) are absolutely right.
Ulrich
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] Default src_install for EAPI-2 or following EAPI
2008-10-05 16:47 ` Robert Buchholz
2008-10-05 17:03 ` Ulrich Mueller
@ 2008-10-05 17:58 ` Thomas Sachau
1 sibling, 0 replies; 12+ messages in thread
From: Thomas Sachau @ 2008-10-05 17:58 UTC (permalink / raw
To: gentoo-dev
[-- 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 --]
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2008-10-05 17:58 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 12:12 ` [gentoo-dev] " Steve Long
2008-09-20 19:07 ` [gentoo-dev] " Petteri Räty
2008-09-21 0:47 ` Thomas Sachau
2008-09-21 7:55 ` Fabian Groffen
[not found] <bcwiO-7zO-1@gated-at.bofh.it>
2008-09-21 20:46 ` [gentoo-dev] " Ulrich Mueller
2008-09-23 19:39 ` Thomas Sachau
2008-09-23 23:21 ` Bo Ørsted Andresen
2008-09-24 7:46 ` Nirbheek Chauhan
2008-09-27 10:17 ` Thomas Sachau
2008-09-29 5:16 ` 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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox