mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-06 14:31:30 +00:00
update-maintainer: Add a --quiet option.
This commit is contained in:
parent
7d53fbf9df
commit
dcaab5fc47
3
debian/changelog
vendored
3
debian/changelog
vendored
@ -18,6 +18,7 @@ ubuntu-dev-tools (0.101) UNRELEASED; urgency=low
|
|||||||
version for debian versions that contain more than one dash.
|
version for debian versions that contain more than one dash.
|
||||||
- Prepend script name to every output
|
- Prepend script name to every output
|
||||||
- Output every executed command in verbose mode
|
- Output every executed command in verbose mode
|
||||||
|
* update-maintainer: Add a --quiet option.
|
||||||
|
|
||||||
[ Michael Bienia ]
|
[ Michael Bienia ]
|
||||||
* ubuntutools/lpapi/lpapicache.py: Use the new LP API method
|
* ubuntutools/lpapi/lpapicache.py: Use the new LP API method
|
||||||
@ -27,7 +28,7 @@ ubuntu-dev-tools (0.101) UNRELEASED; urgency=low
|
|||||||
* requestsync: Fix bug where the variable 'hasLP' is not always set
|
* requestsync: Fix bug where the variable 'hasLP' is not always set
|
||||||
(lp: #607874).
|
(lp: #607874).
|
||||||
|
|
||||||
-- Benjamin Drung <bdrung@ubuntu.com> Fri, 30 Jul 2010 03:26:59 +0200
|
-- Benjamin Drung <bdrung@ubuntu.com> Fri, 30 Jul 2010 03:51:02 +0200
|
||||||
|
|
||||||
ubuntu-dev-tools (0.100) maverick; urgency=low
|
ubuntu-dev-tools (0.100) maverick; urgency=low
|
||||||
|
|
||||||
|
@ -325,6 +325,8 @@ def sync_dsc(script_name, dscurl, debian_dist, release, name, email, bugs, keyid
|
|||||||
|
|
||||||
# update the Maintainer field
|
# update the Maintainer field
|
||||||
cmd = ["update-maintainer"]
|
cmd = ["update-maintainer"]
|
||||||
|
if not verbose:
|
||||||
|
cmd.append("-q")
|
||||||
if verbose:
|
if verbose:
|
||||||
print_command(script_name, cmd)
|
print_command(script_name, cmd)
|
||||||
subprocess.check_call(cmd)
|
subprocess.check_call(cmd)
|
||||||
|
@ -26,11 +26,20 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import optparse
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import ubuntutools.packages
|
import ubuntutools.packages
|
||||||
|
|
||||||
|
script_name = os.path.basename(sys.argv[0])
|
||||||
|
usage = "%s [options]" % (script_name)
|
||||||
|
epilog = "See %s(1) for more info." % (script_name)
|
||||||
|
parser = optparse.OptionParser(usage=usage, epilog=epilog)
|
||||||
|
parser.add_option("-q", "--quiet", help="print no informational messages",
|
||||||
|
dest="quiet", action="store_true", default=False)
|
||||||
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
valid_locations = ["debian/control.in", "control.in", "debian/control", "control"]
|
valid_locations = ["debian/control.in", "control.in", "debian/control", "control"]
|
||||||
control_file_found = False
|
control_file_found = False
|
||||||
|
|
||||||
@ -67,12 +76,14 @@ maintainer_name = maintainer_field[0][1]
|
|||||||
maintainer_mail = maintainer_field[0][2]
|
maintainer_mail = maintainer_field[0][2]
|
||||||
|
|
||||||
if maintainer_mail.find("@ubuntu.com") != -1:
|
if maintainer_mail.find("@ubuntu.com") != -1:
|
||||||
|
if not options.quiet:
|
||||||
print "Maintainer email is set to an @ubuntu.com address - doing nothing."
|
print "Maintainer email is set to an @ubuntu.com address - doing nothing."
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
# Check if Maintainer field is as approved in TB decision.
|
# Check if Maintainer field is as approved in TB decision.
|
||||||
if 'Ubuntu Developers' in maintainer_name and \
|
if 'Ubuntu Developers' in maintainer_name and \
|
||||||
'<ubuntu-devel-discuss@lists.ubuntu.com>' in maintainer_mail:
|
'<ubuntu-devel-discuss@lists.ubuntu.com>' in maintainer_mail:
|
||||||
|
if not options.quiet:
|
||||||
print "Ubuntu Developers is already set as maintainer."
|
print "Ubuntu Developers is already set as maintainer."
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
@ -105,12 +116,14 @@ if not "lists.ubuntu.com" in original_maintainer:
|
|||||||
original_maintainer_fields = re.findall('(.*Original-Maintainer): (.*)', file_contents)
|
original_maintainer_fields = re.findall('(.*Original-Maintainer): (.*)', file_contents)
|
||||||
if len(original_maintainer_fields) > 0:
|
if len(original_maintainer_fields) > 0:
|
||||||
for original_maintainer_field in original_maintainer_fields:
|
for original_maintainer_field in original_maintainer_fields:
|
||||||
|
if not options.quiet:
|
||||||
print "Removing existing %s: %s" % original_maintainer_field
|
print "Removing existing %s: %s" % original_maintainer_field
|
||||||
file_contents = re.sub('.*Original-Maintainer: .*\n', "", file_contents)
|
file_contents = re.sub('.*Original-Maintainer: .*\n', "", file_contents)
|
||||||
final_addition = "Maintainer: " + target_maintainer + "\nXSBC-Original-Maintainer: " + original_maintainer
|
final_addition = "Maintainer: " + target_maintainer + "\nXSBC-Original-Maintainer: " + original_maintainer
|
||||||
else:
|
else:
|
||||||
final_addition = "Maintainer: " + target_maintainer
|
final_addition = "Maintainer: " + target_maintainer
|
||||||
|
|
||||||
|
if not options.quiet:
|
||||||
print "The original maintainer for this package is: " + original_maintainer
|
print "The original maintainer for this package is: " + original_maintainer
|
||||||
print "Resetting as: " + target_maintainer
|
print "Resetting as: " + target_maintainer
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user