summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/PackingList.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2004-10-11 14:25:29 +0000
committerMarc Espie <espie@cvs.openbsd.org>2004-10-11 14:25:29 +0000
commit2f220531709bfcce324be894c4a6688b2f09c9de (patch)
treec76784d9d0e2508820608d0fe876f9af7e209ed5 /usr.sbin/pkg_add/OpenBSD/PackingList.pm
parent8c187667526f0b92c160389dc487070b374f04bb (diff)
remove special `visiting order' when writing packing-lists.
Add implicit '.' cwd at beginning of packing-list. so that special files get registered at front of packing-list before any cwd occurs (and they get in the same order as stuff gets written through tar).
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackingList.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingList.pm25
1 files changed, 5 insertions, 20 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingList.pm b/usr.sbin/pkg_add/OpenBSD/PackingList.pm
index 2592731fa09..ea14dd9d647 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.27 2004/10/11 14:11:42 espie Exp $
+# $OpenBSD: PackingList.pm,v 1.28 2004/10/11 14:25:28 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -28,7 +28,8 @@ sub new
bless {state =>
{default_owner=>'root',
default_group=>'bin',
- default_mode=> 0444} }, $class;
+ default_mode=> 0444,
+ cwd=>'.'} }, $class;
}
sub read
@@ -126,24 +127,8 @@ sub write
{
my ($self, $fh) = @_;
- if (defined $self->{cvstags}) {
- for my $item (@{$self->{cvstags}}) {
- $item->write($fh);
- }
- }
- for my $unique_item (qw(name no-default-conflict manual-installation extrainfo arch)) {
- $self->{$unique_item}->write($fh) if defined $self->{$unique_item};
- }
- for my $listname (qw(modules pkgcfl conflict pkgdep newdepend libdepend groups users items)) {
- if (defined $self->{$listname}) {
- for my $item (@{$self->{$listname}}) {
- $item->write($fh);
- }
- }
- }
- for my $special (OpenBSD::PackageInfo::info_names()) {
- $self->{$special}->write($fh) if defined $self->{$special};
- }
+ $self->visit('write', $fh);
+
}