DistUpgradeApport.py should check to see if --tags is available

Bug #1070043 reported by Kees Cook
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Fix Released
High
Brian Murray
Quantal
Fix Released
High
Brian Murray

Bug Description

= Impact =
If apport is not upgraded before a package installation failure happens the package installation failure mechanism will fail as it will try to use a feature of apport that isn't available. This prevents us from receiving some package install failures that we should receive.

= Test Case=
On a precise sytem
1) run do-release-upgrade -d in a terminal
2) choose not to continue with the distribution upgrade when you see the Unity3D warning
3) cd to /tmp/update-manager-SOMETHING (this is where the dist-upgrader for quantal was downloaded)
4) download test.py from bug 1070043
5) in the quantal dist-upgrader folder run "sudo python test.py"
6) observe the error message 'package_hook: error: no such option: --tags'
Now to use test the version from proposed:
1) run do-release-upgrade -p in a terminal
2) choose not to continue with the distribution upgrade when you see the Unity3D warning
3) cd to /tmp/update-manager-SOMETHINGELSE (this is where the dist-upgrader for quantal from proposed was downloaded)
4) copy test.py from /tmp/update-manager-SOMETHING to /tmp/update-manager-SOMETHINGELSE
5) in the SOMETHINGELSE folder run "sudo python test.py"
6) there should not be an error in the terminal
7) confirm that there is a /var/crash/2vcard.0.crash file

During a failed upgrade, I saw these errors, indicating that the apport package hook hadn't been upgraded before attempting to call some new features:

dpkg: error processing libasyncns0 (--configure):
 no package named `libasyncns0' is installed, cannot configure
Setting up libjson0:amd64 (0.10-1ubuntu1) ...
Usage: package_hook [options]
package_hook: error: no such option: --tags

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

package_hook is provided by apport and the --tags option was added in quantal. ubuntu-release-upgrader should check to see if the --tags option exists before trying to use it.

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

While this works I wonder if there is a better way:

=== modified file 'DistUpgrade/DistUpgradeApport.py'
--- DistUpgrade/DistUpgradeApport.py 2012-10-02 17:56:44 +0000
+++ DistUpgrade/DistUpgradeApport.py 2012-10-22 21:17:23 +0000
@@ -78,7 +78,11 @@
         return False

     if os.path.exists(s):
- args = [s, "-p", pkg, "--tags", "dist-upgrade"]
+ args = [s, "-p", pkg]
+ with open(s) as f:
+ data = f.read()
+ if '--tags' in data:
+ args.extend(["--tags", "dist-upgrade"])
         for fname in APPORT_WHITELIST:
             args.extend(["-l", os.path.join(LOGDIR, fname)])
         try:

Changed in ubuntu-release-upgrader (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Brian Murray (brian-murray)
summary: - package_hook: error: no such option: --tags
+ DistUpgradeApport.py should check if --tags is available
summary: - DistUpgradeApport.py should check if --tags is available
+ DistUpgradeApport.py should check to see if --tags is available
Changed in ubuntu-release-upgrader (Ubuntu Quantal):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Brian Murray (brian-murray) wrote :

This is the test for Stable Release Update.

description: updated
Revision history for this message
Adam Conrad (adconrad) wrote : Please test proposed package

Hello Kees, or anyone else affected,

Accepted ubuntu-release-upgrader into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/1:0.190.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed
Changed in ubuntu-release-upgrader (Ubuntu Quantal):
status: In Progress → Fix Committed
Revision history for this message
Adam Conrad (adconrad) wrote :

Hello Kees, or anyone else affected,

Accepted ubuntu-release-upgrader into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/1:0.190.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

description: updated
Revision history for this message
C de-Avillez (hggdh2) wrote :

Followed instructions, and verified the updated code works as expected. Tagging verification-done.

tags: added: verification-done
removed: verification-needed
description: updated
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

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

This bug was fixed in the package ubuntu-release-upgrader - 1:0.190.3

---------------
ubuntu-release-upgrader (1:0.190.3) quantal-proposed; urgency=low

  * DistUpgrade.ui: allow the conf file dialog to be resizable and set it to a
    larger initial size. Thanks to Michael Terry for the fix. (LP: #1065806)
  * DistUpgradeApport.py: check to see if --tags is available before trying to
    use it (LP: #1070043)
 -- Brian Murray <email address hidden> Tue, 23 Oct 2012 10:45:58 -0700

Changed in ubuntu-release-upgrader (Ubuntu Quantal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:0.191

---------------
ubuntu-release-upgrader (1:0.191) raring; urgency=low

  * support quantal->raring release upgrades
 -- Michael Vogt <email address hidden> Tue, 30 Oct 2012 09:33:50 +0100

Changed in ubuntu-release-upgrader (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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