Uninstalling Perl modules
Uninstalling Perl modules
am 10.01.2007 05:42:49 von paduille.4060.mumia.w
How do I uninstall modules that were installed using the traditional method:
perl Makefile.PL
make
make test
make install
When I do "make uninstall," I'm told that uninstall is deprecated, and
it doesn't do the uninstallation.
--
paduille.4060.mumia.w@earthlink.net
Windows Vista and your
freedom in conflict: http://www.badvista.org/
http://home.earthlink.net/~mumia.w.18.spam/
Re: Uninstalling Perl modules
am 10.01.2007 07:16:28 von Ron Savage
On Wed, 10 Jan 2007 15:42:49 +1100, Mumia W. (on aioe) wrote:
Hi
> How do I uninstall modules that were installed using the
> traditional method:
[snip]
> When I do "make uninstall," I'm told that uninstall is deprecated,
> and it doesn't do the uninstallation.
If you look inside a Makefile, you'll see:
-----><8-----
uninstall :: uninstall_from_$(INSTALLDIRS)dirs
=09$(NOECHO) $(NOOP)
uninstall_from_perldirs ::
=09$(NOECHO) $(UNINSTALL) $(PERL_ARCHLIB)\auto\$(FULLEXT)\.packlist
uninstall_from_sitedirs ::
=09$(NOECHO) $(UNINSTALL) $(SITEARCHEXP)\auto\$(FULLEXT)\.packlist
uninstall_from_vendordirs ::
=09$(NOECHO) $(UNINSTALL) $(VENDORARCHEXP)\auto\$(FULLEXT)\.packlist
-----><8-----
So, that's why "make uninstall" did nothing. Try the others...
Re: Uninstalling Perl modules
am 10.01.2007 08:09:01 von paduille.4060.mumia.w
On 01/10/2007 12:16 AM, Ron Savage wrote:
> On Wed, 10 Jan 2007 15:42:49 +1100, Mumia W. (on aioe) wrote:
>
> Hi
>
>> How do I uninstall modules that were installed using the
>> traditional method:
> [snip]
>> When I do "make uninstall," I'm told that uninstall is deprecated,
>> and it doesn't do the uninstallation.
>
> If you look inside a Makefile, you'll see:
> -----><8-----
> uninstall :: uninstall_from_$(INSTALLDIRS)dirs
> $(NOECHO) $(NOOP)
>
> uninstall_from_perldirs ::
> $(NOECHO) $(UNINSTALL) $(PERL_ARCHLIB)\auto\$(FULLEXT)\.packlist
>
> uninstall_from_sitedirs ::
> $(NOECHO) $(UNINSTALL) $(SITEARCHEXP)\auto\$(FULLEXT)\.packlist
>
> uninstall_from_vendordirs ::
> $(NOECHO) $(UNINSTALL) $(VENDORARCHEXP)\auto\$(FULLEXT)\.packlist
> -----><8-----
> So, that's why "make uninstall" did nothing. Try the others...
>
>
>
All of these commands fail to uninstall:
make uninstall_from_perldirs
make uninstall_from_sitedirs
make uninstall_from_vendordirs
--
paduille.4060.mumia.w@earthlink.net
Windows Vista and your
freedom in conflict: http://www.badvista.org/
http://home.earthlink.net/~mumia.w.18.spam/
Re: Uninstalling Perl modules
am 11.01.2007 00:08:53 von Ron Savage
On Wed, 10 Jan 2007 18:09:01 +1100, Mumia W. (on aioe) wrote:
Hi
> All of these commands fail to uninstall:
> make uninstall_from_perldirs
> make uninstall_from_sitedirs
> make uninstall_from_vendordirs
Hmmm. OK. Let's try something else.
From a CGI script I use to install modules, I see:
use Config;
....
$Config{'make'} install UNINST=3D1
and for you $Config{'make'} is just make, so try
make install UNINST=3D1
Re: Uninstalling Perl modules
am 11.01.2007 02:21:32 von paduille.4060.mumia.w
On 01/10/2007 05:08 PM, Ron Savage wrote:
> On Wed, 10 Jan 2007 18:09:01 +1100, Mumia W. (on aioe) wrote:
>
> Hi
>
>> All of these commands fail to uninstall:
>> make uninstall_from_perldirs
>> make uninstall_from_sitedirs
>> make uninstall_from_vendordirs
>
> Hmmm. OK. Let's try something else.
>
> From a CGI script I use to install modules, I see:
>
> use Config;
> ....
> $Config{'make'} install UNINST=1
>
> and for you $Config{'make'} is just make, so try
>
> make install UNINST=1
>
>
Nope, it just performs another installation :-(
Re: Uninstalling Perl modules
am 11.01.2007 11:24:39 von Ron Savage
On Thu, 11 Jan 2007 12:21:32 +1100, Mumia W. (on aioe) wrote:
Hi
>> make install UNINST=3D1
> Nope, it just performs another installation :-(
You're right. I was in a daze. It uninstalls the previous version.
Re: Uninstalling Perl modules
am 11.01.2007 16:40:55 von rahed
"Mumia W. (on aioe)" writes:
> How do I uninstall modules that were installed using the traditional method:
I use a script called modrm from ExtUtils::Packlist.
--
Radek
Re: Uninstalling Perl modules
am 11.01.2007 22:39:16 von paduille.4060.mumia.w
On 01/11/2007 09:40 AM, rahed wrote:
> "Mumia W. (on aioe)" writes:
>
>> How do I uninstall modules that were installed using the traditional method:
>
> I use a script called modrm from ExtUtils::Packlist.
>
Thanks. I'll look into this.
Re: Uninstalling Perl modules
am 12.01.2007 00:41:36 von Ron Savage
On Fri, 12 Jan 2007 02:40:55 +1100, rahed wrote:
Hi
> I use a script called modrm from ExtUtils::Packlist.
$many x $thanx;
Patching it to read a list of module names from @ARGV rather than having to=
hit
return for every module you want to keep is left as an exercise for the=
reader.
Re: Uninstalling Perl modules
am 12.01.2007 10:36:47 von rahed
Ron Savage writes:
> Patching it to read a list of module names from @ARGV rather than
> having to hit return for every module you want to keep is left as an
> exercise for the reader.
Whenever I rarely use the utitily I want to fix it but haven't found
time.
--
Radek
Re: Uninstalling Perl modules
am 13.01.2007 00:21:58 von Ron Savage
On Fri, 12 Jan 2007 20:36:47 +1100, rahed wrote:
Hi
> Whenever I rarely use the utitily I want to fix it but haven't
> found time.
I found it (Note: tabs =3D 4 spaces):
-----><8-----
#!/usr/bin/perl
use strict;
use warnings;
use IO::Dir;
use ExtUtils::Packlist;
use ExtUtils::Installed;
# -----------------------------------------------
sub emptydir($)
{
=09my($dir) = @_;
=09my($dh) =3D IO::Dir->new($dir) || return(0);
=09my(@count) = $dh->read();
=09$dh->close();
=09return (@count == 2 ? 1 : 0);
}
# -----------------------------------------------
die "Usage: $0 A::B ...\n" if (! @ARGV);
print("Finding all installed modules...\n");
my($installed) =3D ExtUtils::Installed->new();
for my $module (grep(!/^Perl$/, $installed -> modules() ) )
{
=09last if (! @ARGV);
=09my $version =3D $installed -> version($module) || '?';
=09if ($ARGV[0] eq $module)
=09{
print "Deleting $module. \n";
shift @ARGV;
# Remove all the files
for my $file (sort $installed -> files($module) )
{
=09print("rm $file\n");
=09unlink($file);
}
my($pf) =3D $installed -> packlist($module) -> packlist_file();
print("rm $pf\n");
unlink($pf);
for my $dir (sort $installed -> directory_tree($module) )
{
=09if (emptydir($dir) )
=09{
print("rmdir $dir\n");
rmdir($dir);
=09}
}
=09}
}
-----><8-----