| File: | Dpkg/Vendor/Devuan.pm |
| Coverage: | 38.2% |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | # Copyright © 2022 Guillem Jover <guillem@debian.org> | ||||||
| 2 | # | ||||||
| 3 | # This program is free software; you can redistribute it and/or modify | ||||||
| 4 | # it under the terms of the GNU General Public License as published by | ||||||
| 5 | # the Free Software Foundation; either version 2 of the License, or | ||||||
| 6 | # (at your option) any later version. | ||||||
| 7 | # | ||||||
| 8 | # This program is distributed in the hope that it will be useful, | ||||||
| 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
| 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||||
| 11 | # GNU General Public License for more details. | ||||||
| 12 | # | ||||||
| 13 | # You should have received a copy of the GNU General Public License | ||||||
| 14 | # along with this program. If not, see <https://www.gnu.org/licenses/>. | ||||||
| 15 | |||||||
| 16 | =encoding utf8 | ||||||
| 17 | |||||||
| 18 - 29 | =head1 NAME Dpkg::Vendor::Devuan - Devuan vendor class =head1 DESCRIPTION This vendor class customizes the behavior of dpkg scripts for Devuan specific behavior and policies. B<Note>: This is a private module, its API can change at any time. =cut | ||||||
| 30 | |||||||
| 31 | package Dpkg::Vendor::Devuan 0.01; | ||||||
| 32 | |||||||
| 33 | 3 3 3 | 8 1 43 | use strict; | ||||
| 34 | 3 3 3 | 5 1 68 | use warnings; | ||||
| 35 | |||||||
| 36 | 3 3 3 | 4 2 6 | use parent qw(Dpkg::Vendor::Debian); | ||||
| 37 | |||||||
| 38 | sub run_hook { | ||||||
| 39 | 0 | 1 | my ($self, $hook, @params) = @_; | ||||
| 40 | |||||||
| 41 | 0 | if ($hook eq 'package-keyrings') { | |||||
| 42 | 0 | return ('/usr/share/keyrings/devuan-keyring.gpg', | |||||
| 43 | '/usr/share/keyrings/devuan-maintainers.gpg'); | ||||||
| 44 | } elsif ($hook eq 'archive-keyrings') { | ||||||
| 45 | 0 | return ('/usr/share/keyrings/devuan-archive-keyring.gpg'); | |||||
| 46 | } elsif ($hook eq 'archive-keyrings-historic') { | ||||||
| 47 | 0 | return ('/usr/share/keyrings/devuan-archive-removed-keys.gpg'); | |||||
| 48 | } elsif ($hook eq 'extend-patch-header') { | ||||||
| 49 | 0 | my ($textref, $ch_info) = @params; | |||||
| 50 | 0 | if ($ch_info->{'Closes'}) { | |||||
| 51 | 0 | foreach my $bug (split(/\s+/, $ch_info->{'Closes'})) { | |||||
| 52 | 0 | $$textref .= "Bug-Devuan: https://bugs.devuan.org/$bug\n"; | |||||
| 53 | } | ||||||
| 54 | } | ||||||
| 55 | } else { | ||||||
| 56 | 0 | return $self->SUPER::run_hook($hook, @params); | |||||
| 57 | } | ||||||
| 58 | } | ||||||
| 59 | |||||||
| 60 - 66 | =head1 CHANGES =head2 Version 0.xx This is a private module. =cut | ||||||
| 67 | |||||||
| 68 | 1; | ||||||