Update of /cvsroot/fink/experimental/thesin/finkmods
In directory usw-pr-cvs1:/tmp/cvs-serv22117
Added Files:
fink-purge.patch
Log Message:
adding a true purge command
--- NEW FILE: fink-purge.patch ---
diff -ruN fink/fink.in fink.new/fink.in
--- fink/fink.in 2002-08-04 05:51:18.000000000 -0600
+++ fink.new/fink.in 2002-08-16 08:45:59.000000000 -0600
@@ -76,6 +76,7 @@
Common commmands:
install - install/update the named packages
remove - remove the named packages
+ purge - same as remove and also purges all configuration files
update - update the named packages
selfupdate - upgrade fink to the lastest release
update-all - update all installed packages
diff -ruN fink/perlmod/Fink/Engine.pm fink.new/perlmod/Fink/Engine.pm
--- fink/perlmod/Fink/Engine.pm 2002-08-04 19:26:32.000000000 -0600
+++ fink.new/perlmod/Fink/Engine.pm 2002-08-16 08:41:31.000000000 -0600
@@ -71,7 +71,8 @@
'unuse' => [\&cmd_remove, 1, 1],
'remove' => [\&cmd_remove, 1, 1],
'delete' => [\&cmd_remove, 1, 1],
- 'purge' => [\&cmd_remove, 1, 1],
+ 'purge' => [\&cmd_purge, 1, 1],
+ 'fullremove' => [\&cmd_purge, 1, 1],
'apropos' => [\&cmd_apropos, 0, 0],
'describe' => [\&cmd_description, 1, 0],
'description' => [\&cmd_description, 1, 0],
@@ -584,6 +585,32 @@
Fink::Status->invalidate();
}
+sub cmd_purge {
+ my ($package, @plist, $pnames, $answer);
+
+ @plist = &expand_packages(@_);
+ if ($#plist < 0) {
+ die "no package specified for command 'purge'!\n";
+ }
+
+ $pnames = "";
+ foreach $package (@plist) {
+ $pnames = $pnames." ".$package->get_name();
+ }
+ print "WARNING: this command will remove the package(s) and remove any\n";
+ print " global configure files, even if you modified them!\n\n";
+
+ $answer = &prompt_boolean("Do you want to continue?", 1);
+ if (! $answer) {
+ die "Purge not performed\n";
+ } else {
+ if (&execute("dpkg --purge ".$pnames)) {
+ die "can't purge package(s)\n";
+ }
+ }
+ Fink::Status->invalidate();
+}
+
sub cmd_validate {
my ($filename, @flist);
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Fink-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-commits