Restore ${S} fallback, but with a deprecation notice saying that it will be removed...
authorDavide Pesavento <pesa@gentoo.org>
Sat, 12 Nov 2011 20:46:39 +0000 (20:46 +0000)
committerDavide Pesavento <pesa@gentoo.org>
Sat, 12 Nov 2011 20:46:39 +0000 (20:46 +0000)
eclass/ChangeLog
eclass/qt4-r2.eclass

index 63ad825c39d8d20a872cb246092b4402509c35c1..fb2ae10ab7d2068c92a14cbc8bf7a253eee91441 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.10 2011/11/12 19:01:56 pesa Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.11 2011/11/12 20:46:39 pesa Exp $
+
+  12 Nov 2011; Davide Pesavento <pesa@gentoo.org> qt4-r2.eclass:
+  Restore ${S} fallback, but with a deprecation notice saying that it will be
+  removed in 30 days.
 
   12 Nov 2011; Davide Pesavento <pesa@gentoo.org> qt4-build.eclass:
   Set qt@g.o as maintainer, minor cleanups (quoting, whitespace, etc.)
index d2c9251b48a8985f831afe8b32737fec3c9e2be0..651e321445f6132b87731e18665bd53e57cda28e 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-r2.eclass,v 1.13 2011/11/12 18:26:59 pesa Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-r2.eclass,v 1.14 2011/11/12 20:46:39 pesa Exp $
 
 # @ECLASS: qt4-r2.eclass
 # @MAINTAINER:
@@ -47,6 +47,19 @@ qt4-r2_src_unpack() {
        debug-print-function $FUNCNAME "$@"
 
        base_src_unpack "$@"
+
+       # Fallback to ${WORKDIR}/${MY_P} when ${WORKDIR}/${P} doesn't exist.
+       # This is a hack that was never meant to be used by ebuilds in tree.
+       if [[ ${S} == "${WORKDIR}/${P}" && ! -d ${S} && -d ${WORKDIR}/${MY_P} ]]; then
+               echo
+               eqawarn "*** DEPRECATION NOTICE ***"
+               eqawarn
+               eqawarn "\${S} fallback is deprecated and will be removed on 12/12/2011."
+               eqawarn "Please set the correct value for \${S} variable inside the ebuild."
+               echo
+               einfo "Falling back to '${WORKDIR}/${MY_P}'"
+               S="${WORKDIR}/${MY_P}"
+       fi
 }
 
 # @ECLASS-VARIABLE: PATCHES