dilfridge    14/11/21 01:21:44

  Modified:             ChangeLog perl-module.eclass
  Log:
  Add usage warnings to pkg_postinst and pkg_postrm, deprecate pkg_prerm

Revision  Changes    Path
1.1435               eclass/ChangeLog

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1435&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1435&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1434&r2=1.1435

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1434
retrieving revision 1.1435
diff -u -r1.1434 -r1.1435
--- ChangeLog   20 Nov 2014 15:32:09 -0000      1.1434
+++ ChangeLog   21 Nov 2014 01:21:44 -0000      1.1435
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1434 2014/11/20 
15:32:09 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1435 2014/11/21 
01:21:44 dilfridge Exp $
+
+  21 Nov 2014; Andreas K. Huettel <[email protected]> perl-module.eclass:
+  Add usage warnings to pkg_postinst and pkg_postrm, deprecate pkg_prerm
 
   20 Nov 2014; Michał Górny <[email protected]> git-2.eclass,
   distutils.eclass, python.eclass, twisted.eclass:



1.156                eclass/perl-module.eclass

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/perl-module.eclass?rev=1.156&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/perl-module.eclass?rev=1.156&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/perl-module.eclass?r1=1.155&r2=1.156

Index: perl-module.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -r1.155 -r1.156
--- perl-module.eclass  19 Nov 2014 19:52:06 -0000      1.155
+++ perl-module.eclass  21 Nov 2014 01:21:44 -0000      1.156
@@ -1,6 +1,6 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.155 
2014/11/19 19:52:06 dilfridge Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.156 
2014/11/21 01:21:44 dilfridge Exp $
 
 # @ECLASS: perl-module.eclass
 # @MAINTAINER:
@@ -341,26 +341,44 @@
 # @FUNCTION: perl-module_pkg_postinst
 # @USAGE: perl-module_pkg_postinst
 # @DESCRIPTION:
-# This function is to be called during the pkg_postinst() phase.
+# This function is to be called during the pkg_postinst() phase. It only does 
+# useful things for the perl-core category, where it handles the file renaming 
and symbolic
+# links that prevent file collisions for dual-life packages installing 
scripts. 
+# In any other category it immediately exits.
 perl-module_pkg_postinst() {
        debug-print-function $FUNCNAME "$@"
+       if [[ ${CATEGORY} != perl-core ]] ; then
+               eqawarn "perl-module.eclass: You are calling 
perl-module_pkg_postinst outside the perl-core category."
+               eqawarn "   This does not do anything; the call can be safely 
removed."
+               return 0
+       fi
        perl_link_duallife_scripts
 }
 
 # @FUNCTION: perl-module_pkg_prerm
 # @USAGE: perl-module_pkg_prerm
 # @DESCRIPTION:
-# This function is to be called during the pkg_prerm() phase.
+# This function was to be called during the pkg_prerm() phase.
+# It does not do anything. Deprecated, to be removed.
 perl-module_pkg_prerm() {
        debug-print-function $FUNCNAME "$@"
+       eqawarn "perl-module.eclass: perl-module_pkg_prerm does not do anything 
and will be removed. Please remove the call."
 }
 
 # @FUNCTION: perl-module_pkg_postrm
 # @USAGE: perl-module_pkg_postrm
 # @DESCRIPTION:
-# This function is to be called during the pkg_postrm() phase.
+# This function is to be called during the pkg_postrm() phase. It only does 
+# useful things for the perl-core category, where it handles the file renaming 
and symbolic
+# links that prevent file collisions for dual-life packages installing 
scripts. 
+# In any other category it immediately exits.
 perl-module_pkg_postrm() {
        debug-print-function $FUNCNAME "$@"
+       if [[ ${CATEGORY} != perl-core ]] ; then
+               eqawarn "perl-module.eclass: You are calling 
perl-module_pkg_postrm outside the perl-core category."
+               eqawarn "   This does not do anything; the call can be safely 
removed."
+               return 0
+       fi
        perl_link_duallife_scripts
 }
 
@@ -528,12 +546,9 @@
 # @FUNCTION: perl_link_duallife_scripts
 # @USAGE: perl_link_duallife_scripts
 # @DESCRIPTION:
-# This function contains the bulk of perl-module_pkg_postinst()'s logic
-# and will be soon deprecated. 
-#
-# Please use perl-module_pkg_postinst() instead.
-#
-# TODO: Move code to perl-module_pkg_postinst().
+# Moves files and generates symlinks so dual-life packages installing scripts 
do not
+# lead to file collisions. Mainly for use in pkg_postinst and pkg_postrm, and 
makes 
+# only sense for perl-core packages.
 perl_link_duallife_scripts() {
        debug-print-function $FUNCNAME "$@"
        if [[ ${CATEGORY} != perl-core ]] || ! has_version 
">=dev-lang/perl-5.8.8-r8" ; then




Reply via email to