#!/usr/bin/perl use warnings; use strict; use IO::Handle; use IO::File; use Dpkg; use Dpkg::Gettext; use Dpkg::ErrorHandling; use Dpkg::Deps qw(@pkg_dep_fields); use Dpkg::Version qw(compare_versions); use Dpkg::Checksums; textdomain("dpkg-dev"); # Do not pollute STDOUT with info messages report_options(info_fh => \*STDERR); my (@samemaint, @changedmaint); my @spuriousover; my %packages; my %overridden; my @sums; foreach (@check_supported) { my $copy = uc($_); $copy = "MD5sum" if $_ eq "md5"; push @sums, $copy; } my @fieldpri = (qw(Package Package-Type Source Version Kernel-Version Architecture Subarchitecture Essential Origin Bugs Maintainer Installed-Size Installer-Menu-Item), @pkg_dep_fields, qw(Filename Size), @sums, qw(Section Priority Homepage Description Tag Task)); # This maps the fields into the proper case my %field_case; @field_case{map{lc($_)} @fieldpri} = @fieldpri; use Getopt::Long qw(:config bundling); my %options = (help => sub { usage(); exit 0; }, version => \&version, type => undef, udeb => \&set_type_udeb, arch => undef, multiversion => 0, 'extra-override'=> undef, ); my $result = GetOptions(\%options, 'help|h|?', 'version', 'type|t=s', 'udeb|u!', 'arch|a=s', 'multiversion|m!', 'extra-override|e=s'); sub version { printf _g("Debian %s version %s.\n"), $progname, $version; exit; } sub usage { printf _g( "Usage: %s [