#!/usr/bin/perl # # dpkg-genchanges # # 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 Encode; use POSIX; use POSIX qw(:errno_h :signal_h); use Dpkg; use Dpkg::Gettext; use Dpkg::Checksums; use Dpkg::ErrorHandling; use Dpkg::Arch qw(get_host_arch debarch_eq debarch_is); use Dpkg::Compression; use Dpkg::Control::Info; use Dpkg::Control::Fields; use Dpkg::Control; use Dpkg::Substvars; use Dpkg::Vars; use Dpkg::Changelog::Parse; use Dpkg::Version; textdomain("dpkg-dev"); my $controlfile = 'debian/control'; my $changelogfile = 'debian/changelog'; my $changelogformat; my $fileslistfile = 'debian/files'; my $uploadfilesdir = '..'; my $sourcestyle = 'i'; my $quiet = 0; my $host_arch = get_host_arch(); my $changes_format = "1.8"; my %f2p; # - file to package map my %p2f; # - package to file map, has entries for "packagename" my %pa2f; # - likewise, has entries for "packagename architecture" my %p2ver; # - package to version map my %p2arch; # - package to arch map my %f2sec; # - file to section map my %f2seccf; # - likewise, from control file my %f2pri; # - file to priority map my %f2pricf; # - likewise, from control file my %sourcedefault; # - default values as taken from source (used for Section, # Priority and Maintainer) my @descriptions; my @fileslistfiles; my $checksums = Dpkg::Checksums->new(); my %remove; # - fields to remove my %override; my %archadded; my @archvalues; my $dsc; my $changesdescription; my $forcemaint; my $forcechangedby; my $since; my $substvars_loaded = 0; my $substvars = Dpkg::Substvars->new(); $substvars->set("Format", $changes_format); use constant SOURCE => 1; use constant ARCH_DEP => 2; use constant ARCH_INDEP => 4; use constant BIN => ARCH_DEP | ARCH_INDEP; use constant ALL => BIN | SOURCE; my $include = ALL; sub is_sourceonly() { return $include == SOURCE; } sub is_binaryonly() { return !($include & SOURCE); } sub binary_opt() { return (($include == BIN) ? '-b' : (($include == ARCH_DEP) ? '-B' : (($include == ARCH_INDEP) ? '-A' : internerr("binary_opt called with include=$include")))); } sub version { printf _g("Debian %s version %s.\n"), $progname, $version; printf _g(" Copyright (C) 1996 Ian Jackson. Copyright (C) 2000,2001 Wichert Akkerman."); printf _g(" This is free software; see the GNU General Public License version 2 or later for copying conditions. There is NO warranty. "); } sub usage { printf _g( "Usage: %s [