Debian Bug report logs - #370600
reportbug 3.21 fails to configure (while failed != True: SyntaxError: invalid syntax)

version graph

Package: reportbug; Maintainer for reportbug is Reportbug Maintainers <debian-reportbug@lists.debian.org>; Source for reportbug is src:reportbug (PTS, buildd, popcon).

Reported by: Harry Sintonen <sintonen@iki.fi>

Date: Tue, 6 Jun 2006 01:18:31 UTC

Severity: grave

Tags: patch

Merged with 370593, 370635, 370682, 370729, 370739, 370740, 370748, 370755, 370779, 370793, 371047

Found in versions reportbug/3.20, reportbug/3.21

Fixed in version reportbug/3.21.1

Done: "Chris Lawrence" <lawrencc@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Chris Lawrence <lawrencc@debian.org>:
Bug#370600; Package reportbug. (full text, mbox, link).


Acknowledgement sent to Harry Sintonen <sintonen@iki.fi>:
New Bug report received and forwarded. Copy sent to Chris Lawrence <lawrencc@debian.org>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Harry Sintonen <sintonen@iki.fi>
To: submit@bugs.debian.org
Subject: reportbug 3.21 fails to configure (while failed != True: SyntaxError: invalid syntax)
Date: Tue, 6 Jun 2006 03:59:30 +0300 (EEST)
Package: reportbug
Version: 3.21
Severity: grave

Upgrading reportbug to 3.21 fails with the following error:

Setting up reportbug (3.21) ...
Compiling /usr/share/reportbug/reportbug_submit.py ...
  File "/usr/share/reportbug/reportbug_submit.py", line 354
    while failed != True:
    ^
SyntaxError: invalid syntax

dpkg: error processing reportbug (--configure):
 subprocess post-installation script returned error exit status 1


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: powerpc (ppc)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-pegasos
Locale: LANG=fi_FI@euro, LC_CTYPE=fi_FI@euro (charmap=ISO-8859-15)


Version infos:

p@peg1:~$ dpkg -s python2.3 | grep ^Version:
Version: 2.3.5-9.1
p@peg1:~$ dpkg -s libc6 | grep ^Version:
Version: 2.3.6-13


  Regards,
-- 
l=2001;main(i){float o,O,_,I,D;for(;O=I=l/571.-1.75,l;)for(putchar(--l%80?
i:10),o=D=l%80*.05-2,i=31;_=O*O,O=2*o*O+I,o=o*o-_+D,o+_+_<4+D&i++<87;);puts
("  Harry 'Piru' Sintonen <sintonen@iki.fi> http://www.iki.fi/sintonen");}



Information forwarded to debian-bugs-dist@lists.debian.org, Chris Lawrence <lawrencc@debian.org>:
Bug#370600; Package reportbug. (full text, mbox, link).


Acknowledgement sent to Paul Collins <paul@briny.ondioline.org>:
Extra info received and forwarded to list. Copy sent to Chris Lawrence <lawrencc@debian.org>. (full text, mbox, link).


Message #10 received at 370600@bugs.debian.org (full text, mbox, reply):

From: Paul Collins <paul@briny.ondioline.org>
To: 370600@bugs.debian.org
Subject: Re: reportbug 3.21 fails to configure (while failed != True: SyntaxError: invalid syntax)
Date: Tue, 06 Jun 2006 14:21:48 +1000
Here is a (rather noisy) patch that lets the file compile.

1) Replaced leading pairs of tabs with eight spaces to produce correct
   indentation.
2) Appended ':' at line 371 to produce well-formed if statement.

--- reportbug/usr/share/reportbug/reportbug_submit.py	2006-06-05 22:59:23.000000000 +1000
+++ /usr/share/reportbug/reportbug_submit.py	2006-06-06 14:15:00.000000000 +1000
@@ -350,34 +350,34 @@
         toaddrs = [x[1] for x in alist]
         smtp_message = re.sub(r'(?m)^[.]', '..', message)
 
-		# Modified by AP 2006-03-29
-		while failed != True:
-			ewrite("Connecting to %s via SMTP...\n", smtphost)
-			try:
-				conn = smtplib.SMTP(smtphost)
-				if smtptls:
-					conn.starttls()
-				if smtpuser:
-					if not smtppasswd:
-						smtppasswd = ui.get_password(
-							'Enter SMTP password for %s@%s: ' %
-							(smtpuser, smtphost))
-					conn.login(smtpuser, smtppasswd)
-				conn.sendmail(fromaddr, toaddrs, smtp_message)
-				conn.quit()
-			except (socket.error, smtplib.SMTPException), x:
-				
-				# If wrong password, try again...
-				if smtplib.SMTPResponseException.smtp_code == '535'
-					ewrite('SMTP error: authentication failed.  Try again.')
-					continue
-				
-				failed = True
-				ewrite('SMTP send failure: %s\n', x)
-				fh, msgname = TempFile(prefix=tfprefix)
-				fh.write(message)
-				fh.close()
-				ewrite('Wrote bug report to %s\n', msgname)
+        # Modified by AP 2006-03-29
+        while failed != True:
+        	ewrite("Connecting to %s via SMTP...\n", smtphost)
+        	try:
+        		conn = smtplib.SMTP(smtphost)
+        		if smtptls:
+        			conn.starttls()
+        		if smtpuser:
+        			if not smtppasswd:
+        				smtppasswd = ui.get_password(
+        					'Enter SMTP password for %s@%s: ' %
+        					(smtpuser, smtphost))
+        			conn.login(smtpuser, smtppasswd)
+        		conn.sendmail(fromaddr, toaddrs, smtp_message)
+        		conn.quit()
+        	except (socket.error, smtplib.SMTPException), x:
+        		
+        		# If wrong password, try again...
+        		if smtplib.SMTPResponseException.smtp_code == '535':
+        			ewrite('SMTP error: authentication failed.  Try again.')
+        			continue
+        		
+        		failed = True
+        		ewrite('SMTP send failure: %s\n', x)
+        		fh, msgname = TempFile(prefix=tfprefix)
+        		fh.write(message)
+        		fh.close()
+        		ewrite('Wrote bug report to %s\n', msgname)
     else:
         try:
             pipe.write(message)


-- 
Paul Collins
Melbourne, Australia

Dag vijandelijk luchtschip de huismeester is dood



Information forwarded to debian-bugs-dist@lists.debian.org, Chris Lawrence <lawrencc@debian.org>:
Bug#370600; Package reportbug. (full text, mbox, link).


Acknowledgement sent to Arthur Marsh <arthur.marsh@internode.on.net>:
Extra info received and forwarded to list. Copy sent to Chris Lawrence <lawrencc@debian.org>. (full text, mbox, link).


Message #15 received at 370600@bugs.debian.org (full text, mbox, reply):

From: Arthur Marsh <arthur.marsh@internode.on.net>
To: Debian Bug Tracking System <370600@bugs.debian.org>
Subject: reportbug: error message when installing 3.21
Date: Tue, 06 Jun 2006 16:04:24 +0930
Package: reportbug
Version: 3.20
Followup-For: Bug #370600


Errors were encountered while processing:
 reportbug
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up reportbug (3.21) ...
Compiling /usr/share/reportbug/reportbug_submit.py ...
  File "/usr/share/reportbug/reportbug_submit.py", line 354
    while failed != True:
    ^
SyntaxError: invalid syntax

dpkg: error processing reportbug (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 reportbug


-- Package-specific info:
** /home/amarsh04/.reportbugrc:
reportbug_version "3.5"
mode standard
ui text
realname "Arthur Marsh"
email "arthur.marsh@internode.on.net"

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-2-686
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)

Versions of packages reportbug depends on:
ii  python2.3                     2.3.5-9.1  An interactive high-level object-o

Versions of packages reportbug recommends:
ii  python2.3-iconvcodec          1.1.2-2.2  Python universal Unicode codec, us

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, Chris Lawrence <lawrencc@debian.org>:
Bug#370600; Package reportbug. (full text, mbox, link).


Acknowledgement sent to Peter Moulder <Peter.Moulder@infotech.monash.edu.au>:
Extra info received and forwarded to list. Copy sent to Chris Lawrence <lawrencc@debian.org>. (full text, mbox, link).


Message #20 received at 370600@bugs.debian.org (full text, mbox, reply):

From: Peter Moulder <Peter.Moulder@infotech.monash.edu.au>
To: 370600@bugs.debian.org
Subject: Alternative fix for the failure to compile problem
Date: Tue, 06 Jun 2006 17:50:26 +1000
Passing through `expand -t 4' and then appending a colon to the `if'
condition of line 371 fixes the problem better than the suggested
"noisy" patch.

Of course, "where there are bugs, there are more bugs": the fact that 
it contained even compile errors shows that the original coder hadn't
tested it at all before submitting.  I haven't tried reviewing the diffs
myself.

pjrm.



Information forwarded to debian-bugs-dist@lists.debian.org, Chris Lawrence <lawrencc@debian.org>:
Bug#370600; Package reportbug. (full text, mbox, link).


Acknowledgement sent to Synx <bugs@synx.dyndns.org>:
Extra info received and forwarded to list. Copy sent to Chris Lawrence <lawrencc@debian.org>. (full text, mbox, link).


Message #25 received at 370600@bugs.debian.org (full text, mbox, reply):

From: Synx <bugs@synx.dyndns.org>
To: Debian Bug Tracking System <370600@bugs.debian.org>
Subject: reportbug: Inexperienced Python Code
Date: Tue, 06 Jun 2006 01:17:54 -0700
Package: reportbug
Version: 3.21
Followup-For: Bug #370600

The solution's pretty simple.  Someone must have changed reportbug who
wasn't very experienced at writing python.  As such ey used tabs instead
of 4-tuple spaces, and forgot the colon at the end of an if statement.
As I'm using reportbug to report this bug, I'd consider this a fix. And
eh... forgive me for using perl instead of patch.  :/

#!/bin/sh
exec perl -nx $0 \
	</usr/share/reportbug/reportbug_submit.py \
	>reportbug_submit.py.fixed
#!perl
$\ = "\n";
chomp;
s/    /\t/g;
$_ = "$_:" if /if smtplib.*535[^:]$/; # line 371
print;
__END__

-- Package-specific info:
** Environment settings:
EDITOR="gvim -f"

** /home/admin/.reportbugrc:
reportbug_version "3.20"
mode novice
ui text
realname "Synx"
email "bugs@synx.dyndns.org"

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16.18
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages reportbug depends on:
ii  python2.3                     2.3.5-9.1  An interactive high-level object-o

Versions of packages reportbug recommends:
pn  python2.3-cjkcodecs | python2 <none>     (no description available)

-- no debconf information



Reply sent to Chris Lawrence <lawrencc@debian.org>:
You have taken responsibility. (full text, mbox, link).


Notification sent to Harry Sintonen <sintonen@iki.fi>:
Bug acknowledged by developer. (full text, mbox, link).


Message #30 received at 370600-done@bugs.debian.org (full text, mbox, reply):

From: Chris Lawrence <lawrencc@debian.org>
To: 370665-done@bugs.debian.org, 370600-done@bugs.debian.org, 370635-done@bugs.debian.org
Subject: Upgrade to 3.21.1
Date: Tue, 6 Jun 2006 06:46:58 -0400
Version: 3.21.1

These are all dupes of 370593, which was fixed immediately after
reporting.  Closing.


Chris
-- 
Chris Lawrence <lawrencc@debian.org> - http://blog.lordsutch.com/



Merged 370600 370682. Request was from Filipus Klutiero <ido@vif.com> to control@bugs.debian.org. (full text, mbox, link).


Merged 370593 370600 370635 370682 370729 370739 370740 370748. Request was from Steve Langasek <vorlon@debian.org> to control@bugs.debian.org. (full text, mbox, link).


Merged 370593 370600 370635 370682 370729 370739 370740 370748 370779. Request was from Steve Langasek <vorlon@debian.org> to control@bugs.debian.org. (full text, mbox, link).


Bug reassigned from package `reportbug' to `reportbug'. Request was from Martin Michlmayr <tbm@cyrius.com> to control@bugs.debian.org. (full text, mbox, link).


Merged 370593 370600 370635 370682 370729 370739 370740 370748 370779 370793. Request was from Steve Langasek <vorlon@debian.org> to control@bugs.debian.org. (full text, mbox, link).


Merged 370593 370600 370635 370682 370729 370739 370740 370748 370755 370779 370793. Request was from Chris Lawrence <lawrencc@debian.org> to control@bugs.debian.org. (full text, mbox, link).


Merged 370593 370600 370635 370682 370729 370739 370740 370748 370755 370779 370793 371047. Request was from Steve Langasek <vorlon@debian.org> to control@bugs.debian.org. (full text, mbox, link).


Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 24 Jun 2007 07:53:33 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jan 14 01:06:15 2024; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.