summaryrefslogtreecommitdiffstats
path: root/lib/App
diff options
context:
space:
mode:
Diffstat (limited to 'lib/App')
-rw-r--r--lib/App/ArchLinux/PackagerTools.pm5
-rw-r--r--lib/App/ArchLinux/PackagerTools/Config.pm2
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/App/ArchLinux/PackagerTools.pm b/lib/App/ArchLinux/PackagerTools.pm
index fa246e6..83b357a 100644
--- a/lib/App/ArchLinux/PackagerTools.pm
+++ b/lib/App/ArchLinux/PackagerTools.pm
@@ -51,7 +51,6 @@ method new_no_defaults($class: $context, $deps = {}) {
my $self = {};
bless $self, $class;
$self->{deps} = $deps;
- $self->{config} = $deps->{config}->get_config();
return $self;
}
@@ -154,8 +153,8 @@ Filter a list of packages to the maintainers whitelisted in the config file.
=cut
method filter_by_maintainer($packages) {
- # TODO make configurable
- return [grep { any {$_->{name} eq 'bluewind'} $_->{maintainers}->@*} $packages->@*];
+ my $allowed_maintainers = {map {$_ => 1} $self->{deps}->{config}->get_config()->{allowed_maintainers}->@*};
+ return [grep { any {$allowed_maintainers->{$_->{name}}} $_->{maintainers}->@*} $packages->@*];
}
=head1 LICENSE
diff --git a/lib/App/ArchLinux/PackagerTools/Config.pm b/lib/App/ArchLinux/PackagerTools/Config.pm
index 7a4f113..4477053 100644
--- a/lib/App/ArchLinux/PackagerTools/Config.pm
+++ b/lib/App/ArchLinux/PackagerTools/Config.pm
@@ -103,6 +103,8 @@ method _get_default_config() {
cache => {
root_dir => ($ENV{XDG_CACHE_HOME} // $ENV{HOME}."/.cache")."/perlpkg/v1/",
},
+ allowed_maintainers => [
+ ],
archweb => {
cache_timeout => '60min',
base_url => 'https://www.archlinux.org/',