mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-12 17:31:29 +00:00
submittodebian: Write a usable .reportbugrc if it doesn't exist. (LP: #800429)
This commit is contained in:
commit
61cc8e57ba
23
debian/changelog
vendored
23
debian/changelog
vendored
@ -15,6 +15,10 @@ ubuntu-dev-tools (0.126) UNRELEASED; urgency=low
|
|||||||
- Switch everything previously using subprocess to use
|
- Switch everything previously using subprocess to use
|
||||||
ubuntutools.subprocess instead (LP: #785854)
|
ubuntutools.subprocess instead (LP: #785854)
|
||||||
|
|
||||||
|
[ Stefano Rivera ]
|
||||||
|
* submittodebian: Write a usable .reportbugrc if it doesn't exist.
|
||||||
|
(LP: #800429)
|
||||||
|
|
||||||
-- Evan Broder <evan@ebroder.net> Sat, 11 Jun 2011 05:11:23 -0700
|
-- Evan Broder <evan@ebroder.net> Sat, 11 Jun 2011 05:11:23 -0700
|
||||||
|
|
||||||
ubuntu-dev-tools (0.125ubuntu1) oneiric; urgency=low
|
ubuntu-dev-tools (0.125ubuntu1) oneiric; urgency=low
|
||||||
@ -51,6 +55,25 @@ ubuntu-dev-tools (0.125ubuntu1) oneiric; urgency=low
|
|||||||
|
|
||||||
-- Didier Roche <didrocks@ubuntu.com> Fri, 24 Jun 2011 11:50:17 +0200
|
-- Didier Roche <didrocks@ubuntu.com> Fri, 24 Jun 2011 11:50:17 +0200
|
||||||
|
|
||||||
|
ubuntu-dev-tools (0.124) unstable; urgency=low
|
||||||
|
|
||||||
|
[ Benjamin Drung ]
|
||||||
|
* Move add-patch, edit-patch, suspicious-source, what-patch, and wrap-and-sort
|
||||||
|
from ubuntu-dev-tools into devscripts (Closes: #568481).
|
||||||
|
|
||||||
|
[ Daniel Holbach ]
|
||||||
|
* bitesize:
|
||||||
|
- display error message properly (LP: #785973).
|
||||||
|
- error out if bug is already marked as 'bitesize'.
|
||||||
|
- rephrase bug comment and subscribe person who adds the comment.
|
||||||
|
- work-around LP:336866 and LP:254901.
|
||||||
|
|
||||||
|
[ Stefano Rivera ]
|
||||||
|
* mk-sbuild:
|
||||||
|
- maintainer_name isn't mandatory any more (LP: #787051)
|
||||||
|
|
||||||
|
-- Benjamin Drung <bdrung@debian.org> Wed, 25 May 2011 18:27:46 +0200
|
||||||
|
|
||||||
ubuntu-dev-tools (0.123) unstable; urgency=low
|
ubuntu-dev-tools (0.123) unstable; urgency=low
|
||||||
|
|
||||||
[ Stefano Rivera ]
|
[ Stefano Rivera ]
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
import re, os, sys
|
import re, os, sys
|
||||||
from tempfile import mkstemp
|
from tempfile import mkstemp
|
||||||
|
|
||||||
|
from ubuntutools.config import ubu_email
|
||||||
|
from ubuntutools.question import YesNoQuestion
|
||||||
from ubuntutools.distro_info import UbuntuDistroInfo
|
from ubuntutools.distro_info import UbuntuDistroInfo
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -119,7 +121,48 @@ def run_cmd(cmd):
|
|||||||
print "%s\n" % cmd
|
print "%s\n" % cmd
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
|
|
||||||
|
def check_reportbug_config():
|
||||||
|
fn = os.path.expanduser('~/.reportbugrc')
|
||||||
|
if os.path.exists(fn):
|
||||||
|
return
|
||||||
|
email = ubu_email()[1]
|
||||||
|
reportbugrc = """# Reportbug configuration generated by submittodebian(1)
|
||||||
|
# See reportbug.conf(5) for the configuration file format.
|
||||||
|
|
||||||
|
# Use Debian's reportbug SMTP Server:
|
||||||
|
# Note: it's limited to 5 connections per hour, and cannot CC you at submission
|
||||||
|
# time. See /usr/share/doc/reportbug/README.Users.gz for more details.
|
||||||
|
smtphost reportbug.debian.org:587
|
||||||
|
header "X-Debbugs-CC: %s"
|
||||||
|
no-cc
|
||||||
|
|
||||||
|
# Use GMail's SMTP Server:
|
||||||
|
#smtphost smtp.googlemail.com:587
|
||||||
|
#smtpuser "<your address>@gmail.com"
|
||||||
|
#smtptls
|
||||||
|
""" % email
|
||||||
|
|
||||||
|
with file(fn, 'w') as f:
|
||||||
|
f.write(reportbugrc)
|
||||||
|
|
||||||
|
print """\
|
||||||
|
You have not configured reportbug. Assuming this is the first time you have
|
||||||
|
used it. Writing a ~/.reportbugrc that will use Debian's mail server, and CC
|
||||||
|
the bug to you at <%s>
|
||||||
|
|
||||||
|
--- Generated ~/.reportbugrc ---
|
||||||
|
%s
|
||||||
|
--- End of ~/.reportbugrc ---
|
||||||
|
|
||||||
|
If this is not correct, please exit now and edit ~/.reportbugrc or run
|
||||||
|
reportbug --configure for its configuration wizard.
|
||||||
|
""" % (email, reportbugrc.strip())
|
||||||
|
|
||||||
|
if YesNoQuestion().ask("Continue submitting this bug", "yes") == "no":
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
check_reportbug_config()
|
||||||
changelog_file = (check_file('debian/changelog', critical = False) or
|
changelog_file = (check_file('debian/changelog', critical = False) or
|
||||||
check_file('../debian/changelog'))
|
check_file('../debian/changelog'))
|
||||||
changelog = Changelog(file(changelog_file).read())
|
changelog = Changelog(file(changelog_file).read())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user