The Version class already parses the version into upstream and Debian
revision parts. Match the results of that against two separate
regexps rather than matching the whole version string and potentially
parsing it inconsistently.
As a result we no longer have to explicitly exclude '-' in the
revision_other group.
Closes: #898087
We always used to match arbitrary revision suffixes, but in commit
f4dbf1aa82 ".../debian.py: Fix binNMU revision parsing" I excluded
'+' from the revision_other to ensure that it wouldn't match a
binNMU suffix (which is matched separately).
Stop excluding '+' from the revision_other group, and change the
repetition to non-greedy so that any binNMU suffix will still match
the following group.
We didn't check for invalid characters in the upstream or revision
parts. Tighten the regexps for those parts.
Also, failure to match the epoch or revision groups caused
those parts to be treated as part of the upstream version.
Split out the three parts and match them against separate
regexps.
In VersionLinux, any binNMU version will currently match the
revision_other group in the regexp and therefore never be recognised
as an experimental, security, or backport version. This is probably
harmless in practice because:
- binNMUs don't happen in those suites
- Only debian/bin/gencontrol.py cares about the linux_revision_other
attribute, and it won't be run for a binNMU version
But let's fix it by matching the binNMU suffix separately.
I incorrectly added a requirement of a newline after urgency in the
changelog entry top line as part of
"debian/lib/python/debian_linux/debian.py: Parse bottom lines of
changelog entries". For a binNMU, there will be ", binary-only=yes"
after the urgency. Since we don't currently care about any fields
after urgency, allow either a comma or newline.
Changelog doesn't currently provide access to the maintainer
name/address and date. We need this when updating the signed template
changelog.
While we're at it, make sure we don't ignore any important lines.
Anything beginning with exactly zero or one spaces is a top or bottom
line, respectively; anything else is internal text we can ignore.
We set the source package name from debian/changelog, which is not
appropriate when generating a source package template for a signed image
package. Only set the source package name if it's not in the control
template.
Currently we don't allow versions like 3.16.7-ckt9-3~deb8u1~bpo7+1 in
*-backports, but we should! Add the security suffix as an option
before the backports suffix.
We also don't check that an upload to *-security or *-lts includes the
expected suffix and nothing else. Add a check for that.
svn path=/dists/trunk/linux/; revision=22539
The Debian release is now identified by only the major version so
there need not be 2 digits directly after ~bpo. Eventually the
major version will grow to 2 digits itself, so allow 1 or more
digits after the ~bpo.
svn path=/dists/trunk/linux/; revision=22538
Unfortunately it is not sufficient to provide virtual packages
that exactly match the ABI name. For example, 'reportbug kernel'
doesn't find the virtual package, and neither do dpkg commands
such as 'dpkg -l linux-image-$(uname -r)'.
svn path=/dists/sid/linux/; revision=22034
* debian/bin/gencontrol.py: Export internal ABI.
* debian/lib/python/debian_linux/debian.py: Export three-part version.
* debian/rules.real
- Provide more variables.
- Make udeb generation easier.
- Use internal ABI for files.
* debian/templates/control.*: Provide name with internal ABI.
* debian/templates/image.plain.*: Use internal ABI.
svn path=/dists/sid/linux/; revision=22017
debian/lib/python/debian_linux/debian.py,
debian/lib/python/debian_linux/patches.py,
- Support Python 3.
- Use six if necessary.
* debian/templates/control.main.in, debian/templates/control.source.in:
Depend on python-six.
svn path=/dists/trunk/linux/; revision=20946
The PO files processed by debconf-updatepo, which in our case are
templates, must have names ending in .po rather than .in. So look for
un-suffixed template files after looking for files with the .in
suffix.
svn path=/dists/trunk/linux/; revision=20504