From: espie Date: Tue, 7 Jan 2014 13:52:43 +0000 (+0000) Subject: scrape support for old +COMMENT file. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=640de819588e1db64f809106cef9a42b1e279dac;p=openbsd scrape support for old +COMMENT file. 8 years of backward compatibility is long enough... :) --- 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 # @@ -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 # @@ -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 # @@ -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