summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2006-07-31 17:09:20 +0000
committerMarc Espie <espie@cvs.openbsd.org>2006-07-31 17:09:20 +0000
commit5221282c5b55cebf1b9908c506ff0d77640ba978 (patch)
tree7c9d0bfb455ba5c27f6a3321e63be636cb94f080 /usr.sbin
parentc0c949e7e5385075b541ac0082adce5f5e1fa0ab (diff)
cosmetic: comments, and better method name.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/ArcCheck.pm13
-rw-r--r--usr.sbin/pkg_add/OpenBSD/SharedItems.pm6
2 files changed, 14 insertions, 5 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm b/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm
index c543a023a71..ff482758cf4 100644
--- a/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm
+++ b/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: ArcCheck.pm,v 1.3 2005/09/24 12:52:19 espie Exp $
+# $OpenBSD: ArcCheck.pm,v 1.4 2006/07/31 17:09:19 espie Exp $
#
# Copyright (c) 2005 Marc Espie <espie@openbsd.org>
#
@@ -15,10 +15,16 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-# Supplementary code to handle archives.
+# Supplementary code to handle archives in the package context.
+# Contrarily to GNU-tar, we do not change the archive format, but by
+# convention, the names LongName\d+ and LongLink\d correspond to names
+# too long to fit. The actual names reside in the PLIST, but the archive
+# is still a valid archive.
+#
package OpenBSD::Ustar::Object;
+# match archive header name against PackingElement item
sub check_name
{
my ($self, $item) = @_;
@@ -30,6 +36,7 @@ sub check_name
return 0;
}
+# match archive header link name against actual link names
sub check_linkname
{
my ($self, $linkname) = @_;
@@ -48,6 +55,7 @@ sub check_linkname
return 0;
}
+# copy long items, avoiding duplicate long names.
sub copy_long
{
my ($self, $wrarc) = @_;
@@ -63,6 +71,7 @@ sub copy_long
package OpenBSD::Ustar;
+# prepare item and introduce long names where needed.
sub prepare_long
{
my ($self, $item) = @_;
diff --git a/usr.sbin/pkg_add/OpenBSD/SharedItems.pm b/usr.sbin/pkg_add/OpenBSD/SharedItems.pm
index 27429a0340e..85f0ee21d99 100644
--- a/usr.sbin/pkg_add/OpenBSD/SharedItems.pm
+++ b/usr.sbin/pkg_add/OpenBSD/SharedItems.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: SharedItems.pm,v 1.5 2004/11/27 12:07:58 espie Exp $
+# $OpenBSD: SharedItems.pm,v 1.6 2006/07/31 17:09:19 espie Exp $
#
# Copyright (c) 2004 Marc Espie <espie@openbsd.org>
#
@@ -24,7 +24,7 @@ use OpenBSD::Error;
use OpenBSD::PackageInfo;
use OpenBSD::PackingList;
-sub record_all
+sub find_items_in_installed_packages
{
my $db = {dirs=>{}, users=>{}, groups=>{}};
my @list = installed_packages();
@@ -49,7 +49,7 @@ sub cleanup
my $u = $state->{users_to_rm};
my $g = $state->{groups_to_rm};
return unless defined $h or defined $u or defined $g;
- my $remaining = record_all();
+ my $remaining = find_items_in_installed_packages();
OpenBSD::ProgressMeter::clear();
OpenBSD::ProgressMeter::set_header("Clean shared items");