From 571014e137c1765637416ae301f5b093986cd594 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Thu, 6 Dec 2007 04:15:53 +0100 Subject: [PATCH] Teach dpkg-parsechangelog about the new debian parser options --- scripts/changelog/debian.pl | 2 -- scripts/dpkg-parsechangelog.pl | 24 ++++++++++++++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/scripts/changelog/debian.pl b/scripts/changelog/debian.pl index 08225c64..34231963 100755 --- a/scripts/changelog/debian.pl +++ b/scripts/changelog/debian.pl @@ -36,8 +36,6 @@ Options: --version, -V print version information --file, -l changelog file to parse, defaults to 'debian/changelog' - -F ignored if changelogformat = 'debian' - for compatibility with dpkg-dev --format see man page for list of available output formats, defaults to 'dpkg' for compatibility with dpkg-dev diff --git a/scripts/dpkg-parsechangelog.pl b/scripts/dpkg-parsechangelog.pl index 40be5389..95401a21 100755 --- a/scripts/dpkg-parsechangelog.pl +++ b/scripts/dpkg-parsechangelog.pl @@ -40,11 +40,27 @@ sub usage { Options: -l get per-version info from this file. - -v include all changes later than version. -F force change log format. -L look for change log parsers in . -h, --help show this help message. --version show the version. + +parser options: + --format see man page for list of available + output formats, defaults to 'dpkg' + for compatibility with dpkg-dev + --since, -s, -v include all changes later than version + --until, -u include all changes earlier than version + --from, -f include all changes equal or later + than version + --to, -t include all changes up to or equal + than version + --count, -c, -n include entries from the top + (or the tail if is lower than 0) + --offset, -o change the starting point for --count, + counted from the top (or the tail if + is lower than 0) + --all include all changes "), $progname; } @@ -57,7 +73,11 @@ while (@ARGV) { push(@ap,$_); if (m/^-l/ && length($_)>2) { $changelogfile=$POSTMATCH; next; } m/^--$/ && last; - m/^-v/ && next; + m/^-[cfnostuv]/ && next; + m/^--(all|count|file|from|offset|since|to|until)(.*)$/ && do { + push(@ap, shift(@ARGV)) unless $1; + next; + }; if (m/^-(h|-help)$/) { &usage; exit(0); } if (m/^--version$/) { &version; exit(0); } &usageerr(_g("unknown option \`%s'"), $_); -- 2.39.5