package apport 1.21.3-0ubuntu2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 101

Bug #828037 reported by Anthony Harrington
826
This bug affects 105 people
Affects Status Importance Assigned to Milestone
Apport
Invalid
Undecided
Unassigned
apport (Ubuntu)
Fix Released
High
Martin Pitt

Bug Description

Warning appeared while updating. Packages apport and apport-gtk would not upgrade.

ProblemType: Package
DistroRelease: Ubuntu 11.10
Package: apport 1.21.3-0ubuntu2
ProcVersionSignature: Ubuntu 3.0.0-8.11-generic 3.0.1
Uname: Linux 3.0.0-8-generic x86_64
ApportLog:

Architecture: amd64
Date: Wed Aug 17 15:01:37 2011
ErrorMessage: subprocess installed post-installation script returned error exit status 101
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
PackageArchitecture: all
SourcePackage: apport
Title: package apport 1.21.3-0ubuntu2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 101
UpgradeStatus: Upgraded to oneiric on 2011-08-12 (4 days ago)

Revision history for this message
Anthony Harrington (linuxchemist) wrote :
Revision history for this message
Anthony Harrington (linuxchemist) wrote :

ant@Master-ant:~$ sudo dpkg --configure apport
Setting up apport (1.21.3-0ubuntu2) ...
SyntaxError: ("'continue' not properly in loop", ('/usr/share/apport/package-hooks/source_ubiquity.py', 30, None, 'continue\n'))

dpkg: error processing apport (--configure):
 subprocess installed post-installation script returned error exit status 101
Errors were encountered while processing:
 apport

Changed in apport (Ubuntu):
status: New → Confirmed
Revision history for this message
Alexandre Bourget (wackysalut) wrote :

same thing here:

No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already

Des erreurs ont été rencontrées pendant l'exécution :
 apport
 apport-gtk
 xdiagnose
 ubuntu-desktop
E: Sub-process /usr/bin/dpkg returned an error code (1)
Échec de l'installation d'un paquet. Tentative de réparation :
Paramétrage de apport (1.21.3-0ubuntu2) ...
SyntaxError: ("'continue' not properly in loop", ('/usr/share/apport/package-hooks/source_ubiquity.py', 30, None, 'continue\n'))

Revision history for this message
Alexandre Bourget (wackysalut) wrote :

There's a coding error in that file, edit /usr/share/apport/package-hooks/source_ubiquity.py and around line 30 tweak to have:

<code>
def add_info(report, ui):
    add_installation_log(report, 'UbiquitySyslog', 'syslog')
    syslog = report['UbiquitySyslog']
    if 'Buffer I/O error on device' in syslog:
        if re.search('Attached .* CD-ROM (\w+)', syslog):
            cd_drive = re.search('Attached .* CD-ROM (\w+)', syslog).group(1)
            cd_error = re.search('Buffer I/O error on device %s' % cd_drive,
                                 syslog)
            if cd_error:
                ui.information("The system log from your installation contains an error. The specific error commonly occur\
s when there is an issue with the media from which you were installing. This can happen when your media is dirty or damage\
d or when you've burned the media at a high speed. Please try cleaning the media and or burning new media at a lower speed\
. In the event that you continue to encounter these errors it may be an issue with your CD / DVD drive.")
                raise StopIteration
    if 'SQUASHFS error: Unable to read' in syslog:
...
</code>

Changed in apport (Ubuntu):
importance: Undecided → High
status: Confirmed → In Progress
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Alexandre Bourget (wackysalut) wrote :

That's only a quick fix, then run "apt-get install -f" to finish setting up things.

We should keep the result of re.search() and not run it again right after.. so it's not optimal.

Revision history for this message
actionparsnip (andrew-woodhead666) wrote :

Works fine here with the change :)

Revision history for this message
Gábor Pápai (gaborgabor) wrote :

re #4

my "solution":
gksudo gedit /usr/share/apport/package-hooks/source_ubiquity.py
search the 30th line, and change the "continue" to "return" (without quotes)
(this solution works too)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 1.21.3-0ubuntu4

---------------
apport (1.21.3-0ubuntu4) oneiric; urgency=low

  * data/package-hooks/source_ubiquity.py: remove use of continue when not in
    a loop (LP: #828037)
 -- Brian Murray <email address hidden> Wed, 17 Aug 2011 07:34:21 -0700

Changed in apport (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Anthony Harrington (linuxchemist) wrote :

Excellent :) bug seems fixed

Revision history for this message
Brian Murray (brian-murray) wrote :

Actually this doesn't affect the apport project as the ubiquity source package hook only appears in the Ubuntu package of apport so I'm setting this task to Invalid.

Changed in apport:
status: New → Invalid
Revision history for this message
Martin Pitt (pitti) wrote :

Still happens in the ubuntu hook, reopening.

Changed in apport (Ubuntu):
assignee: Brian Murray (brian-murray) → Martin Pitt (pitti)
status: Fix Released → In Progress
status: In Progress → Fix Committed
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 1.22-0ubuntu1

---------------
apport (1.22-0ubuntu1) oneiric; urgency=low

  [ Brian Murray ]
  * data/general-hooks/ubuntu.py: generate a DuplicateSignature tag for
    distribution upgrades too.

  [ Martin Pitt ]
  * New upstream release:
    - Completely rework apport-retrace to use gdb's "debug-file-directory" and
      "solib-absolute-prefix" settings and only unpack the necessary packages
      in a temporary directory. This makes it possible to use it in a running
      system without actually touching installed packages, does not need any
      root privileges, and stops the requirement of using chroots with
      fakechroot and fakeroot. This is a lot easier to maintain and use, and a
      lot faster, too. As a consequence, drop the chroot module, and update
      crash-digger accordingly. See "man apport-retrace" for the new usage.
      It is now also easier to port to other packaging backends, as a lot of
      the common logic moved out of the packaging API;
      packaging.install_retracing_packages() got dropped in favor of the
      simpler packaging.install_packages(). (LP: #832740)
    - launchpad.py: When searchTasks() times out, exit with 99 as this is a
      transient error.
    - crash-digger: Intercept OverflowError from downloaded compressed
      attachments.
    - crash-digger: Show how many bugs are left in the pool with each new
      retrace.
  * Drop debian/local/apport-chroot and manpage, and ubuntu-fat-chroot. These
    are obsolete now with the new apport-retrace.
  * Drop debian/local/setup-apport-retracer: Most of it is obsolete now,
    setting up a retracer merely needs an lp:apport checkout and creating an
    apt sources file, we don't need a script for that any more.
  * data/general-hooks/ubuntu.py: Fix invalid "continue" statement in
    DuplicateSignature code. (LP: #828037)
 -- Martin Pitt <email address hidden> Thu, 25 Aug 2011 16:31:37 +0200

Changed in apport (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.