public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Proposed change to base.eclass: EAPI-2 support
@ 2008-11-02 22:08 Peter Alfredsen
  2008-11-02 22:23 ` Peter Alfredsen
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Peter Alfredsen @ 2008-11-02 22:08 UTC (permalink / raw)
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 578 bytes --]

The attached patch for bug 238753 makes base.eclass support EAPI 2 
functions. None of the previous functionality of exported functions is 
changed, so you can still do base_src_unpack autopatch. It's only the 
default actions of base_src_compile and base_src_unpack that's affected 
and only if EAPI=2. The case..esac for EXPORT_FUNCTIONS is borrowed 
from kde4-base. I've not done tree-rebuilds with this, so please give 
it a thorough review. I'm not entirely happy about the base_src_work 
and base_src_util function names, so suggestions are welcome.


-- 
/PA

[-- Attachment #1.2: base.eclass.patch --]
[-- Type: text/x-diff, Size: 3709 bytes --]

--- /usr/portage/eclass/base.eclass	2008-07-17 12:06:27.000000000 +0200
+++ base.eclass	2008-11-02 22:52:10.000000000 +0100
@@ -2,32 +2,78 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/eclass/base.eclass,v 1.34 2008/07/17 09:49:14 pva Exp $
 
 # @ECLASS: base.eclass
 # @MAINTAINER:
-# ???
+# Peter Alfredsen <loki_val@gentoo.org>
 #
 # Original author Dan Armak <danarmak@gentoo.org>
 # @BLURB: The base eclass defines some default functions and variables.
 # @DESCRIPTION:
 # The base eclass defines some default functions and variables. Nearly
 # everything else inherits from here.
+#
+# NOTE: You must define EAPI before inheriting from base, or the wrong functions
+# may be exported.
 
 
 inherit eutils
 
+case "${EAPI}" in
+	2)
+		EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install
+		;;
+	*)
+		EXPORT_FUNCTIONS src_unpack src_compile src_install
+		;;
+esac
+
 DESCRIPTION="Based on the $ECLASS eclass"
 
 # @FUNCTION: base_src_unpack
 # @USAGE: [ unpack ] [ patch ] [ autopatch ] [ all ]
 # @DESCRIPTION:
 # The base src_unpack function, which is exported. If no argument is given,
-# "all" is assumed.
+# "all" is assumed if EAPI!=2, "unpack" if EAPI=2.
 base_src_unpack() {
 
 	debug-print-function $FUNCNAME $*
-	[ -z "$1" ] && base_src_unpack all
+
+	if [ -z "$1" ]
+	then
+		case "${EAPI}" in
+			2)
+				base_src_util unpack
+				;;
+			*)
+				base_src_util all
+				;;
+		esac
+	else
+		base_src_util $1
+	fi
+}
+
+# @FUNCTION: base_src_prepare
+# @DESCRIPTION:
+# The base src_prepare function, which is exported when EAPI=2. Performs
+# "base_src_util autopatch".
+base_src_prepare() {
+
+	debug-print-function $FUNCNAME $*
+
+	base_src_util autopatch
+}
+
+# @FUNCTION: base_src_util
+# @USAGE: [ unpack ] [ patch ] [ autopatch ] [ all ]
+# @DESCRIPTION:
+# The base_src_util function is the grunt function for base src_unpack
+# and base src_prepare.
+base_src_util() {
+
+	debug-print-function $FUNCNAME $*
 
 	cd "${WORKDIR}"
 
 	while [ "$1" ]; do
 
@@ -57,28 +103,62 @@
 				done
 			fi
 			;;
 		all)
 			debug-print-section all
-			base_src_unpack unpack autopatch
+			base_src_util unpack autopatch
 			;;
 		esac
 
 	shift
 	done
 
 }
 
+# @FUNCTION: base_src_configure
+# @DESCRIPTION:
+# The base src_prepare function, which is exported when EAPI=2. Performs
+# "base_src_work configure".
+base_src_configure() {
+
+	debug-print-function $FUNCNAME $*
+
+	base_src_work configure
+}
+
 # @FUNCTION: base_src_compile
 # @USAGE: [ configure ] [ make ] [ all ]
 # @DESCRIPTION:
 # The base src_compile function, which is exported. If no argument is given,
-# "all" is asasumed.
+# "all" is assumed if EAPI!=2, "compile" if EAPI=2.
 base_src_compile() {
 
 	debug-print-function $FUNCNAME $*
-	[ -z "$1" ] && base_src_compile all
+
+	if [ -z "$1" ]
+	then
+		case "${EAPI}" in
+			2)
+				base_src_work make
+				;;
+			*)
+				base_src_work all
+				;;
+		esac
+	else
+		base_src_work $1
+	fi
+}
+
+# @FUNCTION: base_src_work
+# @USAGE: [ configure ] [ make ] [ all ]
+# @DESCRIPTION:
+# The base_src_work function is the grunt function for base src_configure
+# and base src_compile.
+base_src_work() {
+
+	debug-print-function $FUNCNAME $*
 
 	cd "${S}"
 
 	while [ "$1" ]; do
 
@@ -91,11 +171,11 @@
 			debug-print-section make
 			emake || die "died running emake, $FUNCNAME:make"
 			;;
 		all)
 			debug-print-section all
-			base_src_compile configure make
+			base_src_work configure make
 			;;
 	esac
 
 	shift
 	done

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-dev] Proposed change to base.eclass: EAPI-2 support
  2008-11-02 22:08 [gentoo-dev] Proposed change to base.eclass: EAPI-2 support Peter Alfredsen
@ 2008-11-02 22:23 ` Peter Alfredsen
  2008-11-03  4:49 ` Donnie Berkholz
  2008-11-09 15:47 ` [gentoo-dev] " Peter Alfredsen
  2 siblings, 0 replies; 16+ messages in thread
From: Peter Alfredsen @ 2008-11-02 22:23 UTC (permalink / raw)
  To: gentoo-dev

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

On Sunday 02 November 2008, Peter Alfredsen wrote:
[...]

Please just imagine that this is added to the end of the patch:
-
-EXPORT_FUNCTIONS src_unpack src_compile src_install

/me had started hacking on this in-tree, and the first change was 
removing that line.

-- 
/PA

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-dev] Proposed change to base.eclass: EAPI-2 support
  2008-11-02 22:08 [gentoo-dev] Proposed change to base.eclass: EAPI-2 support Peter Alfredsen
  2008-11-02 22:23 ` Peter Alfredsen
@ 2008-11-03  4:49 ` Donnie Berkholz
  2008-11-03  4:51   ` Donnie Berkholz
  2008-11-03  6:00   ` Peter Alfredsen
  2008-11-09 15:47 ` [gentoo-dev] " Peter Alfredsen
  2 siblings, 2 replies; 16+ messages in thread
From: Donnie Berkholz @ 2008-11-03  4:49 UTC (permalink / raw)
  To: gentoo-dev

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

On 00:08 Mon 03 Nov     , Peter Alfredsen wrote:
> +case "${EAPI}" in
> +	2)
> +		EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install
> +		;;
> +	*)
> +		EXPORT_FUNCTIONS src_unpack src_compile src_install
> +		;;
> +esac
> +

This eclass needs to do the same thing as the other eclasses that got 
EAPI=2 patches and default EAPI to 0 when it's not defined, everywhere 
where it tests the value of EAPI.

-- 
Thanks,
Donnie

Donnie Berkholz
Developer, Gentoo Linux
Blog: http://dberkholz.wordpress.com

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-dev] Proposed change to base.eclass: EAPI-2 support
  2008-11-03  4:49 ` Donnie Berkholz
@ 2008-11-03  4:51   ` Donnie Berkholz
  2008-11-03  6:00   ` Peter Alfredsen
  1 sibling, 0 replies; 16+ messages in thread
From: Donnie Berkholz @ 2008-11-03  4:51 UTC (permalink / raw)
  To: gentoo-dev

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

On 20:49 Sun 02 Nov     , Donnie Berkholz wrote:
> On 00:08 Mon 03 Nov     , Peter Alfredsen wrote:
> > +case "${EAPI}" in
> > +	2)
> > +		EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install
> > +		;;
> > +	*)
> > +		EXPORT_FUNCTIONS src_unpack src_compile src_install
> > +		;;
> > +esac
> > +
> 
> This eclass needs to do the same thing as the other eclasses that got 
> EAPI=2 patches and default EAPI to 0 when it's not defined, everywhere 
> where it tests the value of EAPI.

Yeah, I realize it might technically work, but it's just asking for 
breakage in my opinion. Better to be explicit and have the '*' case be 
for something unexpected instead of an expected case.

-- 
Thanks,
Donnie

Donnie Berkholz
Developer, Gentoo Linux
Blog: http://dberkholz.wordpress.com

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-dev] Proposed change to base.eclass: EAPI-2 support
  2008-11-03  4:49 ` Donnie Berkholz
  2008-11-03  4:51   ` Donnie Berkholz
@ 2008-11-03  6:00   ` Peter Alfredsen
  2008-11-03  8:29     ` [gentoo-dev] " Steve Long
  1 sibling, 1 reply; 16+ messages in thread
From: Peter Alfredsen @ 2008-11-03  6:00 UTC (permalink / raw)
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 388 bytes --]

On Monday 03 November 2008, Donnie Berkholz wrote:

> This eclass needs to do the same thing as the other eclasses that got
> EAPI=2 patches and default EAPI to 0 when it's not defined,
> everywhere where it tests the value of EAPI.

Yes, that makes sense, though grepping for EAPI in eclass/ shows me that 
not all chose that approach.

Updated patch attached.



-- 
/PA

[-- Attachment #1.2: base.eclass.patch --]
[-- Type: text/x-diff, Size: 3820 bytes --]

--- /usr/portage/eclass/base.eclass	2008-07-17 12:06:27.000000000 +0200
+++ base.eclass	2008-11-03 06:57:10.000000000 +0100
@@ -2,32 +2,78 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/eclass/base.eclass,v 1.34 2008/07/17 09:49:14 pva Exp $
 
 # @ECLASS: base.eclass
 # @MAINTAINER:
-# ???
+# Peter Alfredsen <loki_val@gentoo.org>
 #
 # Original author Dan Armak <danarmak@gentoo.org>
 # @BLURB: The base eclass defines some default functions and variables.
 # @DESCRIPTION:
 # The base eclass defines some default functions and variables. Nearly
 # everything else inherits from here.
+#
+# NOTE: You must define EAPI before inheriting from base, or the wrong functions
+# may be exported.
 
 
 inherit eutils
 
+case "${EAPI:-0}" in
+	2)
+		EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install
+		;;
+	*)
+		EXPORT_FUNCTIONS src_unpack src_compile src_install
+		;;
+esac
+
 DESCRIPTION="Based on the $ECLASS eclass"
 
 # @FUNCTION: base_src_unpack
 # @USAGE: [ unpack ] [ patch ] [ autopatch ] [ all ]
 # @DESCRIPTION:
 # The base src_unpack function, which is exported. If no argument is given,
-# "all" is assumed.
+# "all" is assumed if EAPI!=2, "unpack" if EAPI=2.
 base_src_unpack() {
 
 	debug-print-function $FUNCNAME $*
-	[ -z "$1" ] && base_src_unpack all
+
+	if [ -z "$1" ]
+	then
+		case "${EAPI:-0}" in
+			2)
+				base_src_util unpack
+				;;
+			*)
+				base_src_util all
+				;;
+		esac
+	else
+		base_src_util $1
+	fi
+}
+
+# @FUNCTION: base_src_prepare
+# @DESCRIPTION:
+# The base src_prepare function, which is exported when EAPI=2. Performs
+# "base_src_util autopatch".
+base_src_prepare() {
+
+	debug-print-function $FUNCNAME $*
+
+	base_src_util autopatch
+}
+
+# @FUNCTION: base_src_util
+# @USAGE: [ unpack ] [ patch ] [ autopatch ] [ all ]
+# @DESCRIPTION:
+# The base_src_util function is the grunt function for base src_unpack
+# and base src_prepare.
+base_src_util() {
+
+	debug-print-function $FUNCNAME $*
 
 	cd "${WORKDIR}"
 
 	while [ "$1" ]; do
 
@@ -57,28 +103,62 @@
 				done
 			fi
 			;;
 		all)
 			debug-print-section all
-			base_src_unpack unpack autopatch
+			base_src_util unpack autopatch
 			;;
 		esac
 
 	shift
 	done
 
 }
 
+# @FUNCTION: base_src_configure
+# @DESCRIPTION:
+# The base src_prepare function, which is exported when EAPI=2. Performs
+# "base_src_work configure".
+base_src_configure() {
+
+	debug-print-function $FUNCNAME $*
+
+	base_src_work configure
+}
+
 # @FUNCTION: base_src_compile
 # @USAGE: [ configure ] [ make ] [ all ]
 # @DESCRIPTION:
 # The base src_compile function, which is exported. If no argument is given,
-# "all" is asasumed.
+# "all" is assumed if EAPI!=2, "make" if EAPI=2.
 base_src_compile() {
 
 	debug-print-function $FUNCNAME $*
-	[ -z "$1" ] && base_src_compile all
+
+	if [ -z "$1" ]
+	then
+		case "${EAPI:-0}" in
+			2)
+				base_src_work make
+				;;
+			*)
+				base_src_work all
+				;;
+		esac
+	else
+		base_src_work $1
+	fi
+}
+
+# @FUNCTION: base_src_work
+# @USAGE: [ configure ] [ make ] [ all ]
+# @DESCRIPTION:
+# The base_src_work function is the grunt function for base src_configure
+# and base src_compile.
+base_src_work() {
+
+	debug-print-function $FUNCNAME $*
 
 	cd "${S}"
 
 	while [ "$1" ]; do
 
@@ -91,11 +171,11 @@
 			debug-print-section make
 			emake || die "died running emake, $FUNCNAME:make"
 			;;
 		all)
 			debug-print-section all
-			base_src_compile configure make
+			base_src_work configure make
 			;;
 	esac
 
 	shift
 	done
@@ -129,7 +209,5 @@
 
 	shift
 	done
 
 }
-
-EXPORT_FUNCTIONS src_unpack src_compile src_install

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [gentoo-dev]  Re: Proposed change to base.eclass: EAPI-2 support
  2008-11-03  6:00   ` Peter Alfredsen
@ 2008-11-03  8:29     ` Steve Long
  2008-11-03 19:53       ` Peter Alfredsen
  0 siblings, 1 reply; 16+ messages in thread
From: Steve Long @ 2008-11-03  8:29 UTC (permalink / raw)
  To: gentoo-dev

Peter Alfredsen wrote:

> debug-print-function $FUNCNAME $*

You should be using "$@" not unquoted $*.

Seems like the FUNCNAME bit should just be rolled into the function
with "${FUNCNAME[1]}" which could be done tree-wide quite easily.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-dev]  Re: Proposed change to base.eclass: EAPI-2 support
  2008-11-03  8:29     ` [gentoo-dev] " Steve Long
@ 2008-11-03 19:53       ` Peter Alfredsen
  2008-11-05 18:26         ` Thomas Sachau
  0 siblings, 1 reply; 16+ messages in thread
From: Peter Alfredsen @ 2008-11-03 19:53 UTC (permalink / raw)
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 545 bytes --]

On Monday 03 November 2008, Steve Long wrote:
> Peter Alfredsen wrote:
> > debug-print-function $FUNCNAME $*
>
> You should be using "$@" not unquoted $*.

Fixed. Also fixed base_src_unpack and base_src_compile calling their 
grunt functions with $1, when clearly it should have been $@.

> Seems like the FUNCNAME bit should just be rolled into the function
> with "${FUNCNAME[1]}" which could be done tree-wide quite easily.

I guess that function was written before bash-3 when FUNCNAME was turned 
into an array.


-- 
/PA

[-- Attachment #1.2: base.eclass.patch --]
[-- Type: text/x-diff, Size: 4230 bytes --]

--- /usr/portage/eclass/base.eclass	2008-07-17 12:06:27.000000000 +0200
+++ base.eclass	2008-11-03 20:45:44.000000000 +0100
@@ -2,32 +2,78 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/eclass/base.eclass,v 1.34 2008/07/17 09:49:14 pva Exp $
 
 # @ECLASS: base.eclass
 # @MAINTAINER:
-# ???
+# Peter Alfredsen <loki_val@gentoo.org>
 #
 # Original author Dan Armak <danarmak@gentoo.org>
 # @BLURB: The base eclass defines some default functions and variables.
 # @DESCRIPTION:
 # The base eclass defines some default functions and variables. Nearly
 # everything else inherits from here.
+#
+# NOTE: You must define EAPI before inheriting from base, or the wrong functions
+# may be exported.
 
 
 inherit eutils
 
+case "${EAPI:-0}" in
+	2)
+		EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install
+		;;
+	*)
+		EXPORT_FUNCTIONS src_unpack src_compile src_install
+		;;
+esac
+
 DESCRIPTION="Based on the $ECLASS eclass"
 
 # @FUNCTION: base_src_unpack
 # @USAGE: [ unpack ] [ patch ] [ autopatch ] [ all ]
 # @DESCRIPTION:
 # The base src_unpack function, which is exported. If no argument is given,
-# "all" is assumed.
+# "all" is assumed if EAPI!=2, "unpack" if EAPI=2.
 base_src_unpack() {
 
-	debug-print-function $FUNCNAME $*
-	[ -z "$1" ] && base_src_unpack all
+	debug-print-function $FUNCNAME "$@"
+
+	if [ -z "$1" ]
+	then
+		case "${EAPI:-0}" in
+			2)
+				base_src_util unpack
+				;;
+			*)
+				base_src_util all
+				;;
+		esac
+	else
+		base_src_util $@
+	fi
+}
+
+# @FUNCTION: base_src_prepare
+# @DESCRIPTION:
+# The base src_prepare function, which is exported when EAPI=2. Performs
+# "base_src_util autopatch".
+base_src_prepare() {
+
+	debug-print-function $FUNCNAME "$@"
+
+	base_src_util autopatch
+}
+
+# @FUNCTION: base_src_util
+# @USAGE: [ unpack ] [ patch ] [ autopatch ] [ all ]
+# @DESCRIPTION:
+# The base_src_util function is the grunt function for base src_unpack
+# and base src_prepare.
+base_src_util() {
+
+	debug-print-function $FUNCNAME "$@"
 
 	cd "${WORKDIR}"
 
 	while [ "$1" ]; do
 
@@ -57,28 +103,62 @@
 				done
 			fi
 			;;
 		all)
 			debug-print-section all
-			base_src_unpack unpack autopatch
+			base_src_util unpack autopatch
 			;;
 		esac
 
 	shift
 	done
 
 }
 
+# @FUNCTION: base_src_configure
+# @DESCRIPTION:
+# The base src_prepare function, which is exported when EAPI=2. Performs
+# "base_src_work configure".
+base_src_configure() {
+
+	debug-print-function $FUNCNAME "$@"
+
+	base_src_work configure
+}
+
 # @FUNCTION: base_src_compile
 # @USAGE: [ configure ] [ make ] [ all ]
 # @DESCRIPTION:
 # The base src_compile function, which is exported. If no argument is given,
-# "all" is asasumed.
+# "all" is assumed if EAPI!=2, "make" if EAPI=2.
 base_src_compile() {
 
-	debug-print-function $FUNCNAME $*
-	[ -z "$1" ] && base_src_compile all
+	debug-print-function $FUNCNAME "$@"
+
+	if [ -z "$1" ]
+	then
+		case "${EAPI:-0}" in
+			2)
+				base_src_work make
+				;;
+			*)
+				base_src_work all
+				;;
+		esac
+	else
+		base_src_work $@
+	fi
+}
+
+# @FUNCTION: base_src_work
+# @USAGE: [ configure ] [ make ] [ all ]
+# @DESCRIPTION:
+# The base_src_work function is the grunt function for base src_configure
+# and base src_compile.
+base_src_work() {
+
+	debug-print-function $FUNCNAME "$@"
 
 	cd "${S}"
 
 	while [ "$1" ]; do
 
@@ -91,11 +171,11 @@
 			debug-print-section make
 			emake || die "died running emake, $FUNCNAME:make"
 			;;
 		all)
 			debug-print-section all
-			base_src_compile configure make
+			base_src_work configure make
 			;;
 	esac
 
 	shift
 	done
@@ -107,11 +187,11 @@
 # @DESCRIPTION:
 # The base src_install function, which is exported. If no argument is given,
 # "all" is assumed.
 base_src_install() {
 
-	debug-print-function $FUNCNAME $*
+	debug-print-function $FUNCNAME "$@"
 	[ -z "$1" ] && base_src_install all
 
 	cd "${S}"
 
 	while [ "$1" ]; do
@@ -129,7 +209,5 @@
 
 	shift
 	done
 
 }
-
-EXPORT_FUNCTIONS src_unpack src_compile src_install

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-dev]  Re: Proposed change to base.eclass: EAPI-2 support
  2008-11-03 19:53       ` Peter Alfredsen
@ 2008-11-05 18:26         ` Thomas Sachau
  2008-11-05 18:45           ` Peter Alfredsen
  0 siblings, 1 reply; 16+ messages in thread
From: Thomas Sachau @ 2008-11-05 18:26 UTC (permalink / raw)
  To: gentoo-dev

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

Peter Alfredsen schrieb:
> On Monday 03 November 2008, Steve Long wrote:
>> Peter Alfredsen wrote:
>>> debug-print-function $FUNCNAME $*
>> You should be using "$@" not unquoted $*.
> 
> Fixed. Also fixed base_src_unpack and base_src_compile calling their 
> grunt functions with $1, when clearly it should have been $@.
> 
>> Seems like the FUNCNAME bit should just be rolled into the function
>> with "${FUNCNAME[1]}" which could be done tree-wide quite easily.
> 
> I guess that function was written before bash-3 when FUNCNAME was turned 
> into an array.
> 
> 
> 

You should at least use emake instead of make in src_install. And i would suggest to use something
like this instead of the make install line (maybe add some other default docs, if they are common):

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] 16+ messages in thread

* Re: [gentoo-dev]  Re: Proposed change to base.eclass: EAPI-2 support
  2008-11-05 18:26         ` Thomas Sachau
@ 2008-11-05 18:45           ` Peter Alfredsen
  2008-11-05 20:20             ` Thomas Sachau
  0 siblings, 1 reply; 16+ messages in thread
From: Peter Alfredsen @ 2008-11-05 18:45 UTC (permalink / raw)
  To: gentoo-dev

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

On Wednesday 05 November 2008, Thomas Sachau wrote:

> You should at least use emake instead of make in src_install. And i
> would suggest to use something like this instead of the make install
> line (maybe add some other default docs, if they are common):
>
> 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

I only propose changes to update the base.eclass to using EAPI-2 
functions, IOW the above is outside the scope of what I propose.

Besides, using emake instead of make is not a good change to make to an 
eclass unless you know for a fact that all ebuilds using the eclass 
have parallel make friendly makefiles. And even then...

-- 
/PA

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-dev]  Re: Proposed change to base.eclass: EAPI-2 support
  2008-11-05 18:45           ` Peter Alfredsen
@ 2008-11-05 20:20             ` Thomas Sachau
  2008-11-05 20:54               ` Ciaran McCreesh
                                 ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Thomas Sachau @ 2008-11-05 20:20 UTC (permalink / raw)
  To: gentoo-dev

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

Peter Alfredsen schrieb:
> On Wednesday 05 November 2008, Thomas Sachau wrote:
> 
>> You should at least use emake instead of make in src_install. And i
>> would suggest to use something like this instead of the make install
>> line (maybe add some other default docs, if they are common):
>>
>> 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
> 
> I only propose changes to update the base.eclass to using EAPI-2 
> functions, IOW the above is outside the scope of what I propose.
> 
> Besides, using emake instead of make is not a good change to make to an 
> eclass unless you know for a fact that all ebuilds using the eclass 
> have parallel make friendly makefiles. And even then...
> 

So change your src_compile ;-)

Do you really think, a package that supports parallel make while compiling fails support for
parallel make support on install?

And emake is and still should be the default. If there is an issue with it, the ebuild author has to
change his ebuild. But this should not be taken to force only one makejob for everyone else.

-- 
Thomas Sachau

Gentoo Linux Developer


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 315 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-dev]  Re: Proposed change to base.eclass: EAPI-2 support
  2008-11-05 20:20             ` Thomas Sachau
@ 2008-11-05 20:54               ` Ciaran McCreesh
  2008-11-05 23:06               ` Thomas Anderson
                                 ` (2 subsequent siblings)
  3 siblings, 0 replies; 16+ messages in thread
From: Ciaran McCreesh @ 2008-11-05 20:54 UTC (permalink / raw)
  To: gentoo-dev

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

On Wed, 05 Nov 2008 21:20:07 +0100
Thomas Sachau <tommy@gentoo.org> wrote:
> Do you really think, a package that supports parallel make while
> compiling fails support for parallel make support on install?

Yup, that's fairly common.

-- 
Ciaran McCreesh

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-dev]  Re: Proposed change to base.eclass: EAPI-2 support
  2008-11-05 20:20             ` Thomas Sachau
  2008-11-05 20:54               ` Ciaran McCreesh
@ 2008-11-05 23:06               ` Thomas Anderson
  2008-11-06  1:27               ` Thomas Rösner
  2008-11-06  3:07               ` Javier Villavicencio
  3 siblings, 0 replies; 16+ messages in thread
From: Thomas Anderson @ 2008-11-05 23:06 UTC (permalink / raw)
  To: gentoo-dev

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

On Wed, Nov 05, 2008 at 09:20:07PM +0100, Thomas Sachau wrote:
> Peter Alfredsen schrieb:
> Do you really think, a package that supports parallel make while compiling fails support for
> parallel make support on install?

Happened for jabberd and jabberd2 to me.

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-dev]  Re: Proposed change to base.eclass: EAPI-2 support
  2008-11-05 20:20             ` Thomas Sachau
  2008-11-05 20:54               ` Ciaran McCreesh
  2008-11-05 23:06               ` Thomas Anderson
@ 2008-11-06  1:27               ` Thomas Rösner
  2008-11-06 13:41                 ` Duncan
  2008-11-06  3:07               ` Javier Villavicencio
  3 siblings, 1 reply; 16+ messages in thread
From: Thomas Rösner @ 2008-11-06  1:27 UTC (permalink / raw)
  To: gentoo-dev

Hi,

> And emake is and still should be the default. If there is an issue with it, the ebuild author has to
> change his ebuild. But this should not be taken to force only one makejob for everyone else.
>   

But with rotating storage, don't you (very much) only want one I/O-bound
job at a time?

Regards,
    T.




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-dev]  Re: Proposed change to base.eclass: EAPI-2 support
  2008-11-05 20:20             ` Thomas Sachau
                                 ` (2 preceding siblings ...)
  2008-11-06  1:27               ` Thomas Rösner
@ 2008-11-06  3:07               ` Javier Villavicencio
  3 siblings, 0 replies; 16+ messages in thread
From: Javier Villavicencio @ 2008-11-06  3:07 UTC (permalink / raw)
  To: gentoo-dev

Thomas Sachau wrote:
> Do you really think, a package that supports parallel make while compiling fails support for
> parallel make support on install?
> 
See bug 196728. It's an (old) automake issue.

> And emake is and still should be the default. If there is an issue with it, the ebuild author has to
> change his ebuild. But this should not be taken to force only one makejob for everyone else.
> 

On Gentoo/FreeBSD where "make" is BSD make, emake knows when to use
"gmake" instead, so pretty please, use emake instead of make.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [gentoo-dev]  Re: Proposed change to base.eclass: EAPI-2 support
  2008-11-06  1:27               ` Thomas Rösner
@ 2008-11-06 13:41                 ` Duncan
  0 siblings, 0 replies; 16+ messages in thread
From: Duncan @ 2008-11-06 13:41 UTC (permalink / raw)
  To: gentoo-dev

Thomas Rösner <Thomas.Roesner@digital-trauma.de> posted
491247F3.1090309@digital-trauma.de, excerpted below, on  Thu, 06 Nov 2008
02:27:15 +0100:

> But with rotating storage, don't you (very much) only want one I/O-bound
> job at a time?

Invalid assumption(s).  This is more a user list topic or personal wiki/
google research project, but there are at least four levels at which that 
is a likely invalid assumption on a well configured Gentoo Linux 
installation on modern hardware, particularly one where the user is not 
setting MAKEOPTS=1, thus indicating that he has and wants to use 
sufficient resources for parallel jobs in the first place.

If you like, mail me offlist and we can continue the discussion, as it 
really is off topic for the gentoo-dev list.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-dev] Proposed change to base.eclass: EAPI-2 support
  2008-11-02 22:08 [gentoo-dev] Proposed change to base.eclass: EAPI-2 support Peter Alfredsen
  2008-11-02 22:23 ` Peter Alfredsen
  2008-11-03  4:49 ` Donnie Berkholz
@ 2008-11-09 15:47 ` Peter Alfredsen
  2 siblings, 0 replies; 16+ messages in thread
From: Peter Alfredsen @ 2008-11-09 15:47 UTC (permalink / raw)
  To: gentoo-dev

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

On Sunday 02 November 2008, Peter Alfredsen wrote:
> The attached patch for bug 238753 makes base.eclass support EAPI 2
> functions.

Applied

-- 
/PA

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2008-11-09 15:48 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-02 22:08 [gentoo-dev] Proposed change to base.eclass: EAPI-2 support Peter Alfredsen
2008-11-02 22:23 ` Peter Alfredsen
2008-11-03  4:49 ` Donnie Berkholz
2008-11-03  4:51   ` Donnie Berkholz
2008-11-03  6:00   ` Peter Alfredsen
2008-11-03  8:29     ` [gentoo-dev] " Steve Long
2008-11-03 19:53       ` Peter Alfredsen
2008-11-05 18:26         ` Thomas Sachau
2008-11-05 18:45           ` Peter Alfredsen
2008-11-05 20:20             ` Thomas Sachau
2008-11-05 20:54               ` Ciaran McCreesh
2008-11-05 23:06               ` Thomas Anderson
2008-11-06  1:27               ` Thomas Rösner
2008-11-06 13:41                 ` Duncan
2008-11-06  3:07               ` Javier Villavicencio
2008-11-09 15:47 ` [gentoo-dev] " Peter Alfredsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox