/[gentoo-x86]/eclass/perl-module.eclass
Gentoo

Diff of /eclass/perl-module.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.155 Revision 1.156
1# Copyright 1999-2014 Gentoo Foundation 1# Copyright 1999-2014 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.155 2014/11/19 19:52:06 dilfridge Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.156 2014/11/21 01:21:44 dilfridge Exp $
4 4
5# @ECLASS: perl-module.eclass 5# @ECLASS: perl-module.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# perl@gentoo.org 7# perl@gentoo.org
8# @AUTHOR: 8# @AUTHOR:
339} 339}
340 340
341# @FUNCTION: perl-module_pkg_postinst 341# @FUNCTION: perl-module_pkg_postinst
342# @USAGE: perl-module_pkg_postinst 342# @USAGE: perl-module_pkg_postinst
343# @DESCRIPTION: 343# @DESCRIPTION:
344# This function is to be called during the pkg_postinst() phase. 344# This function is to be called during the pkg_postinst() phase. It only does
345# useful things for the perl-core category, where it handles the file renaming and symbolic
346# links that prevent file collisions for dual-life packages installing scripts.
347# In any other category it immediately exits.
345perl-module_pkg_postinst() { 348perl-module_pkg_postinst() {
346 debug-print-function $FUNCNAME "$@" 349 debug-print-function $FUNCNAME "$@"
350 if [[ ${CATEGORY} != perl-core ]] ; then
351 eqawarn "perl-module.eclass: You are calling perl-module_pkg_postinst outside the perl-core category."
352 eqawarn " This does not do anything; the call can be safely removed."
353 return 0
354 fi
347 perl_link_duallife_scripts 355 perl_link_duallife_scripts
348} 356}
349 357
350# @FUNCTION: perl-module_pkg_prerm 358# @FUNCTION: perl-module_pkg_prerm
351# @USAGE: perl-module_pkg_prerm 359# @USAGE: perl-module_pkg_prerm
352# @DESCRIPTION: 360# @DESCRIPTION:
353# This function is to be called during the pkg_prerm() phase. 361# This function was to be called during the pkg_prerm() phase.
362# It does not do anything. Deprecated, to be removed.
354perl-module_pkg_prerm() { 363perl-module_pkg_prerm() {
355 debug-print-function $FUNCNAME "$@" 364 debug-print-function $FUNCNAME "$@"
365 eqawarn "perl-module.eclass: perl-module_pkg_prerm does not do anything and will be removed. Please remove the call."
356} 366}
357 367
358# @FUNCTION: perl-module_pkg_postrm 368# @FUNCTION: perl-module_pkg_postrm
359# @USAGE: perl-module_pkg_postrm 369# @USAGE: perl-module_pkg_postrm
360# @DESCRIPTION: 370# @DESCRIPTION:
361# This function is to be called during the pkg_postrm() phase. 371# This function is to be called during the pkg_postrm() phase. It only does
372# useful things for the perl-core category, where it handles the file renaming and symbolic
373# links that prevent file collisions for dual-life packages installing scripts.
374# In any other category it immediately exits.
362perl-module_pkg_postrm() { 375perl-module_pkg_postrm() {
363 debug-print-function $FUNCNAME "$@" 376 debug-print-function $FUNCNAME "$@"
377 if [[ ${CATEGORY} != perl-core ]] ; then
378 eqawarn "perl-module.eclass: You are calling perl-module_pkg_postrm outside the perl-core category."
379 eqawarn " This does not do anything; the call can be safely removed."
380 return 0
381 fi
364 perl_link_duallife_scripts 382 perl_link_duallife_scripts
365} 383}
366 384
367# @FUNCTION: perl_set_version 385# @FUNCTION: perl_set_version
368# @USAGE: perl_set_version 386# @USAGE: perl_set_version
526} 544}
527 545
528# @FUNCTION: perl_link_duallife_scripts 546# @FUNCTION: perl_link_duallife_scripts
529# @USAGE: perl_link_duallife_scripts 547# @USAGE: perl_link_duallife_scripts
530# @DESCRIPTION: 548# @DESCRIPTION:
531# This function contains the bulk of perl-module_pkg_postinst()'s logic 549# Moves files and generates symlinks so dual-life packages installing scripts do not
532# and will be soon deprecated. 550# lead to file collisions. Mainly for use in pkg_postinst and pkg_postrm, and makes
533# 551# only sense for perl-core packages.
534# Please use perl-module_pkg_postinst() instead.
535#
536# TODO: Move code to perl-module_pkg_postinst().
537perl_link_duallife_scripts() { 552perl_link_duallife_scripts() {
538 debug-print-function $FUNCNAME "$@" 553 debug-print-function $FUNCNAME "$@"
539 if [[ ${CATEGORY} != perl-core ]] || ! has_version ">=dev-lang/perl-5.8.8-r8" ; then 554 if [[ ${CATEGORY} != perl-core ]] || ! has_version ">=dev-lang/perl-5.8.8-r8" ; then
540 return 0 555 return 0
541 fi 556 fi

Legend:
Removed from v.1.155  
changed lines
  Added in v.1.156

  ViewVC Help
Powered by ViewVC 1.1.20