From: "Andreas HAttel (dilfridge)" <dilfridge@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog perl-module.eclass
Date: Fri, 21 Nov 2014 01:21:44 +0000 (UTC) [thread overview]
Message-ID: <20141121012144.BDB7AA916@oystercatcher.gentoo.org> (raw)
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 <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:
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
next reply other threads:[~2014-11-21 1:21 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-21 1:21 Andreas HAttel (dilfridge) [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-06-13 19:01 [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog perl-module.eclass Andreas Huettel (dilfridge)
2015-05-25 18:18 Andreas Huettel (dilfridge)
2015-03-15 17:23 Andreas HAttel (dilfridge)
2015-03-14 14:32 Andreas HAttel (dilfridge)
2015-02-01 12:01 Andreas HAttel (dilfridge)
2014-12-17 16:40 Andreas HAttel (dilfridge)
2014-12-13 21:06 Andreas HAttel (dilfridge)
2014-12-13 20:51 Andreas HAttel (dilfridge)
2014-12-01 20:41 Andreas HAttel (dilfridge)
2014-11-22 18:24 Andreas HAttel (dilfridge)
2014-11-19 19:52 Andreas HAttel (dilfridge)
2014-11-19 19:39 Andreas HAttel (dilfridge)
2014-11-18 23:31 Andreas HAttel (dilfridge)
2014-11-17 23:34 Andreas HAttel (dilfridge)
2014-11-16 20:22 Andreas HAttel (dilfridge)
2014-11-12 23:26 Patrice Clement (monsieurp)
2014-11-11 0:49 Patrice Clement (monsieurp)
2014-11-09 21:34 Andreas HAttel (dilfridge)
2014-11-09 18:10 Andreas HAttel (dilfridge)
2014-11-05 0:24 Andreas HAttel (dilfridge)
2014-11-01 17:34 Andreas HAttel (dilfridge)
2014-10-20 12:47 Andreas HAttel (dilfridge)
2014-10-19 20:59 Andreas HAttel (dilfridge)
2014-09-27 20:54 Andreas HAttel (dilfridge)
2014-09-19 18:17 Andreas HAttel (dilfridge)
2013-12-29 21:37 Andreas HAttel (dilfridge)
2013-07-31 5:15 Matt Turner (mattst88)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141121012144.BDB7AA916@oystercatcher.gentoo.org \
--to=dilfridge@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox