Commit 0dbeee1f authored by Jelmer Vernooij's avatar Jelmer Vernooij

Add fixer for unnecessary-team-upload.

parent d3ddaabd
lintian-brush (0.8) UNRELEASED; urgency=medium
lintian-brush (0.9) UNRELEASED; urgency=medium
* Add CI configuration for Salsa.
* Add fixer for unnecessary-team-upload.
-- Jelmer Vernooij <jelmer@debian.org> Wed, 21 Nov 2018 01:17:16 +0000
-- Jelmer Vernooij <jelmer@debian.org> Fri, 23 Nov 2018 13:59:02 +0000
lintian-brush (0.7) unstable; urgency=medium
......
......@@ -73,6 +73,9 @@ Lintian-Tags: quilt-series-without-trailing-newline
Fix-Script: transitional-package-should-be-oldlibs-optional.py
Lintian-Tags: transitional-package-should-be-oldlibs-optional
Fix-Script: unnecessary-team-upload.py
Lintian-Tags: unnecessary-team-upload
Fix-Script: unnecessary-testsuite-autopkgtest-field.sh
Lintian-Tags: unnecessary-testsuite-autopkgtest-field
......
#!/usr/bin/python3
from lintian_brush.control import (
update_control,
)
from debian.changelog import Changelog
from email.utils import parseaddr
import sys
TEAM_UPLOAD_LINE = ' * Team upload.'
uploader_emails = []
def check_uploaders(control):
for entry in control.get('Uploaders', '').split(','):
uploader_emails.append(parseaddr(entry)[1])
update_control(source_package_cb=check_uploaders)
with open('debian/changelog', 'r') as f:
cl = Changelog(f.read())
last_change = cl[0]
has_team_upload = (TEAM_UPLOAD_LINE in last_change.changes())
name, email = parseaddr(last_change.author)
if email not in uploader_emails or not has_team_upload:
sys.exit(2)
i = last_change._changes.index(TEAM_UPLOAD_LINE)
del last_change._changes[i]
if i > 0 and last_change._changes[i-1] == '' and last_change._changes[i] == '':
# Also remove the next line, if it's empty
del last_change._changes[i]
with open('debian/changelog', 'w') as f:
f.write(str(cl))
print("Remove unnecesary Team Upload line in changelog.")
print("Fixed-Lintian-Tags: unnecessary-team-upload")
lintian-brush (0.1-2) UNRELEASED; urgency=medium
* Team upload.
[ Jelmer Vernooij ]
* blah
-- Jelmer Vernooij <jelmer@debian.org> Fri, 23 Nov 2018 14:00:02 +0000
lintian-brush (0.1-1) unstable; urgency=medium
* Initial release. (Closes: #XXXXXX)
-- Jelmer Vernooij <jelmer@debian.org> Sun, 28 Oct 2018 00:09:52 +0000
Source: f2fs-tools
Section: admin
Priority: optional
Maintainer: Foo Maintainers <foo@lists.debian.org>
Uploaders: Jelmer Vernooij <jelmer@debian.org>
Build-Depends:
debhelper (>= 9)
Standards-Version: 4.2.0
Package: f2fs-tools
Architecture: linux-any
Depends: libf2fs5 (= ${binary:Version}), libf2fs-format4 (= ${binary:Version}), ${shlibs:Depends}
Description: Tools for Flash-Friendly File System
F2FS is a new filesystem for Linux aimed at NAND flash memory-based storage
devices, such as SSD, eMMC, and SD cards. It is based on Log-structured File
System (LFS).
Remove unnecesary Team Upload line in changelog.
Fixed-Lintian-Tags: unnecessary-team-upload
lintian-brush (0.1-2) UNRELEASED; urgency=medium
[ Jelmer Vernooij ]
* blah
-- Jelmer Vernooij <jelmer@debian.org> Fri, 23 Nov 2018 14:00:02 +0000
lintian-brush (0.1-1) unstable; urgency=medium
* Initial release. (Closes: #XXXXXX)
-- Jelmer Vernooij <jelmer@debian.org> Sun, 28 Oct 2018 00:09:52 +0000
Source: f2fs-tools
Section: admin
Priority: optional
Maintainer: Foo Maintainers <foo@lists.debian.org>
Uploaders: Jelmer Vernooij <jelmer@debian.org>
Build-Depends:
debhelper (>= 9)
Standards-Version: 4.2.0
Package: f2fs-tools
Architecture: linux-any
Depends: libf2fs5 (= ${binary:Version}), libf2fs-format4 (= ${binary:Version}), ${shlibs:Depends}
Description: Tools for Flash-Friendly File System
F2FS is a new filesystem for Linux aimed at NAND flash memory-based storage
devices, such as SSD, eMMC, and SD cards. It is based on Log-structured File
System (LFS).
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment