From: espie Date: Tue, 2 Jan 2024 10:25:48 +0000 (+0000) Subject: have quirks behave way more like other packages so it can have dependencies X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b1f70f86658ca1762336e4d0f9cf924077002d83;p=openbsd have quirks behave way more like other packages so it can have dependencies --- diff --git a/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm b/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm index 094db806830..056b37cbb17 100644 --- a/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm +++ b/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm @@ -1,7 +1,7 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: PkgAdd.pm,v 1.149 2023/12/03 16:38:28 espie Exp $ +# $OpenBSD: PkgAdd.pm,v 1.150 2024/01/02 10:25:48 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie # @@ -1164,11 +1164,17 @@ sub quirk_set($state) sub do_quirks($self, $state) { - my $set = quirk_set($state); - $self->process_set($set, $state); + my $list = [quirk_set($state)]; + $state->tracker->todo(@$list); + while (my $set = shift @$list) { + $state->status->what->set($set); + $set = $set->real_set; + next if $set->{finished}; + $state->progress->set_header('Checking packages'); + unshift(@$list, $self->process_set($set, $state)); + } } - sub process_parameters($self, $state) { my $add_hints = $state->{fuzzy} ? "add_hints" : "add_hints2";