summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2011-08-23 10:32:28 +0000
committerMarc Espie <espie@cvs.openbsd.org>2011-08-23 10:32:28 +0000
commit04721191534aa7d5220260a9e69de7c6baa16edf (patch)
treea3aa44dad48fec2e7d8673d0943aa7b5de441bc3 /usr.sbin/pkg_add
parent8e44ee31375121f076fee2571882207bc8b40e7b (diff)
zap old INSTALL/DEINSTALL stuff, it's been deprecated for 3 years, and removed
from pkg_create for over a year.
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Add.pm9
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Delete.pm10
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackageInfo.pm14
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingElement.pm52
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgAdd.pm7
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgDelete.pm4
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Replace.pm25
-rw-r--r--usr.sbin/pkg_add/pkg_add.18
-rw-r--r--usr.sbin/pkg_add/pkg_delete.18
9 files changed, 19 insertions, 118 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Add.pm b/usr.sbin/pkg_add/OpenBSD/Add.pm
index 91d0502e78b..499c67a7b5d 100644
--- a/usr.sbin/pkg_add/OpenBSD/Add.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Add.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Add.pm,v 1.124 2011/07/12 10:09:52 espie Exp $
+# $OpenBSD: Add.pm,v 1.125 2011/08/23 10:32:27 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -707,13 +707,6 @@ sub copy_info
$self->fullname, $dest, $!);
}
-package OpenBSD::PackingElement::FINSTALL;
-sub install
-{
- my ($self, $state) = @_;
- $self->run($state, 'PRE-INSTALL');
-}
-
package OpenBSD::PackingElement::FCONTENTS;
sub copy_info
{
diff --git a/usr.sbin/pkg_add/OpenBSD/Delete.pm b/usr.sbin/pkg_add/OpenBSD/Delete.pm
index 4276ed1d06e..f3e31e9bb55 100644
--- a/usr.sbin/pkg_add/OpenBSD/Delete.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Delete.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Delete.pm,v 1.115 2011/07/12 10:30:29 espie Exp $
+# $OpenBSD: Delete.pm,v 1.116 2011/08/23 10:32:27 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -667,14 +667,6 @@ sub delete
$self->mark_ldconfig_directory($state);
}
-package OpenBSD::PackingElement::FDEINSTALL;
-sub delete
-{
- my ($self, $state) = @_;
-
- $self->run($state, "DEINSTALL");
-}
-
package OpenBSD::PackingElement::Depend;
sub copy_old_stuff
{
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageInfo.pm b/usr.sbin/pkg_add/OpenBSD/PackageInfo.pm
index 6902f2f237a..55f528f8e52 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackageInfo.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackageInfo.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackageInfo.pm,v 1.55 2011/08/18 07:53:59 espie Exp $
+# $OpenBSD: PackageInfo.pm,v 1.56 2011/08/23 10:32:27 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -23,8 +23,8 @@ require Exporter;
our @ISA=qw(Exporter);
our @EXPORT=qw(installed_packages installed_info installed_name info_names is_info_name installed_stems
lock_db unlock_db
- add_installed delete_installed is_installed borked_package CONTENTS COMMENT DESC INSTALL DEINSTALL REQUIRE
- REQUIRED_BY REQUIRING DISPLAY UNDISPLAY MTREE_DIRS);
+ add_installed delete_installed is_installed borked_package CONTENTS COMMENT DESC
+ REQUIRED_BY REQUIRING DISPLAY UNDISPLAY);
use OpenBSD::PackageName;
use OpenBSD::Paths;
@@ -32,21 +32,17 @@ use constant {
CONTENTS => '+CONTENTS',
COMMENT => '+COMMENT',
DESC => '+DESC',
- INSTALL => '+INSTALL',
- DEINSTALL => '+DEINSTALL',
- REQUIRE => '+REQUIRE',
REQUIRED_BY => '+REQUIRED_BY',
REQUIRING => '+REQUIRING',
DISPLAY => '+DISPLAY',
- UNDISPLAY => '+UNDISPLAY',
- MTREE_DIRS => '+MTREE_DIRS' };
+ UNDISPLAY => '+UNDISPLAY'};
use Fcntl qw/:flock/;
my $pkg_db = $ENV{"PKG_DBDIR"} || OpenBSD::Paths->pkgdb;
my ($list, $stemlist);
-our @info = (CONTENTS, COMMENT, DESC, REQUIRE, INSTALL, DEINSTALL, REQUIRED_BY, REQUIRING, DISPLAY, UNDISPLAY, MTREE_DIRS);
+our @info = (CONTENTS, COMMENT, DESC, REQUIRED_BY, REQUIRING, DISPLAY, UNDISPLAY);
our %info = ();
for my $i (@info) {
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
index a730e70005f..c048418aaee 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackingElement.pm,v 1.199 2011/06/24 22:43:58 espie Exp $
+# $OpenBSD: PackingElement.pm,v 1.200 2011/08/23 10:32:27 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -1631,35 +1631,6 @@ sub category() { OpenBSD::PackageInfo::CONTENTS }
sub write
{}
-package OpenBSD::PackingElement::ScriptFile;
-our @ISA=qw(OpenBSD::PackingElement::SpecialFile);
-use OpenBSD::Error;
-
-sub exec_on_add { 1 }
-sub exec_on_delete { 1 }
-
-sub run
-{
- my ($self, $state, @args) = @_;
-
- my $pkgname = $state->{pkgname};
- my $name = $self->fullname;
-
- return if $state->{dont_run_scripts};
-
- $state->ldconfig->ensure;
- $state->say("#1 script: #2 #3 #4", $self->beautify, $name, $pkgname,
- join(' ', @args)) if $state->verbose >= 2;
- return if $state->{not};
- chmod 0755, $name;
- return if $state->log->system($name, $pkgname, @args) == 0;
- if ($state->defines('scripts')) {
- $state->log->say($self->beautify." script failed");
- } else {
- $state->log->fatal($self->beautify." script failed");
- }
-}
-
package OpenBSD::PackingElement::FCOMMENT;
our @ISA=qw(OpenBSD::PackingElement::SpecialFile);
sub category() { OpenBSD::PackageInfo::COMMENT }
@@ -1668,23 +1639,6 @@ package OpenBSD::PackingElement::FDESC;
our @ISA=qw(OpenBSD::PackingElement::SpecialFile);
sub category() { OpenBSD::PackageInfo::DESC }
-package OpenBSD::PackingElement::FINSTALL;
-our @ISA=qw(OpenBSD::PackingElement::ScriptFile);
-sub exec_on_delete { 0 }
-sub category() { OpenBSD::PackageInfo::INSTALL }
-sub beautify() { "Install" }
-
-package OpenBSD::PackingElement::FDEINSTALL;
-our @ISA=qw(OpenBSD::PackingElement::ScriptFile);
-sub exec_on_add { 0 }
-sub category() { OpenBSD::PackageInfo::DEINSTALL }
-sub beautify() { "Deinstall" }
-
-package OpenBSD::PackingElement::FREQUIRE;
-our @ISA=qw(OpenBSD::PackingElement::ScriptFile);
-sub category() { OpenBSD::PackageInfo::REQUIRE }
-sub beautify() { "Require" }
-
package OpenBSD::PackingElement::DisplayFile;
our @ISA=qw(OpenBSD::PackingElement::SpecialFile);
use OpenBSD::Error;
@@ -1713,10 +1667,6 @@ package OpenBSD::PackingElement::FUNDISPLAY;
our @ISA=qw(OpenBSD::PackingElement::DisplayFile);
sub category() { OpenBSD::PackageInfo::UNDISPLAY }
-package OpenBSD::PackingElement::FMTREE_DIRS;
-our @ISA=qw(OpenBSD::PackingElement::SpecialFile);
-sub category() { OpenBSD::PackageInfo::MTREE_DIRS }
-
package OpenBSD::PackingElement::Arch;
our @ISA=qw(OpenBSD::PackingElement::Unique);
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm b/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm
index 06a6ea24e12..ee1d18953e1 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm
@@ -1,7 +1,7 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgAdd.pm,v 1.31 2011/08/17 10:48:27 espie Exp $
+# $OpenBSD: PkgAdd.pm,v 1.32 2011/08/23 10:32:27 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -104,7 +104,7 @@ sub handle_options
{
my $state = shift;
$state->SUPER::handle_options('ruUzl:A:P:Q:',
- '[-acIinqrsUuvxz] [-A arch] [-B pkg-destdir] [-D name[=value]]',
+ '[-acinqrsUuvxz] [-A arch] [-B pkg-destdir] [-D name[=value]]',
'[-L localbase] [-l file] [-P type] [-Q quick-destdir] pkg-name [...]');
$state->{do_faked} = 0;
@@ -795,9 +795,6 @@ sub really_add
try {
OpenBSD::Add::perform_installation($handle, $state);
- if (!$state->{interrupted} && $plist->has(INSTALL)) {
- $plist->get(INSTALL)->run($state, 'POST-INSTALL');
- }
} catchall {
unless ($state->{interrupted}) {
$state->errsay($_);
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgDelete.pm b/usr.sbin/pkg_add/OpenBSD/PkgDelete.pm
index 5d1b5d4aad1..e6efc43066f 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgDelete.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgDelete.pm
@@ -1,6 +1,6 @@
#!/usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgDelete.pm,v 1.22 2011/08/18 07:55:26 espie Exp $
+# $OpenBSD: PkgDelete.pm,v 1.23 2011/08/23 10:32:27 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -100,7 +100,7 @@ sub handle_options
{
my $state = shift;
$state->SUPER::handle_options('',
- '[-acIinqsvx] [-B pkg-destdir] [-D name[=value]] pkg-name [...]');
+ '[-acinqsvx] [-B pkg-destdir] [-D name[=value]] pkg-name [...]');
my $base = $state->opt('B') // $ENV{'PKG_DESTDIR'} // '';
if ($base ne '') {
diff --git a/usr.sbin/pkg_add/OpenBSD/Replace.pm b/usr.sbin/pkg_add/OpenBSD/Replace.pm
index 55aa46e76b0..373e0a8dcf3 100644
--- a/usr.sbin/pkg_add/OpenBSD/Replace.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Replace.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Replace.pm,v 1.82 2011/06/25 11:10:11 espie Exp $
+# $OpenBSD: Replace.pm,v 1.83 2011/08/23 10:32:27 espie Exp $
#
# Copyright (c) 2004-2010 Marc Espie <espie@openbsd.org>
#
@@ -129,29 +129,6 @@ sub extract
{
}
-package OpenBSD::PackingElement::ScriptFile;
-sub update_issue
-{
- my ($self, $installing) = @_;
- return $self->name." script";
-}
-
-package OpenBSD::PackingElement::FINSTALL;
-sub update_issue
-{
- my ($self, $installing) = @_;
- return if !$installing;
- return $self->SUPER::update_issue($installing);
-}
-
-package OpenBSD::PackingElement::FDEINSTALL;
-sub update_issue
-{
- my ($self, $installing) = @_;
- return if $installing;
- return $self->SUPER::update_issue($installing);
-}
-
package OpenBSD::PackingElement::Exec;
sub update_issue
{
diff --git a/usr.sbin/pkg_add/pkg_add.1 b/usr.sbin/pkg_add/pkg_add.1
index cf6326974a0..f8ffadef025 100644
--- a/usr.sbin/pkg_add/pkg_add.1
+++ b/usr.sbin/pkg_add/pkg_add.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: pkg_add.1,v 1.110 2011/08/17 10:48:27 espie Exp $
+.\" $OpenBSD: pkg_add.1,v 1.111 2011/08/23 10:32:26 espie Exp $
.\"
.\" Documentation and design originally from FreeBSD. All the code has
.\" been rewritten since. We keep the documentation's notice:
@@ -15,7 +15,7 @@
.\" Jordan K. Hubbard
.\"
.\"
-.Dd $Mdocdate: August 17 2011 $
+.Dd $Mdocdate: August 23 2011 $
.Dt PKG_ADD 1
.Os
.Sh NAME
@@ -24,7 +24,7 @@
.Sh SYNOPSIS
.Nm pkg_add
.Bk -words
-.Op Fl acIimnqrsUuvxz
+.Op Fl acimnqrsUuvxz
.Op Fl A Ar arch
.Op Fl B Ar pkg-destdir
.Op Fl D Ar name Ns Op = Ns Ar value
@@ -282,8 +282,6 @@ external scripts may fail.
.It Ar updatedepends
force update even if forward dependencies no longer match.
.El
-.It Fl I
-If scripts exist for a given package, do not execute them.
.It Fl i
Switch on interactive mode.
.Nm
diff --git a/usr.sbin/pkg_add/pkg_delete.1 b/usr.sbin/pkg_add/pkg_delete.1
index 8f41eb941f8..07e2da7cffb 100644
--- a/usr.sbin/pkg_add/pkg_delete.1
+++ b/usr.sbin/pkg_add/pkg_delete.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: pkg_delete.1,v 1.41 2011/08/17 10:48:27 espie Exp $
+.\" $OpenBSD: pkg_delete.1,v 1.42 2011/08/23 10:32:27 espie Exp $
.\"
.\" Documentation and design originally from FreeBSD. All the code has
.\" been rewritten since. We keep the documentation's notice:
@@ -15,7 +15,7 @@
.\" Jordan K. Hubbard
.\"
.\"
-.Dd $Mdocdate: August 17 2011 $
+.Dd $Mdocdate: August 23 2011 $
.Dt PKG_DELETE 1
.Os
.Sh NAME
@@ -23,7 +23,7 @@
.Nd delete software package distributions
.Sh SYNOPSIS
.Nm pkg_delete
-.Op Fl acIimnqsvx
+.Op Fl acimnqsvx
.Op Fl B Ar pkg-destdir
.Op Fl D Ar name Ns Op = Ns Ar value
.Ar pkg-name Op Ar ...
@@ -92,8 +92,6 @@ uninstall even if not running as root.
.It Ar scripts
external scripts may fail.
.El
-.It Fl I
-If scripts exist for a given package, do not execute them.
.It Fl i
Switch on interactive mode.
.Nm