[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-Porters] Identifying Ported Modules




On Wed, 12 Jan 2000, Chris Nandor wrote:

> At 22.49 -0600 2000.01.11, Matthew Langford wrote:
> >CPAN.pm has all the information it needs to un-install:  it knows exactly
> >what will go where, and it can find out what is pre-existing.  All it
> >needs is to save this list of copied files, a list of files which were
> >saved because they were being replaced, and the saved files themselves.
> >All these can be bundled up and compressed, and saved in an uninstall
> >cache folder.  CPAN.pm could treat this like the sources/build caches, and
> >ask when it gets ready to wipe out an older uninstall.
> 
> Not really, because on all other platforms aside from Mac OS, the actual
> action of deciding what files get installed is handled by make, not perl
> and CPAN.pm.  ...
<snip>

Yes, but Perl generates the Makefile from Makefile.PL, right?  So Perl is
back in charge.  MakeMaker, as part of the "make install" target, inserts
checks for the existence of files before it inserts copy commands.  
Actually, it should probably call a Perl fragment to do the check for
files-to-be-overwritten, copying those files to a newly created uninstall
directory, do the actual copying of the install files, and the writing of
the two log files or file fragment.  I don't know where it would get set,
but the user could tell MakeMaker whether or not to compress the newly
created uninstall tree.  Time/space tradeoff.

Okay, it's clear I've wandered from the notion of CPAN.pm providing the
uninstall.  The uninstall cache (which is the folder into which MakeMaker
is dumping uninstall trees) could still be managed by CPAN on startup. But
some use CPAN.pm infrequently compared to conventional download and
install-by-hand.  So, you could build it into the fragment inside
MakeMaker:  after an install, it could check the cache folder size.  If it
exceeds the limit size, ExtUtils::Uninstall.pm could draw up a list of
candidates to delete.  (The code for this would likely be lifted from
CPAN.pm's cache management as a start point.)


I'll stop blathering about this, because frankly I'm just blue-skying, and
I don't really care enough to build it.  It could be done, though, so I
thought I'd throw out a sample proof-by-example.



--
MattLangford 


==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-porters-request@macperl.org