diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2014-11-21 01:21:44 +0000 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2014-11-21 01:21:44 +0000 |
commit | 273526c302e5f2592b38f8e17bb0ff1056c3386c (patch) | |
tree | 9af72a5019800f2dfd12bc5ca12b401ac075ec1b /eclass | |
parent | fixing sqlalchemy deps (diff) | |
download | gentoo-2-273526c302e5f2592b38f8e17bb0ff1056c3386c.tar.gz gentoo-2-273526c302e5f2592b38f8e17bb0ff1056c3386c.tar.bz2 gentoo-2-273526c302e5f2592b38f8e17bb0ff1056c3386c.zip |
Add usage warnings to pkg_postinst and pkg_postrm, deprecate pkg_prerm
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 5 | ||||
-rw-r--r-- | eclass/perl-module.eclass | 35 |
2 files changed, 29 insertions, 11 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index cf705842f5d1..2c6b7ea66f3a 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -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 <dilfridge@gentoo.org> perl-module.eclass: + Add usage warnings to pkg_postinst and pkg_postrm, deprecate pkg_prerm 20 Nov 2014; Michał Górny <mgorny@gentoo.org> git-2.eclass, distutils.eclass, python.eclass, twisted.eclass: diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass index 5069c03cdb1a..dce0ed5e81d9 100644 --- a/eclass/perl-module.eclass +++ b/eclass/perl-module.eclass @@ -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 @@ perl-module_pkg_preinst() { # @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 @@ perl_rm_files() { # @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 |