summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/pkg_delete
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/pkg_add/pkg_delete')
-rw-r--r--usr.sbin/pkg_add/pkg_delete16
1 files changed, 14 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/pkg_delete b/usr.sbin/pkg_add/pkg_delete
index 9ac3c9c4a75..e1d42b11723 100644
--- a/usr.sbin/pkg_add/pkg_delete
+++ b/usr.sbin/pkg_add/pkg_delete
@@ -1,6 +1,6 @@
#!/usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: pkg_delete,v 1.26 2004/07/18 12:00:21 espie Exp $
+# $OpenBSD: pkg_delete,v 1.27 2004/07/20 18:58:41 espie Exp $
#
# Copyright (c) 2003 Marc Espie.
#
@@ -65,7 +65,7 @@ sub remove_dirs
next if defined $remaining->{$d};
my $realname = $state->{destdir}.$d;
if (!rmdir $realname) {
- print "Error deleting directory $realname\n";
+ print "Error deleting directory $realname: $!\n";
}
}
}
@@ -174,6 +174,18 @@ sub delete
}
}
+package OpenBSD::PackingElement::InfoFile;
+use File::Basename;
+sub delete
+{
+ my ($self, $state) = @_;
+ unless ($state->{not}) {
+ my $fullname = $state->{destdir}.$self->fullname();
+ system("install-info", "--delete", "--info-dir=".dirname($fullname), $fullname);
+ }
+ $self->SUPER::delete($state);
+}
+
package OpenBSD::PackingElement::Extra;
sub delete
{