Re: [gentoo-dev] EAPI 3's default src_install needs bikeshedding
Robert Buchholz schrieb: On Monday 30 March 2009, Thomas Sachau wrote: Ciaran McCreesh schrieb: So far, we've got this, by agreement of the Council: * There will be a default src_install in EAPI 3 * It will have a DOCS variable, or something along those lines. I'd like to suggest the following too: * If DOCS is explicitly specified, it is an error if anything in it doesn't exist. * If DOCS isn't explicitly specified, it isn't an error if anything in its default, if it has one, doesn't exist. We don't have an implementation yet. So I'll start off with this: default_src_install() { emake -j1 DESTDIR=${D} install Why do you want to force -j1 here? And i had this proposal some months ago, which noone argued against any more (the default list may of course be extended): ... What Ciaran added was a way to disable installation of default DOCS. The implmenetation we discussed on the thread a while ago does not check whether DOCS is declared but empty. I believe the way the DOCS variable is handled in the first example of the thread starter is good for a default_src_install although I don't know if we really need arrays. But why not? :-) ok, so actually it is the following: first this part: default_src_install() { if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then emake DESTDIR=${D} install || die emake install failed fi then there are 2 ideas from Ciaran: 1.: local d if ! declare -p DOCS /dev/null 21 ; then for d in README* ChangeLog AUTHORS NEWS TODO CHANGES \ THANKS BUGS FAQ CREDITS CHANGELOG ; do [[ -s ${d} ]] dodoc ${d} done elif declare -p DOCS | grep -q '^declare -a ' ; then for d in ${do...@]} ; do dodoc ${d} done else dodoc ${DOCS} fi } and 2.: emagicdocs emagicdocs() { done_docs= old_set=$(shopt | grep 'nocaseglob[[:space:]]*on') shopt -s nocaseglob for d in '' ${default_src_install_extra_subdi...@]} ; do if [[ -n ${d} ]]; then [[ -d ${d} ]] || die ${d} is not a dir pushd ${d} /dev/null || die Failed to enter ${d} local docdesttree=${DOCDESTTREE} docinto ${d} fi for f in README Change{,s,Log} AUTHORS NEWS TODO ABOUT THANKS {KNOWN_,}BUGS SUBMITTING \ HACKING FAQ CREDITS PKG-INFO HISTORY PACKAGING MAINTAINER{,S} CONTRIBUT{E,OR,ORS} RELEASE \ ANNOUNCE PORTING NOTES PROBLEMS NOTICE ${default_src_install_extra_do...@]}; do for p in ${default_src_install_extra_prefix...@]} '' ; do for doc in ${p}*([[:digit:]])${f}{,+([._-])*} ; do if [[ -s ${doc} ]] ; then for e in ${default_src_install_exclu...@]} ; do [[ ${doc} == ${e} ]] continue 2 done done_docs=${done_docs} ${d%/}${d:+/}${doc} dodoc ${doc} fi done done done if [[ -n ${d} ]]; then docinto ${docdesttree} popd /dev/null || die Failed to leave ${d} fi done if [[ -n ${done_docs} ]] ; then echo Installed docs ${done_docs# } else echo Didn't find any docs to install fi [[ -n ${old_set} ]] || shopt -u nocaseglob } Any more comments about this? So what about this funcion for the next EAPI and also implementation in base.eclass? Why would you want to implement it in base.eclass when it's in EAPI=3? I can't think of a case where inherit base would make things easier than bumping to EAPI=3. In both cases, you might need to change logic within your ebuild and test it. That ideas was months ago, where EAPI-2 was just introduced and i had no idea when a default src_install with EAPI-3 could come in, so i suggested base.eclass as alternative, so it could be used earlier. -- Thomas Sachau Gentoo Linux Developer signature.asc Description: OpenPGP digital signature
Re: [gentoo-dev] EAPI 3's default src_install needs bikeshedding
2009/3/30 Mounir Lamouri mounir.lamo...@gmail.com: portage don't install empty files (they are ignored) so it would be painless. Yeah I forgot about this, I thought it just does not install empty directories. So there will be no difference in using -e or -s if the other package managers have the same behaviour in that regard. -- Regards, Daniel
[gentoo-dev] EAPI 3's default src_install needs bikeshedding
So far, we've got this, by agreement of the Council: * There will be a default src_install in EAPI 3 * It will have a DOCS variable, or something along those lines. I'd like to suggest the following too: * If DOCS is explicitly specified, it is an error if anything in it doesn't exist. * If DOCS isn't explicitly specified, it isn't an error if anything in its default, if it has one, doesn't exist. We don't have an implementation yet. So I'll start off with this: default_src_install() { emake -j1 DESTDIR=${D} install local d if ! declare -p DOCS /dev/null 21 ; then for d in README* ChangeLog AUTHORS NEWS TODO CHANGES \ THANKS BUGS FAQ CREDITS CHANGELOG ; do [[ -s ${d} ]] dodoc ${d} done elif declare -p DOCS | grep -q '^declare -a ' ; then for d in ${do...@]} ; do dodoc ${d} done else dodoc ${DOCS} fi } I got the default list by some horrid shell voodoo. Alternatively, there's the following, which is a lot more comprehensive: default_src_install() { emake -j1 DESTDIR=${D} install emagicdocs } emagicdocs() { done_docs= old_set=$(shopt | grep 'nocaseglob[[:space:]]*on') shopt -s nocaseglob for d in '' ${default_src_install_extra_subdi...@]} ; do if [[ -n ${d} ]]; then [[ -d ${d} ]] || die ${d} is not a dir pushd ${d} /dev/null || die Failed to enter ${d} local docdesttree=${DOCDESTTREE} docinto ${d} fi for f in README Change{,s,Log} AUTHORS NEWS TODO ABOUT THANKS {KNOWN_,}BUGS SUBMITTING \ HACKING FAQ CREDITS PKG-INFO HISTORY PACKAGING MAINTAINER{,S} CONTRIBUT{E,OR,ORS} RELEASE \ ANNOUNCE PORTING NOTES PROBLEMS NOTICE ${default_src_install_extra_do...@]}; do for p in ${default_src_install_extra_prefix...@]} '' ; do for doc in ${p}*([[:digit:]])${f}{,+([._-])*} ; do if [[ -s ${doc} ]] ; then for e in ${default_src_install_exclu...@]} ; do [[ ${doc} == ${e} ]] continue 2 done done_docs=${done_docs} ${d%/}${d:+/}${doc} dodoc ${doc} fi done done done if [[ -n ${d} ]]; then docinto ${docdesttree} popd /dev/null || die Failed to leave ${d} fi done if [[ -n ${done_docs} ]] ; then echo Installed docs ${done_docs# } else echo Didn't find any docs to install fi [[ -n ${old_set} ]] || shopt -u nocaseglob } -- Ciaran McCreesh signature.asc Description: PGP signature
Re: [gentoo-dev] EAPI 3's default src_install needs bikeshedding
On Mon, 30 Mar 2009 18:33:48 +0200 Thomas Sachau to...@gentoo.org wrote: Why do you want to force -j1 here? Because any package using an old automake has a non-parallel-safe install. And i had this proposal some months ago, which noone argued against any more It, along with the half dozen other variants floating around, are good starting points, but we need a final solution. if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; Uh, yeah. I forgot about that bit. We need that. if [ -n ${DOCS} ]; then dodoc ${DOCS} || die dodoc failed Spaces... Also, the || die bit for EAPI 3 will be wrong. else for x in AUTHORS ChangeLog NEWS README; do if [ -e ${x} ]; then Is -e really better than -s? -- Ciaran McCreesh signature.asc Description: PGP signature
Re: [gentoo-dev] EAPI 3's default src_install needs bikeshedding
Ciaran McCreesh schrieb am 30.03.2009 18:43: On Mon, 30 Mar 2009 18:33:48 +0200 Thomas Sachau to...@gentoo.org wrote: else for x in AUTHORS ChangeLog NEWS README; do if [ -e ${x} ]; then Is -e really better than -s? I think -s should be used here. I have seen projects out there which don't use the mandatory autotools files (INSTALL, NEWS, README, AUTHORS, ChangeLog, COPYING) at all or use other files than these. So they just place an empty file there to make automake happy instead of using the --foreign option. Besides that it makes no sense to install empty documentation files at all. -- Daniel Pielmeier signature.asc Description: OpenPGP digital signature
Re: [gentoo-dev] EAPI 3's default src_install needs bikeshedding
Daniel Pielmeier wrote: Ciaran McCreesh schrieb am 30.03.2009 18:43: On Mon, 30 Mar 2009 18:33:48 +0200 Thomas Sachau to...@gentoo.org wrote: else for x in AUTHORS ChangeLog NEWS README; do if [ -e ${x} ]; then Is -e really better than -s? I think -s should be used here. I have seen projects out there which don't use the mandatory autotools files (INSTALL, NEWS, README, AUTHORS, ChangeLog, COPYING) at all or use other files than these. So they just place an empty file there to make automake happy instead of using the --foreign option. Besides that it makes no sense to install empty documentation files at all. portage don't install empty files (they are ignored) so it would be painless. Mounir
Re: [gentoo-dev] EAPI 3's default src_install needs bikeshedding
Ciaran McCreesh wrote: So far, we've got this, by agreement of the Council: * There will be a default src_install in EAPI 3 * It will have a DOCS variable, or something along those lines. I'd like to suggest the following too: * If DOCS is explicitly specified, it is an error if anything in it doesn't exist. * If DOCS isn't explicitly specified, it isn't an error if anything in its default, if it has one, doesn't exist. We don't have an implementation yet. So I'll start off with this: default_src_install() { emake -j1 DESTDIR=${D} install should have || die where appropriate Regards, Petteri signature.asc Description: OpenPGP digital signature
Re: [gentoo-dev] EAPI 3's default src_install needs bikeshedding
Ciaran McCreesh wrote: On Mon, 30 Mar 2009 18:33:48 +0200 Thomas Sachau to...@gentoo.org wrote: Why do you want to force -j1 here? Because any package using an old automake has a non-parallel-safe install. I would rather have detection in place for old automake in the build system and not force -j1 there. Regards, Petteri signature.asc Description: OpenPGP digital signature
Re: [gentoo-dev] EAPI 3's default src_install needs bikeshedding
On Mon, 30 Mar 2009 21:07:42 +0300 Petteri Räty betelge...@gentoo.org wrote: should have || die where appropriate It's EAPI 3, so it doesn't need it. -- Ciaran McCreesh signature.asc Description: PGP signature
Re: [gentoo-dev] EAPI 3's default src_install needs bikeshedding
On Monday March 30 Ciaran McCreesh wrote: It, along with the half dozen other variants floating around, are good starting points, but we need a final solution. Yet another one: how about building/installing the documentation into two separate functions doc_compile and doc_install? It's a bit of overtuning, but it could allow features such re-installing package with switching the doc flag without the need of re-compiling everything, and trivialize the src_install. Going further, we could even define a USE-like variable such as DOC, with a limited spectrum of values e.g. api examples html pdf. -- Sébastien signature.asc Description: PGP signature
Re: [gentoo-dev] EAPI 3's default src_install needs bikeshedding
On Mon, 30 Mar 2009 19:19:48 +0100 Sébastien Fabbro bicat...@gentoo.org wrote: It's a bit of overtuning, but it could allow features such re-installing package with switching the doc flag without the need of re-compiling everything, and trivialize the src_install. Anything involving partial recompiles is way beyond what we can get done for EAPI 3. They're a lot harder than one might initially think. -- Ciaran McCreesh signature.asc Description: PGP signature
Re: [gentoo-dev] EAPI 3's default src_install needs bikeshedding
On Monday 30 March 2009, Thomas Sachau wrote: Ciaran McCreesh schrieb: So far, we've got this, by agreement of the Council: * There will be a default src_install in EAPI 3 * It will have a DOCS variable, or something along those lines. I'd like to suggest the following too: * If DOCS is explicitly specified, it is an error if anything in it doesn't exist. * If DOCS isn't explicitly specified, it isn't an error if anything in its default, if it has one, doesn't exist. We don't have an implementation yet. So I'll start off with this: default_src_install() { emake -j1 DESTDIR=${D} install Why do you want to force -j1 here? And i had this proposal some months ago, which noone argued against any more (the default list may of course be extended): ... What Ciaran added was a way to disable installation of default DOCS. The implmenetation we discussed on the thread a while ago does not check whether DOCS is declared but empty. I believe the way the DOCS variable is handled in the first example of the thread starter is good for a default_src_install although I don't know if we really need arrays. But why not? :-) So what about this funcion for the next EAPI and also implementation in base.eclass? Why would you want to implement it in base.eclass when it's in EAPI=3? I can't think of a case where inherit base would make things easier than bumping to EAPI=3. In both cases, you might need to change logic within your ebuild and test it. Robert signature.asc Description: This is a digitally signed message part.