diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2014-01-07 13:52:44 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2014-01-07 13:52:44 +0000 |
commit | 7d788d24c625cd0fcb60a6301fae417d862e2ac1 (patch) | |
tree | 5efa1178cad629286c1db5e4dffa40888640b050 /usr.sbin | |
parent | 1879057cf755498db1a034915c211a6634797fad (diff) |
scrape support for old +COMMENT file.
8 years of backward compatibility is long enough... :)
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageInfo.pm | 7 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 12 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PkgInfo.pm | 6 |
3 files changed, 7 insertions, 18 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageInfo.pm b/usr.sbin/pkg_add/OpenBSD/PackageInfo.pm index 0eee57e648a..14678647863 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.57 2014/01/07 13:37:23 espie Exp $ +# $OpenBSD: PackageInfo.pm,v 1.58 2014/01/07 13:52:43 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -24,14 +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 COMMENT DESC META + CONTENTS DESC META REQUIRED_BY REQUIRING DISPLAY UNDISPLAY); use OpenBSD::PackageName; use OpenBSD::Paths; use constant { CONTENTS => '+CONTENTS', - COMMENT => '+COMMENT', DESC => '+DESC', META => '+META', REQUIRED_BY => '+REQUIRED_BY', @@ -44,7 +43,7 @@ my $pkg_db = $ENV{"PKG_DBDIR"} || OpenBSD::Paths->pkgdb; my ($list, $stemlist); -our @info = (CONTENTS, COMMENT, DESC, META, REQUIRED_BY, REQUIRING, DISPLAY, UNDISPLAY); +our @info = (CONTENTS, DESC, META, 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 ee7ad35610b..3d89f26bdd8 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.223 2014/01/07 13:37:23 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.224 2014/01/07 13:52:43 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org> # @@ -1699,16 +1699,6 @@ sub copy_deep_if sub may_verify_digest { } -package OpenBSD::PackingElement::FCOMMENT; -our @ISA=qw(OpenBSD::PackingElement::SpecialFile); -sub name() { OpenBSD::PackageInfo::COMMENT } - -sub new -{ - my ($self, @r) = @_; - print STDERR "Warning: obsolete special file: +COMMENT\n"; - $self->SUPER::new(@r); -} package OpenBSD::PackingElement::FDESC; our @ISA=qw(OpenBSD::PackingElement::SpecialFile); diff --git a/usr.sbin/pkg_add/OpenBSD/PkgInfo.pm b/usr.sbin/pkg_add/OpenBSD/PkgInfo.pm index 8a5db9c7367..89697fe31fc 100644 --- a/usr.sbin/pkg_add/OpenBSD/PkgInfo.pm +++ b/usr.sbin/pkg_add/OpenBSD/PkgInfo.pm @@ -1,6 +1,6 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: PkgInfo.pm,v 1.27 2013/01/18 21:19:36 espie Exp $ +# $OpenBSD: PkgInfo.pm,v 1.28 2014/01/07 13:52:43 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org> # @@ -123,7 +123,7 @@ sub print_description my $_; open my $fh, '<', $dir.DESC or return; - $_ = <$fh> unless -f $dir.COMMENT; + $_ = <$fh>; # zap COMMENT while(<$fh>) { chomp; $state->say("#1", $_); @@ -239,7 +239,7 @@ sub get_line sub get_comment { my $d = shift; - return get_line(-f $d.COMMENT? $d.COMMENT : $d.DESC); + return get_line($d.DESC); } sub find_by_spec |