have quirks behave way more like other packages so it can have dependencies
authorespie <espie@openbsd.org>
Tue, 2 Jan 2024 10:25:48 +0000 (10:25 +0000)
committerespie <espie@openbsd.org>
Tue, 2 Jan 2024 10:25:48 +0000 (10:25 +0000)
usr.sbin/pkg_add/OpenBSD/PkgAdd.pm

index 094db80..056b37c 100644 (file)
@@ -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 <espie@openbsd.org>
 #
@@ -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";