]> git.proxmox.com Git - pve-manager.git/blame - aplinfo/apltest.pl
aplinfo: update format spec with SHA512
[pve-manager.git] / aplinfo / apltest.pl
CommitLineData
aff192e6
DM
1#!/usr/bin/perl -w
2
3use strict;
4
5use PVE::APLInfo;
6
7
8my $pkglist = PVE::APLInfo::load_data();
9
10my $err = 0;
11
12foreach my $k (keys %{$pkglist->{'all'}}) {
13 next if $k eq 'pve-web-news';
14 my $res = $pkglist->{'all'}->{$k};
15
eac3a06d 16 my $template = "$res->{os}-$res->{package}_$res->{version}_ARCH.tar.gz";
aff192e6 17 $template =~ s/$res->{os}-$res->{os}-/$res->{os}-/;
eac3a06d
DM
18
19 $k =~ s/_amd64\.tar\.gz$/_ARCH.tar.gz/;
20 $k =~ s/_i386\.tar\.gz$/_ARCH.tar.gz/;
aff192e6
DM
21
22 if ($k ne $template) {
23 print "ERROR: $k != $template\n";
24 $err = 1;
25 }
26}
27
28$err ? exit (-11) : exit (0);
29