From afe6de1364f5455b33ea6ffbdddf6951deb27e6b Mon Sep 17 00:00:00 2001 From: espie Date: Sat, 11 Jan 2014 11:51:01 +0000 Subject: [PATCH] a bit of spring cleanup in advance: scrape old stuff that's not really used. --- usr.sbin/pkg_add/OpenBSD/Add.pm | 12 +-- usr.sbin/pkg_add/OpenBSD/PackageInfo.pm | 8 +- usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 74 +------------------ usr.sbin/pkg_add/OpenBSD/PackingList.pm | 6 +- usr.sbin/pkg_add/OpenBSD/Update.pm | 10 +-- usr.sbin/pkg_add/pkg_create.1 | 10 +-- .../pkg_add/pod/OpenBSD::PackingElement.pod | 4 +- 7 files changed, 14 insertions(+), 110 deletions(-) diff --git a/usr.sbin/pkg_add/OpenBSD/Add.pm b/usr.sbin/pkg_add/OpenBSD/Add.pm index 1bc22671cb0..352d7dd3dfd 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.140 2014/01/09 20:20:01 espie Exp $ +# $OpenBSD: Add.pm,v 1.141 2014/01/11 11:51:01 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie # @@ -103,7 +103,6 @@ sub perform_installation my ($handle, $state) = @_; $state->{archive} = $handle->{location}; - $state->{end_faked} = 0; $handle->{partial} //= {}; $state->{partial} = $handle->{partial}; $state->progress->visit_with_size($handle->{plist}, 'install', $state); @@ -473,15 +472,6 @@ sub install $self->SUPER::install($state); } -package OpenBSD::PackingElement::EndFake; -sub install -{ - my ($self, $state) = @_; - - $self->SUPER::install($state); - $state->{end_faked} = 1; -} - package OpenBSD::PackingElement::Sample; use OpenBSD::Error; use File::Copy; diff --git a/usr.sbin/pkg_add/OpenBSD/PackageInfo.pm b/usr.sbin/pkg_add/OpenBSD/PackageInfo.pm index 590449ab8e4..4541cbdd518 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.59 2014/01/09 20:20:01 espie Exp $ +# $OpenBSD: PackageInfo.pm,v 1.60 2014/01/11 11:51:01 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie # @@ -24,15 +24,13 @@ 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 DESC META - REQUIRED_BY REQUIRING DISPLAY UNDISPLAY); + CONTENTS DESC REQUIRED_BY REQUIRING DISPLAY UNDISPLAY); use OpenBSD::PackageName; use OpenBSD::Paths; use constant { CONTENTS => '+CONTENTS', DESC => '+DESC', - META => '+META', REQUIRED_BY => '+REQUIRED_BY', REQUIRING => '+REQUIRING', DISPLAY => '+DISPLAY', @@ -43,7 +41,7 @@ my $pkg_db = $ENV{"PKG_DBDIR"} || OpenBSD::Paths->pkgdb; my ($list, $stemlist); -our @info = (CONTENTS, DESC, META, REQUIRED_BY, REQUIRING, DISPLAY, UNDISPLAY); +our @info = (CONTENTS, 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 f7a80fb309a..5da3a022702 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.226 2014/01/09 20:20:01 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.227 2014/01/11 11:51:01 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie # @@ -853,12 +853,8 @@ sub new return OpenBSD::PackingElement::ManualInstallation->new; } elsif ($args eq 'firmware') { return OpenBSD::PackingElement::Firmware->new; - } elsif ($args eq 'system-package') { - return OpenBSD::PackingElement::SystemPackage->new; } elsif ($args eq 'always-update') { return OpenBSD::PackingElement::AlwaysUpdate->new; - } elsif ($args eq 'explicit-update') { - return OpenBSD::PackingElement::ExplicitUpdate->new; } else { die "Unknown option: $args"; } @@ -898,11 +894,6 @@ package OpenBSD::PackingElement::Firmware; our @ISA=qw(OpenBSD::PackingElement::ManualInstallation); sub category() { 'firmware' } -package OpenBSD::PackingElement::SystemPackage; -our @ISA=qw(OpenBSD::PackingElement::UniqueOption); - -sub category() { 'system-package' } - package OpenBSD::PackingElement::AlwaysUpdate; our @ISA=qw(OpenBSD::PackingElement::UniqueOption); @@ -911,13 +902,6 @@ sub category() 'always-update'; } -package OpenBSD::PackingElement::ExplicitUpdate; -our @ISA=qw(OpenBSD::PackingElement::UniqueOption); - -sub category() -{ - 'explicit-update'; -} # The special elements that don't end in the right place package OpenBSD::PackingElement::ExtraInfo; our @ISA=qw(OpenBSD::PackingElement::Unique OpenBSD::PackingElement::Comment); @@ -1043,26 +1027,6 @@ sub category() { "wantlib" } sub keyword() { "wantlib" } __PACKAGE__->register_with_factory; -sub destate -{ - my ($self, $state) = @_; - $state->{lastchecksummable} = $self; -} - -sub write -{ - my ($self, $fh) = @_; - $self->SUPER::write($fh); - if (defined $self->{d}) { - $self->{d}->write($fh); - } -} - -sub add_digest -{ - &OpenBSD::PackingElement::FileBase::add_digest; -} - OpenBSD::Auto::cache(spec, sub { my $self = shift; @@ -1089,13 +1053,6 @@ sub subdir return shift->{name}; } -package OpenBSD::PackingElement::Incompatibility; -our @ISA=qw(OpenBSD::PackingElement::Meta); - -sub keyword() { "incompatibility" } -__PACKAGE__->register_with_factory; -sub category() { "incompatibility" } - package OpenBSD::PackingElement::AskUpdate; our @ISA=qw(OpenBSD::PackingElement::Meta); @@ -1125,13 +1082,6 @@ OpenBSD::Auto::cache(spec, return OpenBSD::PkgSpec->new($self->{pattern}) }); -package OpenBSD::PackingElement::UpdateSet; -our @ISA=qw(OpenBSD::PackingElement::Meta); - -sub keyword() { "updateset" } -__PACKAGE__->register_with_factory; -sub category() { "updateset" } - package OpenBSD::PackingElement::NewAuth; our @ISA=qw(OpenBSD::PackingElement::Action); @@ -1240,21 +1190,6 @@ sub destate $state->set_cwd($self->name); } -package OpenBSD::PackingElement::EndFake; -our @ISA=qw(OpenBSD::PackingElement::State); - - -sub keyword() { 'endfake' } -__PACKAGE__->register_with_factory; - -sub new -{ - my ($class, @args) = @_; - bless {}, $class; -} - -sub stringize() { '' } - package OpenBSD::PackingElement::Owner; our @ISA=qw(OpenBSD::PackingElement::State); @@ -1704,10 +1639,6 @@ package OpenBSD::PackingElement::FDESC; our @ISA=qw(OpenBSD::PackingElement::SpecialFile); sub name() { OpenBSD::PackageInfo::DESC } -package OpenBSD::PackingElement::FMETA; -our @ISA=qw(OpenBSD::PackingElement::SpecialFile); -sub name() { OpenBSD::PackageInfo::META } - package OpenBSD::PackingElement::DisplayFile; our @ISA=qw(OpenBSD::PackingElement::SpecialFile); use OpenBSD::Error; @@ -1790,7 +1721,6 @@ our @ISA=qw(OpenBSD::PackingElement::Unique); sub keyword() { 'signer' } __PACKAGE__->register_with_factory; sub category() { "signer" } - sub new { my ($class, $args) = @_; @@ -1909,7 +1839,7 @@ sub register_old_keyword } for my $k (qw(src display mtree ignore_inst dirrm pkgcfl pkgdep newdepend - libdepend ignore vendor)) { + libdepend endfake ignore vendor incompatibility)) { __PACKAGE__->register_old_keyword($k); } diff --git a/usr.sbin/pkg_add/OpenBSD/PackingList.pm b/usr.sbin/pkg_add/OpenBSD/PackingList.pm index 9327928e010..1aac338a56d 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackingList.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackingList.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackingList.pm,v 1.128 2014/01/09 20:20:01 espie Exp $ +# $OpenBSD: PackingList.pm,v 1.129 2014/01/11 11:51:01 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie # @@ -440,10 +440,10 @@ sub match_pkgpath } our @unique_categories = - (qw(name url signer digital-signature no-default-conflict manual-installation firmware always-update explicit-update extrainfo localbase arch)); + (qw(name url signer digital-signature no-default-conflict manual-installation firmware always-update extrainfo localbase arch)); our @list_categories = - (qw(conflict pkgpath incompatibility ask-update updateset depend + (qw(conflict pkgpath ask-update depend wantlib define-tag groups users items)); our @cache_categories = diff --git a/usr.sbin/pkg_add/OpenBSD/Update.pm b/usr.sbin/pkg_add/OpenBSD/Update.pm index de29d00a1a1..273897c22be 100644 --- a/usr.sbin/pkg_add/OpenBSD/Update.pm +++ b/usr.sbin/pkg_add/OpenBSD/Update.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Update.pm,v 1.157 2014/01/09 20:20:01 espie Exp $ +# $OpenBSD: Update.pm,v 1.158 2014/01/11 11:51:01 espie Exp $ # # Copyright (c) 2004-2014 Marc Espie # @@ -108,8 +108,7 @@ sub process_handle $state->fatal("can't locate #1", $pkgname); } - if ($plist->has('explicit-update') && $state->{allupdates} || - $plist->has('firmware') && !$state->defines('FW_UPDATE')) { + if ($plist->has('firmware') && !$state->defines('FW_UPDATE')) { $h->{update_found} = $h; $set->move_kept($h); return 0; @@ -177,11 +176,6 @@ sub process_handle push(@skipped_locs, $loc); next } - if ($p2->has('explicit-update') && $state->{allupdates}) { - $oldfound = 1; - $loc->forget; - next; - } my $r = $plist->signature->compare($p2->signature); if (defined $r && $r > 0 && !$state->defines('downgrade')) { $oldfound = 1; diff --git a/usr.sbin/pkg_add/pkg_create.1 b/usr.sbin/pkg_add/pkg_create.1 index 869eb49c8e1..cac2d04d9bc 100644 --- a/usr.sbin/pkg_add/pkg_create.1 +++ b/usr.sbin/pkg_add/pkg_create.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: pkg_create.1,v 1.91 2014/01/08 16:15:45 jmc Exp $ +.\" $OpenBSD: pkg_create.1,v 1.92 2014/01/11 11:51:01 espie Exp $ .\" .\" Documentation and design originally from FreeBSD. All the code has .\" been rewritten since. We keep the documentation's notice: @@ -21,7 +21,7 @@ .\" [jkh] Took John's changes back and made some additional extensions for .\" better integration with FreeBSD's new ports collection. .\" -.Dd $Mdocdate: January 8 2014 $ +.Dd $Mdocdate: January 11 2014 $ .Dt PKG_CREATE 1 .Os .Sh NAME @@ -658,12 +658,6 @@ uses some simplified information to decide whether an installed package needs updating. With this option, the package is updated whenever anything changes. To be used sparingly, as this is more expensive. -.It Ar explicit-update -packages tagged with this option, either in the installed version or in an -update candidate, won't be considered during a global update. -User has to explicitly ask to update them. -Typical use is for firmware packages, whose updates are usually tied to -kernel changes. .It Ar no-default-conflict By default, a package conflicts with other versions of the same package. With this option, the older package version will still be noticed, but the diff --git a/usr.sbin/pkg_add/pod/OpenBSD::PackingElement.pod b/usr.sbin/pkg_add/pod/OpenBSD::PackingElement.pod index f9aad797d1b..c2413719abd 100644 --- a/usr.sbin/pkg_add/pod/OpenBSD::PackingElement.pod +++ b/usr.sbin/pkg_add/pod/OpenBSD::PackingElement.pod @@ -1,4 +1,4 @@ -$OpenBSD: OpenBSD::PackingElement.pod,v 1.10 2010/06/30 10:51:04 espie Exp $ +$OpenBSD: OpenBSD::PackingElement.pod,v 1.11 2014/01/11 11:51:01 espie Exp $ =head1 NAME @@ -387,8 +387,6 @@ surrounding objects (mostly derived from C<::FileObject>). change the current working directory. -=item ::EndFake - =item ::Owner change the current file owner. -- 2.20.1