From eeb27f00a8dbebb812c6dae2c78758271553fe4d Mon Sep 17 00:00:00 2001 From: espie Date: Sat, 12 Jul 2014 19:50:43 +0000 Subject: [PATCH] finish killing old experiment, less confusing code --- usr.sbin/pkg_add/OpenBSD/Add.pm | 7 +------ usr.sbin/pkg_add/OpenBSD/PkgAdd.pm | 19 +++---------------- usr.sbin/pkg_add/OpenBSD/PkgDelete.pm | 5 +---- 3 files changed, 5 insertions(+), 26 deletions(-) diff --git a/usr.sbin/pkg_add/OpenBSD/Add.pm b/usr.sbin/pkg_add/OpenBSD/Add.pm index 5bf5fabfd6d..e94596b9224 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.160 2014/07/11 12:49:20 espie Exp $ +# $OpenBSD: Add.pm,v 1.161 2014/07/12 19:50:43 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie # @@ -482,10 +482,6 @@ sub prepare_to_extract $file->set_name($fullname); $file->{destdir} = $destdir; - # faked installation are VERY weird - if (defined $self->{symlink} && $state->{do_faked}) { - $file->{linkname} = $destdir.$file->{linkname}; - } } sub tie @@ -810,7 +806,6 @@ sub install { my ($self, $state) = @_; $self->SUPER::install($state); - return if $state->{do_faked}; $self->mark_ldconfig_directory($state); } diff --git a/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm b/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm index 8c022f8b964..deeec7d674a 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.68 2014/07/10 21:12:33 espie Exp $ +# $OpenBSD: PkgAdd.pm,v 1.69 2014/07/12 19:50:43 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie # @@ -107,17 +107,10 @@ sub handle_options my $state = shift; $state->SUPER::handle_options('ruUzl:A:P:Q:', '[-acinqrsUuvxz] [-A arch] [-B pkg-destdir] [-D name[=value]]', - '[-L localbase] [-l file] [-P type] [-Q quick-destdir] pkg-name [...]'); + '[-L localbase] [-l file] [-P type] pkg-name [...]'); - $state->{do_faked} = 0; $state->{arch} = $state->opt('A'); - if (defined $state->opt('Q') and defined $state->opt('B')) { - $state->usage("-Q and -B are incompatible options"); - } - if (defined $state->opt('Q') and defined $state->opt('r')) { - $state->usage("-r and -Q are incompatible options"); - } if ($state->opt('P')) { if ($state->opt('P') eq 'cdrom') { $state->{cdrom_only} = 1; @@ -129,10 +122,7 @@ sub handle_options $state->usage("bad option: -P #1", $state->opt('P')); } } - if (defined $state->opt('Q')) { - $state->{destdir} = $state->opt('Q'); - $state->{do_faked} = 1; - } elsif (defined $state->opt('B')) { + if (defined $state->opt('B')) { $state->{destdir} = $state->opt('B'); } if (defined $state->{destdir}) { @@ -270,9 +260,6 @@ sub setup_header $state->{lastheader} = $header; $state->print("#1", $header); $state->print("(pretending) ") if $state->{not}; - if ($state->{do_faked}) { - $state->print(" under #1", $state->{destdir}); - } $state->print("\n"); } } diff --git a/usr.sbin/pkg_add/OpenBSD/PkgDelete.pm b/usr.sbin/pkg_add/OpenBSD/PkgDelete.pm index c79f09f49d8..582444d0ffc 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.32 2014/02/11 08:58:34 sthen Exp $ +# $OpenBSD: PkgDelete.pm,v 1.33 2014/07/12 19:50:43 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie # @@ -163,9 +163,6 @@ sub setup_header $state->{lastheader} = $header; $state->print("#1", $header); $state->print("(pretending) ") if $state->{not}; - if ($state->{do_faked}) { - $state->print(" under #1", $state->{destdir}); - } $state->print("\n"); } } -- 2.20.1