#!/usr/bin/perl # # Copyright © 1999 Roderick Schertler # Copyright © 2002 Wichert Akkerman # Copyright © 2006-2009, 2011-2015 Guillem Jover # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or (at # your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . use strict; use warnings; use Getopt::Long qw(:config posix_default bundling no_ignorecase); use File::Find; use Dpkg (); use Dpkg::Gettext; use Dpkg::ErrorHandling; use Dpkg::Util qw(:list); use Dpkg::Control; use Dpkg::Checksums; use Dpkg::Compression::FileHandle; use Dpkg::Compression; textdomain('dpkg-dev'); # Hash of lists. The constants below describe what is in the lists. my %override; use constant { O_PRIORITY => 0, O_SECTION => 1, O_MAINT_FROM => 2, # undef for non-specific, else listref O_MAINT_TO => 3, # undef if there's no maint override }; my %extra_override; my %priority = ( 'extra' => 1, 'optional' => 2, 'standard' => 3, 'important' => 4, 'required' => 5, ); # Switches my $debug = 0; my $no_sort = 0; my $src_override = undef; my $extra_override_file = undef; my @sources; my @option_spec = ( 'debug!' => \$debug, 'help|?' => sub { usage(); exit 0; }, 'version' => sub { version(); exit 0; }, 'no-sort|n' => \$no_sort, 'source-override|s=s' => \$src_override, 'extra-override|e=s' => \$extra_override_file, ); sub version { printf g_("Debian %s version %s.\n"), $Dpkg::PROGNAME, $Dpkg::PROGVERSION; } sub usage { printf g_( "Usage: %s [