summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2018-09-04 14:46:13 +0000
committerMarc Espie <espie@cvs.openbsd.org>2018-09-04 14:46:13 +0000
commit163f0b098d520eaea15d02c30c701635b427032a (patch)
tree42372b5ba24fafe9b2c7a2a3e7bda1d76cb2cb8a /usr.sbin/pkg_add
parentb759aa957ef6f275a7230c7af9c49641b478435e (diff)
move readmes detection to find_extractible, so that only changed/new readmes
are recorded. Be more specific and list those readmes in alphabetic order at end.
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Add.pm11
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingElement.pm9
2 files changed, 12 insertions, 8 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Add.pm b/usr.sbin/pkg_add/OpenBSD/Add.pm
index 2bfb909e246..2e58b3f1af2 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.176 2018/06/22 13:58:55 espie Exp $
+# $OpenBSD: Add.pm,v 1.177 2018/09/04 14:46:12 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
@@ -150,6 +150,11 @@ sub perform_extraction
$file->name);
}
delete $wanted->{$file->name};
+ my $fullname = $e->fullname;
+ if ($fullname =~ m,^$state->{localbase}/share/doc/pkg-readmes/,) {
+ push(@{$state->{readmes}}, $fullname);
+ }
+
$e->prepare_to_extract($state, $file);
$e->extract($state, $file);
$p->advance($e);
@@ -541,10 +546,6 @@ sub install
$self->SUPER::install($state);
my $fullname = $self->fullname;
my $destdir = $state->{destdir};
- if ($fullname =~ m,^$state->{localbase}/share/doc/pkg-readmes/,) {
- $state->{readmes}++;
- }
-
if ($state->{not}) {
$state->say("moving tempfile -> #1",
$destdir.$fullname) if $state->verbose >= 5;
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
index df84aef443a..6355162c2c6 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.267 2018/08/03 06:49:26 espie Exp $
+# $OpenBSD: PackingElement.pm,v 1.268 2018/09/04 14:46:12 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
@@ -183,8 +183,11 @@ sub finish
my ($class, $state) = @_;
OpenBSD::PackingElement::Fontdir->finish($state);
OpenBSD::PackingElement::RcScript->report($state);
- if ($state->{readmes}) {
- $state->say("Look in #1/share/doc/pkg-readmes for extra documentation.", $state->{localbase});
+ if (defined $state->{readmes}) {
+ $state->say("New and changed readme(s):");
+ for my $file (sort @{$state->{readmes}}) {
+ $state->say("\t#1", $file);
+ }
}
}