use new interface to PackageLocator

This commit is contained in:
espie 2005-09-19 21:12:27 +00:00
parent 0f6031fd50
commit 715995a25c

View File

@ -1,6 +1,6 @@
#! /usr/bin/perl
# $OpenBSD: register-plist,v 1.3 2005/09/09 08:20:37 espie Exp $
# $OpenBSD: register-plist,v 1.4 2005/09/19 21:12:27 espie Exp $
# Copyright (c) 2005
# Marc Espie. All rights reserved.
# Redistribution and use in source and binary forms, with or without
@ -29,7 +29,6 @@ use strict;
use OpenBSD::PackageLocator;
use OpenBSD::PackageInfo;
use OpenBSD::PackingList;
use File::Path;
use File::Compare;
package OpenBSD::PackingElement;
@ -104,8 +103,7 @@ for my $pkgfile (@ARGV) {
die "Bad package $pkgfile";
}
my $infodir = $pkg->info();
my $plist = OpenBSD::PackingList->fromfile($infodir.CONTENTS);
my $plist = $pkg->plist();
undef $plist->{ OpenBSD::PackageInfo::COMMENT };
my $l = $plist->{items};
@ -116,7 +114,7 @@ for my $pkgfile (@ARGV) {
$plist->visit('forget_details');
$pkg->close();
rmtree($infodir);
$pkg->wipe_info();
for my $dir (@dirs) {
next unless -d $dir;
my $result = $dir.'/'.$plist->pkgname();