Python 3.7 warns:
.../debian/lib/python/debian_linux/debian.py:403: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
class PackageArchitecture(collections.MutableSet):
Fix coding style violations reported by pycodestyle. This is
mostly a matter of reformatting code, particularly to eliminate
over-long lines. I also rename one variable ("l" is considered
visually ambiguous) and change a bare "except" to explicitly
catch all exceptions.
There are three types of error or warning remaining:
- debian/bin/...: E402 module level import not at top of file
Scripts in debian/bin need to modify the import path before
importing from debian/lib/python.
- E127 continuation line over-indented for visual indent
This seems to be a false positive. pycodestyle doesn't seem to be
happy with any level of indent (including 0) on a continuation line
in a "with" statement.
- debian/lib/python/debian_linux/debian.py:15:2: W291 trailing whitespace
This is a false positive. The trailing spaces are in a long
string and are intentional.
Several regexes were written as normal strings. Thankfully it appears
that none of the backslash-escaped sequences in them are parsed in
normal strings, so this shouldn't make any practical difference.
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.
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
- Add a suite/version sanity-check for backports
- Disable building of udebs whenever package version indicates backports
svn path=/dists/trunk/linux/; revision=20483
Python 2.x does not use the __unicode__ method to implement str() or
string formatting with %s. Add a __str__ method as a wrapper.
svn path=/dists/trunk/linux/; revision=20180
From: Julien Danjou <julien@danjou.info>
If you try to use genorig on a version with a modifier (like ~rc1), it will
fail because self.linux_upstream_full will be equal to the short version
rather than version-modifier.
svn path=/dists/trunk/linux/; revision=19308
UTS_RELEASE and all the file names still use "3.0.0", which means the
installation commands using a version truncated to two components
fail. And if we truncate UTS_RELEASE this will break many userland
tools, starting with depmod (!).
svn path=/dists/trunk/linux-2.6/; revision=17556
- Remove all relations based on the 'major' template variable
- Define 'source_package' template variable and use it in place
of 'linux-@major@' in linux-patch-debian-<version> description
- Expect only 2 upstream version components if first component is
not '2'
- Remove the 'major' template variable and 'MAJOR' make variable
svn path=/dists/trunk/linux-2.6/; revision=17482