Merge lp:~barry/ubuntu-release-upgrader/lp1485093 into lp:ubuntu-release-upgrader

Proposed by Barry Warsaw
Status: Merged
Merged at revision: 2924
Proposed branch: lp:~barry/ubuntu-release-upgrader/lp1485093
Merge into: lp:ubuntu-release-upgrader
Diff against target: 59 lines (+21/-4)
4 files modified
DistUpgrade/DistUpgradeCache.py (+1/-1)
DistUpgrade/DistUpgradeQuirks.py (+10/-1)
debian/changelog (+10/-0)
debian/python3-distupgrade.links (+0/-2)
To merge this branch: bzr merge lp:~barry/ubuntu-release-upgrader/lp1485093
Reviewer Review Type Date Requested Status
Ubuntu Core Development Team Pending
Review via email: mp+275096@code.launchpad.net

Description of the change

This fixes the imports to not be relative so that it's okay if the symlinks don't exist. Don't create the symlinks in the package install because if the dependent packages aren't installed, the symlinks will be dangling which breaks other packages, specifically pex's build.

Instead, just handle the ImportErrors that can happen if the dependent packages, imported via absolute path, don't exist.

To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) wrote :

This looks fine although, and I'll merge it at the start of X.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'DistUpgrade/DistUpgradeCache.py'
--- DistUpgrade/DistUpgradeCache.py 2015-01-20 22:30:06 +0000
+++ DistUpgrade/DistUpgradeCache.py 2015-10-20 20:08:36 +0000
@@ -501,7 +501,7 @@
501 # if the free drivers would give us a equally hard time, we would501 # if the free drivers would give us a equally hard time, we would
502 # never be able to release502 # never be able to release
503 try:503 try:
504 from .NvidiaDetector.nvidiadetector import NvidiaDetection504 from NvidiaDetector.nvidiadetector import NvidiaDetection
505 except (ImportError, SyntaxError) as e:505 except (ImportError, SyntaxError) as e:
506 # SyntaxError is temporary until the port of NvidiaDetector to506 # SyntaxError is temporary until the port of NvidiaDetector to
507 # Python 3 is in the archive.507 # Python 3 is in the archive.
508508
=== modified file 'DistUpgrade/DistUpgradeQuirks.py'
--- DistUpgrade/DistUpgradeQuirks.py 2015-01-20 22:44:02 +0000
+++ DistUpgrade/DistUpgradeQuirks.py 2015-10-20 20:08:36 +0000
@@ -32,7 +32,16 @@
32from .utils import get_arch32from .utils import get_arch
3333
34from .DistUpgradeGettext import gettext as _34from .DistUpgradeGettext import gettext as _
35from .janitor.plugincore.manager import PluginManager35try:
36 from janitor.plugincore.manager import PluginManager
37except ImportError:
38 # janitor is not available, so create a no-op plugin manager.
39 class PluginManager(object):
40 def __init__(self, *args, **kws):
41 pass
42
43 def get_plugins(self, *args, **kws):
44 return []
3645
3746
38class DistUpgradeQuirks(object):47class DistUpgradeQuirks(object):
3948
=== modified file 'debian/changelog'
--- debian/changelog 2015-10-20 15:56:29 +0000
+++ debian/changelog 2015-10-20 20:08:36 +0000
@@ -1,3 +1,13 @@
1ubuntu-release-upgrader (1:15.10.14) wily; urgency=medium
2
3 * Don't try to import janitor and NvidiaDetector in a package relative
4 to this one, to avoid the possibility of dangling symlinks when the
5 packages actually containing these modules is not installed.
6 (LP: #1485093)
7 * debian/python3-distupgrade.links: Removed.
8
9 -- Barry Warsaw <barry@ubuntu.com> Fri, 16 Oct 2015 17:51:27 -0400
10
1ubuntu-release-upgrader (1:15.10.13) wily; urgency=medium11ubuntu-release-upgrader (1:15.10.13) wily; urgency=medium
212
3 * Revert change from 15.10.11, already rejected from wily-proposed13 * Revert change from 15.10.11, already rejected from wily-proposed
414
=== removed file 'debian/python3-distupgrade.links'
--- debian/python3-distupgrade.links 2012-07-13 17:51:44 +0000
+++ debian/python3-distupgrade.links 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
1usr/lib/python3/dist-packages/janitor usr/lib/python3/dist-packages/DistUpgrade/janitor
2usr/lib/python3/dist-packages/NvidiaDetector usr/lib/python3/dist-packages/DistUpgrade/NvidiaDetector

Subscribers

People subscribed via source and target branches