1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
|
diff -urN update-manager-0.68.debian.orig/data/glade/UpdateManager.glade update-manager-0.68.debian/data/glade/UpdateManager.glade
--- update-manager-0.68.debian.orig/data/glade/UpdateManager.glade 2007-03-26 06:18:34.000000000 -0300
+++ update-manager-0.68.debian/data/glade/UpdateManager.glade 2007-08-09 22:01:39.000000000 -0300
@@ -1403,7 +1403,7 @@
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">_Partial Upgrade</property>
+ <property name="label" translatable="yes">Smart _Upgrade</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
@@ -1443,7 +1443,7 @@
<child>
<widget class="GtkImage" id="image15">
<property name="visible">True</property>
- <property name="stock">gtk-dialog-warning</property>
+ <property name="stock">gtk-dialog-info</property>
<property name="icon_size">6</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
@@ -1492,12 +1492,10 @@
<child>
<widget class="GtkLabel" id="label31">
<property name="visible">True</property>
- <property name="label" translatable="yes">Run a partial upgrade, to install as many updates as possible.
+ <property name="label" translatable="yes">This can be caused by unofficial package sources or because a new version of a package has a new dependency or conflicts with an installed package.
-This can be caused by:
- ◦ A previous upgrade which didn't complete
- ◦ Unofficial software packages not provided by Ubuntu
- ◦ Normal changes of a pre-release version of Ubuntu</property>
+You can run a smart upgrade to install the new dependencies and remove conflicts where needed. Be sure to check the proposed removals for software you would like to keep installed.
+</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
diff -urN update-manager-0.68.debian.orig/update-manager update-manager-0.68.debian/update-manager
--- update-manager-0.68.debian.orig/update-manager 2007-06-25 07:19:44.000000000 -0300
+++ update-manager-0.68.debian/update-manager 2007-08-09 22:01:39.000000000 -0300
@@ -46,51 +46,32 @@
# Begin parsing of options
parser = OptionParser()
- parser.add_option ("-c", "--check-dist-upgrades", action="store_true",
- dest="check_dist_upgrades", default=False,
- help=_("Check if a new distribution release is available"))
- parser.add_option ("-d", "--devel-release", action="store_true",
- dest="devel_release", default=False,
- help=_("Check if upgrading to the latest devel release "
- "is possible"))
- parser.add_option ("-p","--proposed", action="store_true",
- dest="use_proposed", default=False,
- help=_("Try to run a dist-upgrade"))
+ # on Debian we still don't support meta-release, so comment all options that
+ # use it (all, as of now!)
+ # parser.add_option ("-c", "--check-dist-upgrades", action="store_true",
+ # dest="check_dist_upgrades", default=False,
+ # help=_("Check if a new distribution release is available"))
+ # parser.add_option ("-d", "--devel-release", action="store_true",
+ # dest="devel_release", default=False,
+ # help=_("Check if upgrading to the latest devel release "
+ # "is possible"))
+ # parser.add_option ("-p","--proposed", action="store_true",
+ # dest="use_proposed", default=False,
+ # help=_("Try to run a dist-upgrade"))
parser.add_option ("--dist-upgrade","--dist-ugprade", action="store_true",
dest="dist_upgrade", default=False,
help=_("Try to run a dist-upgrade"))
(options, args) = parser.parse_args()
+ # (Debian) let's add placeholder configuration information so that the
+ # patch doesn't get too intrusive
+ options.check_dist_upgrades = False
+ options.devel_release = False
+ options.use_proposed = False
+
data_dir="/usr/share/update-manager/"
#data_dir="/tmp/xxx/share/update-manager/"
- if options.dist_upgrade == True:
- from DistUpgrade.DistUpgradeView import STEP_PREPARE, STEP_MODIFY_SOURCES, STEP_FETCH, STEP_INSTALL, STEP_CLEANUP, STEP_REBOOT
- from DistUpgrade.DistUpgradeViewGtk import DistUpgradeViewGtk
- from DistUpgrade.DistUpgradeControler import DistUpgradeControler
- # FIXME: we *really* want to different view here
- view = DistUpgradeViewGtk(data_dir)
- view.label_title.set_markup("<b><big>%s</big></b>" % _("Running partial upgrade"))
- view.setStep(STEP_PREPARE)
- view.hideStep(STEP_MODIFY_SOURCES)
- view.hideStep(STEP_REBOOT)
- controler = DistUpgradeControler(view, datadir=data_dir)
- controler.prepare()
- controler.doPreUpgrade()
- if controler.askDistUpgrade():
- view.setStep(STEP_FETCH)
- view.updateStatus(_("Fetching"))
- if not controler.doDistUpgradeFetching():
- sys.exit(1)
- view.setStep(STEP_INSTALL)
- view.updateStatus(_("Upgrading"))
- if not controler.doDistUpgrade():
- sys.exit(1)
- view.setStep(STEP_CLEANUP)
- controler.doPostUpgrade()
- view.information(_("Upgrade complete"),
- _("The upgrade was completed."))
- else:
- app = UpdateManager(data_dir)
- app.main(options)
+ app = UpdateManager(data_dir)
+ app.main(options)
diff -urN update-manager-0.68.debian.orig/UpdateManager/UpdateManager.py update-manager-0.68.debian/UpdateManager/UpdateManager.py
--- update-manager-0.68.debian.orig/UpdateManager/UpdateManager.py 2007-08-09 21:59:34.000000000 -0300
+++ update-manager-0.68.debian/UpdateManager/UpdateManager.py 2007-08-09 22:01:39.000000000 -0300
@@ -116,14 +116,11 @@
@property
def installCount(self):
return self._depcache.InstCount
- def saveDistUpgrade(self):
+ def saveDistUpgrade(self, options):
""" this functions mimics a upgrade but will never remove anything """
- self._depcache.Upgrade(True)
+ self._depcache.Upgrade(options.dist_upgrade)
wouldDelete = self._depcache.DelCount
- if self._depcache.DelCount > 0:
- self.clear()
- assert self._depcache.BrokenCount == 0 and self._depcache.DelCount == 0
- self._depcache.Upgrade()
+ assert self._depcache.BrokenCount == 0
return wouldDelete
def matchPackageOrigin(self, pkg, matcher):
""" match 'pkg' origin against 'matcher', take versions between
@@ -260,8 +257,9 @@
self.importance = importance
self.description = desc
- def __init__(self):
+ def __init__(self, options):
# a map of packages under their origin
+ self.options = options
pipe = os.popen("lsb_release -c -s")
dist = pipe.read().strip()
del pipe
@@ -289,7 +287,7 @@
self.held_back = []
# do the upgrade
- self.distUpgradeWouldDelete = cache.saveDistUpgrade()
+ self.distUpgradeWouldDelete = cache.saveDistUpgrade(self.options)
# sort by origin
for pkg in cache:
@@ -614,7 +612,7 @@
Select all updates
"""
self.setBusy(True)
- self.cache.saveDistUpgrade()
+ self.cache.saveDistUpgrade(self.options)
self.treeview_update.queue_draw()
self.refresh_updates_count()
self.setBusy(False)
@@ -867,7 +865,7 @@
dialog.destroy()
sys.exit(1)
self.store.clear()
- self.list = UpdateList()
+ self.list = UpdateList(self.options)
# fill them again
try:
self.list.update(self.cache)
@@ -1015,7 +1013,7 @@
def check_all_updates_installable(self):
""" Check if all available updates can be installed and suggest
to run a distribution upgrade if not """
- if self.list.distUpgradeWouldDelete > 0:
+ if self.list.held_back and not self.options.dist_upgrade:
self.dialog_dist_upgrade.set_transient_for(self.window_main)
res = self.dialog_dist_upgrade.run()
self.dialog_dist_upgrade.hide()
|