also don't emit the same string twice.
This commit is contained in:
parent
440e182e81
commit
599f0be88c
@ -1,5 +1,5 @@
|
|||||||
#! /usr/bin/perl
|
#! /usr/bin/perl
|
||||||
# $OpenBSD: resolve-lib,v 1.3 2011/11/15 20:02:38 espie Exp $
|
# $OpenBSD: resolve-lib,v 1.4 2011/11/17 23:14:43 espie Exp $
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001-2010 Marc Espie <espie@openbsd.org>
|
# Copyright (c) 2001-2010 Marc Espie <espie@openbsd.org>
|
||||||
#
|
#
|
||||||
@ -33,6 +33,7 @@ use OpenBSD::Paths;
|
|||||||
my $LOCALBASE = $ENV{LOCALBASE} // '/usr/local';
|
my $LOCALBASE = $ENV{LOCALBASE} // '/usr/local';
|
||||||
my $error = 0;
|
my $error = 0;
|
||||||
my ($noshared, $needed, $silent) = @_;
|
my ($noshared, $needed, $silent) = @_;
|
||||||
|
my $emited = {};
|
||||||
|
|
||||||
sub solve_spec
|
sub solve_spec
|
||||||
{
|
{
|
||||||
@ -51,7 +52,11 @@ sub solve_spec
|
|||||||
unless $silent;
|
unless $silent;
|
||||||
$error = 1;
|
$error = 1;
|
||||||
} else {
|
} else {
|
||||||
print $spec->key, $r->version, "\n" unless $silent;
|
my $string = $spec->key.$r->version;
|
||||||
|
unless ($emited->{$string}) {
|
||||||
|
$emited->{$string} = 1;
|
||||||
|
print $string, "\n" unless $silent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user