Merge lp:~evfool/update-manager/distupgradefixes into lp:update-manager

Proposed by Robert Roth
Status: Merged
Merged at revision: 2321
Proposed branch: lp:~evfool/update-manager/distupgradefixes
Merge into: lp:update-manager
Diff against target: 67 lines (+18/-7)
2 files modified
DistUpgrade/DistUpgrade.ui (+3/-3)
DistUpgrade/DistUpgradeView.py (+15/-4)
To merge this branch: bzr merge lp:~evfool/update-manager/distupgradefixes
Reviewer Review Type Date Requested Status
Michael Vogt (community) Approve
Review via email: mp+90567@code.launchpad.net

Description of the change

Fix three cosmetic issues with the DistUpgrade changes dialog:
* stretch the details list on resize (LP: #294293)
* if the download time can be estimated, do not state that fetching and installing can take several hours, as the estimated download time is already displayed, so only display that installing the packages can take several hours (although it should not) (LP: $348517)
* if there are only packages to remove, and no packages to update/install, do not state that Downloading and installing packages can take several hours, but rather that Removing the packages can take several hours (LP: #513908)

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks a lot! Merged now :)

Revision history for this message
Michael Vogt (mvo) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'DistUpgrade/DistUpgrade.ui'
2--- DistUpgrade/DistUpgrade.ui 2011-11-30 16:39:53 +0000
3+++ DistUpgrade/DistUpgrade.ui 2012-01-28 06:00:32 +0000
4@@ -211,7 +211,7 @@
5 </object>
6 <packing>
7 <property name="expand">False</property>
8- <property name="fill">False</property>
9+ <property name="fill">True</property>
10 <property name="position">0</property>
11 </packing>
12 </child>
13@@ -225,7 +225,7 @@
14 </object>
15 <packing>
16 <property name="expand">False</property>
17- <property name="fill">False</property>
18+ <property name="fill">True</property>
19 <property name="position">1</property>
20 </packing>
21 </child>
22@@ -272,7 +272,7 @@
23 </child>
24 </object>
25 <packing>
26- <property name="expand">False</property>
27+ <property name="expand">True</property>
28 <property name="fill">True</property>
29 <property name="position">1</property>
30 </packing>
31
32=== modified file 'DistUpgrade/DistUpgradeView.py'
33--- DistUpgrade/DistUpgradeView.py 2012-01-25 22:42:10 +0000
34+++ DistUpgrade/DistUpgradeView.py 2012-01-28 06:00:32 +0000
35@@ -139,6 +139,8 @@
36 self.eta = ((self.total_bytes - self.current_bytes) /
37 float(self.current_cps))
38 return True
39+ def isDownloadSpeedEstimated(self):
40+ return (self.est_speed != 0)
41 def estimatedDownloadTime(self, requiredDownload):
42 """ get the estimated download time """
43 if self.est_speed == 0:
44@@ -367,10 +369,19 @@
45 msg += _("\n\nYou have to download a total of %s. ") %\
46 apt_pkg.SizeToStr(downloadSize)
47 msg += self.getFetchProgress().estimatedDownloadTime(downloadSize)
48- if (pkgs_upgrade + pkgs_inst + pkgs_remove) > 100:
49- msg += "\n\n%s" % _( "Fetching and installing the upgrade "
50- "can take several hours. Once the download "
51- "has finished, the process cannot be canceled.")
52+ if ((pkgs_upgrade + pkgs_inst) > 0) and ((pkgs_upgrade + pkgs_inst + pkgs_remove) > 100):
53+ if self.getFetchProgress().isDownloadSpeedEstimated():
54+ msg += "\n\n%s" % _( "Installing the upgrade "
55+ "can take several hours. Once the download "
56+ "has finished, the process cannot be canceled.")
57+ else:
58+ msg += "\n\n%s" % _( "Fetching and installing the upgrade "
59+ "can take several hours. Once the download "
60+ "has finished, the process cannot be canceled.")
61+ else:
62+ if pkgs_remove > 100:
63+ msg += "\n\n%s" % _( "Removing the packages "
64+ "can take several hours. ")
65 # Show an error if no actions are planned
66 if (pkgs_upgrade + pkgs_inst + pkgs_remove) < 1:
67 # FIXME: this should go into DistUpgradeController

Subscribers

People subscribed via source and target branches

to status/vote changes: