[Bug 1070043] Re: package_hook: error: no such option: --tags

Brian Murray brian at ubuntu.com
Mon Oct 22 22:05:20 UTC 2012


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

** Changed in: ubuntu-release-upgrader (Ubuntu)
   Importance: Undecided => High

** Changed in: ubuntu-release-upgrader (Ubuntu)
     Assignee: (unassigned) => Brian Murray (brian-murray)

** Summary changed:

- package_hook: error: no such option: --tags
+ DistUpgradeApport.py should check if --tags is available

** Summary changed:

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

** Also affects: ubuntu-release-upgrader (Ubuntu Quantal)
   Importance: Undecided
       Status: New

** Changed in: ubuntu-release-upgrader (Ubuntu Quantal)
       Status: New => In Progress

** Changed in: ubuntu-release-upgrader (Ubuntu Quantal)
   Importance: Undecided => High

** Changed in: ubuntu-release-upgrader (Ubuntu Quantal)
     Assignee: (unassigned) => Brian Murray (brian-murray)

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-release-upgrader in
Ubuntu.
https://bugs.launchpad.net/bugs/1070043

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

Status in “ubuntu-release-upgrader” package in Ubuntu:
  In Progress
Status in “ubuntu-release-upgrader” source package in Quantal:
  In Progress

Bug description:
  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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1070043/+subscriptions




More information about the foundations-bugs mailing list