Skip Menu |

This queue is for tickets about the ExtUtils-MakeMaker CPAN distribution.

Report information
The Basics
Id: 91447
Status: resolved
Worked: 30 min
Priority: 0/
Queue: ExtUtils-MakeMaker

People
Owner: BINGOS [...] cpan.org
Requestors: philippe [...] nologic.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 6.85_02



Subject: Feature request / enhancement in PPD generator code ?
Date: Mon, 16 Dec 2013 14:12:56 +0100
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: Philippe Causse <philippe [...] nologic.org>
Hello, It would be nice to complement support for PPM_INSTALL_EXEC / PPM_INSTALL_SCRIPT with their ‘uninstall’ counterparts, let’s say PPM_UNINSTALL_EXEC + PPM_UNINSTALL_SCRIPT. According to the PPD specs, the XML tag <UNINSTALL> can be specified to run a pre-deinstall script. As far as I could see, the PPM stuff is only present in ExtUtils/MakeMaker.pm and ExtUtils/MM_Unix.pm Furthermore, since the PPD is pretty much platform-neutral (after all, it’s just an XML file), would it make sense to move its implementation be moved from MM_Unix.pm to MM_Any.pm or MakeMaker.pm itself ? Kind regards, /Philippe.
Subject: [rt.cpan.org #91447] - Proposed patch against 6.84 to add PPM_UNINSTALL capability
Date: Mon, 16 Dec 2013 15:28:54 +0100
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: Philippe Causse <philippe [...] nologic.org>
Hi again, Following up on ticket #91447, I did those trivial changes (basically copy/paste & rename) to add PPM_UNINSTALL capabilities. Context diff given below. I hope you will include them in the next build. Kiind regards, /Philippe. ———————— diff -c -r ExtUtils-MakeMaker-6.84/lib/ExtUtils/MM_Unix.pm ExtUtils-MakeMaker-6.85/lib/ExtUtils/MM_Unix.pm *** ExtUtils-MakeMaker-6.84/lib/ExtUtils/MM_Unix.pm Sat Nov 30 16:23:42 2013 --- ExtUtils-MakeMaker-6.85/lib/ExtUtils/MM_Unix.pm Mon Dec 16 15:04:36 2013 *************** *** 15,21 **** # If we make $VERSION an our variable parse_version() breaks use vars qw($VERSION); ! $VERSION = '6.84'; $VERSION = eval $VERSION; ## no critic [BuiltinFunctions::ProhibitStringyEval] require ExtUtils::MM_Any; --- 15,21 ---- # If we make $VERSION an our variable parse_version() breaks use vars qw($VERSION); ! $VERSION = '6.85'; $VERSION = eval $VERSION; ## no critic [BuiltinFunctions::ProhibitStringyEval] require ExtUtils::MM_Any; *************** *** 2983,2988 **** --- 2983,2999 ---- } } + if ($self->{PPM_UNINSTALL_SCRIPT}) { + if ($self->{PPM_UNINSTALL_EXEC}) { + $ppd_xml .= sprintf qq{ <UNINSTALL EXEC="%s">%s</UNINSTALL>\n}, + $self->{PPM_UNINSTALL_EXEC}, $self->{PPM_UNINSTALL_SCRIPT}; + } + else { + $ppd_xml .= sprintf qq{ <UNINSTALL>%s</UNINSTALL>\n}, + $self->{PPM_UNINSTALL_SCRIPT}; + } + } + my ($bin_location) = $self->{BINARY_LOCATION} || ''; $bin_location =~ s/\\/\\\\/g; diff -c -r ExtUtils-MakeMaker-6.84/lib/ExtUtils/MakeMaker.pm ExtUtils-MakeMaker-6.85/lib/ExtUtils/MakeMaker.pm *** ExtUtils-MakeMaker-6.84/lib/ExtUtils/MakeMaker.pm Sat Nov 30 16:23:42 2013 --- ExtUtils-MakeMaker-6.85/lib/ExtUtils/MakeMaker.pm Mon Dec 16 15:04:46 2013 *************** *** 18,24 **** my @Prepend_parent; my %Recognized_Att_Keys; ! our $VERSION = '6.84'; $VERSION = eval $VERSION; ## no critic [BuiltinFunctions::ProhibitStringyEval] # Emulate something resembling CVS $Revision$ --- 18,24 ---- my @Prepend_parent; my %Recognized_Att_Keys; ! our $VERSION = '6.85'; $VERSION = eval $VERSION; ## no critic [BuiltinFunctions::ProhibitStringyEval] # Emulate something resembling CVS $Revision$ *************** *** 280,287 **** NORECURS NO_VC OBJECT OPTIMIZE PERL_MALLOC_OK PERL PERLMAINCC PERLRUN PERLRUNINST PERL_CORE PERL_SRC PERM_DIR PERM_RW PERM_RWX MAGICXS ! PL_FILES PM PM_FILTER PMLIBDIRS PMLIBPARENTDIRS POLLUTE PPM_INSTALL_EXEC ! PPM_INSTALL_SCRIPT PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ SIGN SKIP TEST_REQUIRES TYPEMAPS UNINST VERSION VERSION_FROM XS XSOPT XSPROTOARG XS_VERSION clean depend dist dynamic_lib linkext macro realclean tool_autosplit --- 280,287 ---- NORECURS NO_VC OBJECT OPTIMIZE PERL_MALLOC_OK PERL PERLMAINCC PERLRUN PERLRUNINST PERL_CORE PERL_SRC PERM_DIR PERM_RW PERM_RWX MAGICXS ! PL_FILES PM PM_FILTER PMLIBDIRS PMLIBPARENTDIRS POLLUTE PPM_INSTALL_EXEC PPM_UNINSTALL_EXEC ! PPM_INSTALL_SCRIPT PPM_UNINSTALL_SCRIPT PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ SIGN SKIP TEST_REQUIRES TYPEMAPS UNINST VERSION VERSION_FROM XS XSOPT XSPROTOARG XS_VERSION clean depend dist dynamic_lib linkext macro realclean tool_autosplit *************** *** 2481,2486 **** --- 2481,2495 ---- Name of the script that gets executed by the Perl Package Manager after the installation of a package. + =item PPM_UNINSTALL_EXEC + + Name of the executable used to run C<PPM_UNINSTALL_SCRIPT> below. (e.g. perl) + + =item PPM_UNINSTALL_SCRIPT + + Name of the script that gets executed by the Perl Package Manager before + the removal of a package. + =item PREFIX This overrides all the default install locations. Man pages,
Many thanks, this has been patched in the EUMM source repository and on CPAN as the development release 6.85_02. It will feature in the forthcoming stable release.
v6.86 was released to CPAN today, which includes this new feature. Many thanks.
Subject: Re: [rt.cpan.org #91447] Feature request / enhancement in PPD generator code ?
Date: Sat, 4 Jan 2014 18:40:37 +0100
To: "bug-ExtUtils-MakeMaker [...] rt.cpan.org" <bug-ExtUtils-MakeMaker [...] rt.cpan.org>
From: Philippe Causse <philippe [...] nologic.org>
Thank you too and happy new year! Best regards, /Philippe Show quoted text
> On 04/01/2014, at 15.22, "BINGOS via RT" <bug-ExtUtils-MakeMaker@rt.cpan.org> wrote: > > <URL: https://rt.cpan.org/Ticket/Display.html?id=91447 > > > v6.86 was released to CPAN today, which includes this new feature. > > Many thanks.