The branch, master has been updated
via 9260be9dc16539daf15025298070f90f5d0745df (commit)
via c8fe972755e9421f90493be9278ea84f4cb8d878 (commit)
from e9715e93a373ef286f42a81ecb5a99f672ad6ef1 (commit)
- Shortlog ------------------------------------------------------------
9260be9 parsecdata: Fix parsing of fields starting with a colon
c8fe972 deb-version.5: Add an own manpage for Dpkg's version format
Summary of changes:
ChangeLog | 6 ++
debian/changelog | 9 +++-
man/ChangeLog | 9 ++++
man/deb-control.5 | 7 ++-
man/deb-version.5 | 128 +++++++++++++++++++++++++++++++++++++++++++++++++
scripts/controllib.pl | 2 +-
6 files changed, 155 insertions(+), 6 deletions(-)
-----------------------------------------------------------------------
Details of changes:
commit 9260be9dc16539daf15025298070f90f5d0745df
Author: Frank Lichtenheld <[EMAIL PROTECTED]>
Date: Thu Nov 29 23:23:53 2007 +0100
parsecdata: Fix parsing of fields starting with a colon
Fix regex to determine the field name correctly if the field's value
starts with a colon.
diff --git a/ChangeLog b/ChangeLog
index 63c996f..3f38c61 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-11-29 Frank Lichtenheld <[EMAIL PROTECTED]>
+
+ * scripts/controllib.pl (parsecdata): Fix
+ regex to determine the field name correctly
+ if the field's value starts with a colon.
+
2007-11-29 Guillem Jover <[EMAIL PROTECTED]>
* configure.ac: Bump version to 1.14.13~.
diff --git a/debian/changelog b/debian/changelog
index 8aadeae..fc5f6f3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,8 +3,11 @@ dpkg (1.14.13) UNRELEASED; urgency=low
[ Frank Lichtenheld ]
* Add an own manpage for Dpkg's version format. Mostly stolen
from policy. Closes: #373003
+ * Fix control file parsing for field values starting with a colon.
+ Apparently nobody ever needed this until Vcs-Cvs came along.
+ Closes: #453364
- -- Guillem Jover <[EMAIL PROTECTED]> Thu, 29 Nov 2007 07:08:35 +0200
+ -- Frank Lichtenheld <[EMAIL PROTECTED]> Thu, 29 Nov 2007 23:04:33 +0100
dpkg (1.14.12) unstable; urgency=low
diff --git a/scripts/controllib.pl b/scripts/controllib.pl
index 6e2a4b4..2d6e36b 100755
--- a/scripts/controllib.pl
+++ b/scripts/controllib.pl
@@ -281,7 +281,7 @@ sub parsecdata {
next if (m/^$/ and $paraborder);
next if (m/^#/);
$paraborder=0;
- if (m/^(\S+)\s*:\s*(.*)$/) {
+ if (m/^(\S+?)\s*:\s*(.*)$/) {
$cf = $1;
my $v = $2;
$cf= &capit($cf);
commit c8fe972755e9421f90493be9278ea84f4cb8d878
Author: Frank Lichtenheld <[EMAIL PROTECTED]>
Date: Sat Oct 6 17:43:45 2007 +0200
deb-version.5: Add an own manpage for Dpkg's version format
Mostly stolen from policy, which is probably as good as it
gets... Only reformatted the text to roff and added the
tilde patch from #382612
diff --git a/debian/changelog b/debian/changelog
index 5e73d79..8aadeae 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
dpkg (1.14.13) UNRELEASED; urgency=low
- *
+ [ Frank Lichtenheld ]
+ * Add an own manpage for Dpkg's version format. Mostly stolen
+ from policy. Closes: #373003
-- Guillem Jover <[EMAIL PROTECTED]> Thu, 29 Nov 2007 07:08:35 +0200
diff --git a/man/ChangeLog b/man/ChangeLog
index 612216b..38e6b6a 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,12 @@
+2007-11-29 Frank Lichtenheld <[EMAIL PROTECTED]>
+
+ * deb-control.5: Move description of
+ version format to...
+ * deb-version.5: Take the section from
+ policy describing version format and
+ sorting since this is probably as good
+ as it gets for describing these.
+
2007-11-29 Guillem Jover <[EMAIL PROTECTED]>
* po/dpkg-man.pot: Regenerated.
diff --git a/man/deb-control.5 b/man/deb-control.5
index 3802d07..185128d 100644
--- a/man/deb-control.5
+++ b/man/deb-control.5
@@ -31,9 +31,9 @@ generate file names by most installation tools.
.BR Version: " <version string>"
Typically, this is the original package's version number in whatever form
the program's author uses. It may also include a Debian revision number
-(for non-native packages). If both version and revision are supplied,
-they are separated by a hyphen, `-'. For this reason, the original version
-may not have a hyphen in its version number.
+(for non-native packages). The exact format and sorting algorithm
+are described in
+.BR deb-version (5).
.TP
.BR Maintainer: " <fullname email>"
Should be in the format `Joe Bloggs <[EMAIL PROTECTED]>', and is typically
@@ -226,6 +226,7 @@ Description: GNU grep, egrep and fgrep.
.
.SH SEE ALSO
.BR deb (5),
+.BR deb-version (5),
.BR debtags (1),
.BR dpkg (1),
.BR dpkg-deb (1).
diff --git a/man/deb-version.5 b/man/deb-version.5
new file mode 100644
index 0000000..0b3b86b
--- /dev/null
+++ b/man/deb-version.5
@@ -0,0 +1,128 @@
+.\" Includes text from the Debian Policy probably by Ian Jackson and others
+.\" The copyright given below is that of the whole policy, but probably
+.\" incomplete.
+.\" Conversion to roff by Frank Lichtenheld
+.TH deb\-version 5 "2007-10-06" "Debian Project" "Debian"
+.SH NAME
+deb\-version \- Debian package version number format
+.
+.SH SYNOPSIS
+.RI "[ " epoch ":] " upstream_version " [\-" debian_revision " ]"
+.SH DESCRIPTION
+Version numbers as used for Debian binary and source packages
+consist of three components. These are:
+.TP
+.I epoch
+This is a single (generally small) unsigned integer. It
+may be omitted, in which case zero is assumed. If it is
+omitted then the \fIupstream_version\fP may not
+contain any colons.
+.IP
+It is provided to allow mistakes in the version numbers
+of older versions of a package, and also a package's
+previous version numbering schemes, to be left behind.
+.TP
+.I upstream_version
+This is the main part of the version number. It is
+usually the version number of the original ("upstream")
+package from which the \fI.deb\fP file has been made,
+if this is applicable. Usually this will be in the same
+format as that specified by the upstream author(s);
+however, it may need to be reformatted to fit into the
+package management system's format and comparison
+scheme.
+.IP
+The comparison behavior of the package management system
+with respect to the \fIupstream_version\fP is
+described below. The \fIupstream_version\fP
+portion of the version number is mandatory.
+.IP
+The \fIupstream_version\fP may contain only
+alphanumerics ("A-Za-z0-9") and the characters
+.BR . " " + " " \- " " : " " ~
+(full stop, plus, hyphen, colon, tilde) and should
+start with a digit. If there is no
+\fIdebian_revision\fP then hyphens are not allowed;
+if there is no \fIepoch\fP then colons are not
+allowed.
+.TP
+.I debian_revision
+This part of the version number specifies the version of
+the Debian package based on the upstream version. It
+may contain only alphanumerics and the characters
+.BR + " " . " " ~
+(plus, full stop, tilde) and is
+compared in the same way as the
+\fIupstream_version\fP is.
+.IP
+It is optional; if it isn't present then the
+\fIupstream_version\fP may not contain a hyphen.
+This format represents the case where a piece of
+software was written specifically to be turned into a
+Debian package, and so there is only one "debianisation"
+of it and therefore no revision indication is required.
+.IP
+It is conventional to restart the
+\fIdebian_revision\fP at '1' each time time the
+\fIupstream_version\fP is increased.
+.IP
+Dpkg will break the version
+number apart at the last hyphen in the string (if there
+is one) to determine the \fIupstream_version\fP and
+\fIdebian_revision\fP. The absence of a
+\fIdebian_revision\fP compares earlier than the
+presence of one (but note that the \fIdebian_revision\fP
+is the least significant part of the version number).
+.SS Sorting Algorithm
+The \fIupstream_version\fP and \fIdebian_revision\fP
+parts are compared by the package management system using the
+same algorithm:
+.PP
+The strings are compared from left to right.
+.PP
+First the initial part of each string consisting entirely of
+non-digit characters is determined. These two parts (one of
+which may be empty) are compared lexically. If a difference
+is found it is returned. The lexical comparison is a
+comparison of ASCII values modified so that all the letters
+sort earlier than all the non-letters and so that a tilde
+sorts before anything, even the end of a part. For example,
+the following parts are in sorted order: '~~', '~~a', '~',
+the empty part, 'a'.
+.PP
+Then the initial part of the remainder of each string which
+consists entirely of digit characters is determined. The
+numerical values of these two parts are compared, and any
+difference found is returned as the result of the comparison.
+For these purposes an empty string (which can only occur at
+the end of one or both version strings being compared) counts
+as zero.
+.PP
+These two steps (comparing and removing initial non-digit
+strings and initial digit strings) are repeated until a
+difference is found or both strings are exhausted.
+.PP
+Note that the purpose of epochs is to allow us to leave behind
+mistakes in version numbering, and to cope with situations
+where the version numbering scheme changes. It is
+\fBnot\fP intended to cope with version numbers containing
+strings of letters which the package management system cannot
+interpret (such as 'ALPHA' or 'pre\-'), or with
+silly orderings.
+.SH CAVEATS
+The tilde character and its special sorting properties were introduced
+in dpkg, version 1.10 and some parts of dpkg-dev only gained
+support for it later in the 1.10.x series.
+.SH SEE ALSO
+.BR deb-control (5),
+.BR deb (5),
+.BR dpkg (1)
+.SH AUTHORS
+Copyright © 1996,1997,1998 Ian Jackson and Christian Schwarz.
+.br
+Copyright © 2007 Frank Lichtenheld
+.sp
+This manual is free software; you may 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, or (at your option) any later
+version.
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]