App-Fetchware
view release on metacpan or search on metacpan
bin/fetchware view on Meta::CPAN
The easiest way to be able to uninstall a program you install with fetchware
that does not have a C<make uninstall> is to use the C<prefix> configuration
option to use a separate prefix that everything is installed into this
directory. Then you could specify a custom C<uninstall_commands> that would
delete everything in that directory:
# Set prefix so apache can be easily uninstalled.
prefix '/usr/local/apache';
# Set uninstall_commands to delete everything in the prefix directory when
# apache is uninstalled.
uninstall_commands 'rm -r /usr/local/apache';
Then when you uninstall apache, fetchware deletes its associated files, which
may include your Web site's Web files, so back them up before hand if you need to
keep them.
The other way around this limitation is to use one of the following programs
that use a cool C<LD_PRELOAD> trick to watch what files C<make install> or its
equivelent copy, and where they are copied to. Then these files are put into
some sort of vendor-specific package such as apt-get or rpm.
=over
=item L<checkinstall|http://www.debian-administration.org/articles/147>
Run like C<checkinstall make install> will detect what files are copied where
during installation, and will create a slackware, debian, or redhat package
based on this information.
=item L<paco|http://paco.sourceforge.net/>
Provides very similar functionality to fetchware, but lacks fetchware's lookup
and verify mechanisms. Includes its own package management functionality.
=back
=back
As far as fetchware one day supporting some sort of hack like checkinstall or
paco use, I'm against it. I'd prefer everyone just adding a C<make uninstall> to
their Makefiles. But it is on my todo list, and I may add similar functionality
in the future, but I'll make no promises. Until then consider using the
C<prefix> and C<uninstall_commands> hack.
=head2 list
fetchware list
fetchware list | grep <what are you looking for?>
C<list> just prints out the names of all fetchware packages that have been
installed. It takes no arguments, and currently does not support listing only
packages that match a certain criteria. However, you can just pipe it to
L<grep(1)> to using a regex to limit which packages you're looking for.
=head2 look
fetchware look <package name>
C<look> looks up the specified program using your C<lookup_url>, downloads it,
verifies it, and unarchives it. Then it prints out the location of the
unarchived program, so you can take a look at its code, or install it manually
if you would like to.
=head2 clean
fetchware clean
C<clean> deletes all fetchware temporary files and directories to clean up your
system temporary directory.
You can also specify one or more arguments to C<fetchware clean> to specify what
directories you want fetchware to search for fetchware's left over temp files to
clean up.
=head2 help
Prints out a brief screen full of help messages reminding you of fetchware's
command-line syntax.
=head1 OPTIONS
Fetchware's configuration file options are detailed below.
Most of its options are stored in its configuration file. If none of these
options suite what you need fetchware to do, consider using its Fetchwarefile
to meet your needs. See
L<App::Fetchware/"App::Fetchware'S FETCHWAREFILE CONFIGURATION OPTIONS>
=head2 -v or --verbose
fetchware -v install <some-program.Fetchwarefile>
Fetchware's -v or --verbose option turns on verbose logging, which prints to
STDOUT additional information regarding what fetchware is doing and how
fetchware does it.
If you have any problems with your Fetchwarefile, then you could turn on verbose
mode to have fetchware log additional messages to STDOUT to aid in debugging
your Fetchwarefile.
=head2 -q or --quite
fetchware -q upgrade <some-program>
The -q or --quite option tells fetchware to B<not> log anything at all.
Fetchware will even prevent any commands it runs from printing output to your
terminal's STDOUT to avoid cluttering up your screen.
Any warnings or error messages are still printed to STDERR.
To determine if fetchware succeeded or failed you can test its exit status:
fetchware -q upgrade <some-program>
echo $?
0
Fetchware exits 0 for success and non-zero for failure.
( run in 0.649 second using v1.01-cache-2.11-cpan-39bf76dae61 )