Merge lp:~mterry/update-manager/split-release-upgrader into lp:update-manager
- split-release-upgrader
- Merge into main
| Status: | Merged |
|---|---|
| Merged at revision: | 2509 |
| Proposed branch: | lp:~mterry/update-manager/split-release-upgrader |
| Merge into: | lp:update-manager |
| Prerequisite: | lp:~mterry/update-manager/drop-auto-tester |
| Diff against target: |
21114 lines (+200/-19816) 123 files modified
.bzr-builddeb/default.conf (+0/-3) DistUpgrade/Changelog (+0/-188) DistUpgrade/DevelReleaseAnnouncement (+0/-58) DistUpgrade/DistUpgrade.cfg (+0/-117) DistUpgrade/DistUpgrade.cfg.dapper (+0/-56) DistUpgrade/DistUpgrade.cfg.hardy (+0/-106) DistUpgrade/DistUpgrade.cfg.lucid (+0/-114) DistUpgrade/DistUpgrade.ui (+0/-1605) DistUpgrade/DistUpgradeApport.py (+0/-91) DistUpgrade/DistUpgradeAptCdrom.py (+0/-308) DistUpgrade/DistUpgradeAufs.py (+0/-253) DistUpgrade/DistUpgradeCache.py (+0/-1235) DistUpgrade/DistUpgradeConfigParser.py (+0/-85) DistUpgrade/DistUpgradeController.py (+0/-1793) DistUpgrade/DistUpgradeFetcherCore.py (+0/-313) DistUpgrade/DistUpgradeFetcherSelf.py (+0/-32) DistUpgrade/DistUpgradeGettext.py (+0/-83) DistUpgrade/DistUpgradeMain.py (+0/-237) DistUpgrade/DistUpgradePatcher.py (+0/-105) DistUpgrade/DistUpgradeQuirks.py (+0/-1270) DistUpgrade/DistUpgradeVersion.py (+0/-1) DistUpgrade/DistUpgradeView.py (+0/-436) DistUpgrade/DistUpgradeViewGtk.py (+0/-749) DistUpgrade/DistUpgradeViewGtk3.py (+0/-749) DistUpgrade/DistUpgradeViewKDE.py (+0/-873) DistUpgrade/DistUpgradeViewNonInteractive.py (+0/-329) DistUpgrade/DistUpgradeViewText.py (+0/-279) DistUpgrade/EOLReleaseAnnouncement (+0/-62) DistUpgrade/README (+0/-90) DistUpgrade/ReleaseAnnouncement (+0/-56) DistUpgrade/TODO (+0/-65) DistUpgrade/additional_pkgs.cfg (+0/-2) DistUpgrade/apt-autoinst-fixup.py (+0/-69) DistUpgrade/build-dist.sh (+0/-53) DistUpgrade/build-exclude.txt (+0/-9) DistUpgrade/build-tarball.sh (+0/-41) DistUpgrade/cdromupgrade (+0/-40) DistUpgrade/crashdialog.ui (+0/-142) DistUpgrade/dialog_changes.ui (+0/-213) DistUpgrade/dialog_conffile.ui (+0/-142) DistUpgrade/dialog_error.ui (+0/-119) DistUpgrade/dist-upgrade.py (+0/-10) DistUpgrade/etc-default-apport (+0/-7) DistUpgrade/get_kernel_list.sh (+0/-29) DistUpgrade/imported/invoke-rc.d (+0/-455) DistUpgrade/imported/invoke-rc.d.diff (+0/-24) DistUpgrade/mirrors.cfg (+0/-830) DistUpgrade/patches/README (+0/-17) DistUpgrade/patches/_usr_bin_pycompile.b17cebfbf18d152702278b15710d5095.97c07a02e5951cf68cb3f86534f6f917 (+0/-80) DistUpgrade/prerequists-sources.dapper-ports.list (+0/-4) DistUpgrade/prerequists-sources.dapper.list (+0/-4) DistUpgrade/prerequists-sources.list (+0/-6) DistUpgrade/removal_blacklist.cfg (+0/-19) DistUpgrade/screenrc (+0/-3) DistUpgrade/window_main.ui (+0/-267) DistUpgrade/xorg_fix_proprietary.py (+0/-179) DistUpgrade/zz-update-grub (+0/-19) README.dist-upgrade (+0/-34) check-new-release-gtk (+0/-210) data/do-release-upgrade.8 (+0/-35) data/gtkbuilder/UpgradePromptDialog.ui (+0/-343) data/meta-release (+0/-7) data/release-upgrades (+0/-17) debian/91-release-upgrade (+0/-5) debian/control (+4/-20) debian/python-update-manager.install (+0/-6) debian/python3-update-manager.install (+0/-1) debian/release-upgrade-motd (+0/-40) debian/rules (+1/-25) debian/source_update-manager.py (+7/-26) debian/update-manager-core.dirs (+0/-3) debian/update-manager-core.install (+0/-5) debian/update-manager-core.links (+0/-1) debian/update-manager-core.manpages (+0/-1) debian/update-manager-core.postinst (+0/-44) debian/update-manager-core.preinst (+0/-41) debian/update-manager-kde.install (+0/-1) debian/update-manager.install (+0/-1) do-release-upgrade (+0/-131) kubuntu-devel-release-upgrade (+0/-2) po/POTFILES.in (+0/-18) po/POTFILES.skip (+0/-2) po/update-manager.pot (+187/-1626) pre-build.sh (+0/-48) setup.py (+1/-9) tests/Makefile (+0/-3) tests/patchdir/dotdot_expected (+0/-2) tests/patchdir/dotdot_orig (+0/-1) tests/patchdir/fail_orig (+0/-1) tests/patchdir/foo_orig (+0/-2) tests/patchdir/fstab_orig (+0/-17) tests/patchdir/patchdir_dotdot.8cf8463b34caa8ac871a52d5dd7ad1ef.cddc4be46bedd91db15ddb9f7ddfa804 (+0/-4) tests/patchdir/patchdir_fail.ed04abbc6ee688ee7908c9dbb4b9e0a2.deadbeefdeadbeefdeadbeff (+0/-1) tests/patchdir/patchdir_foo.f41121a903eafadf258962abc57c8644.52f83ff6877e42f613bcd2444c22528c (+0/-1) tests/patchdir/patchdir_fstab.a1b72f1370f4f847f602fd0e239265d2.c56d2d038afb651920c83106ec8dfd09 (+0/-13) tests/patchdir/patchdir_pycompile.b17cebfbf18d152702278b15710d5095.97c07a02e5951cf68cb3f86534f6f917 (+0/-80) tests/patchdir/pycompile_orig (+0/-281) tests/test-data-cdrom/.disk/base_components (+0/-2) tests/test-data-cdrom/.disk/cd_type (+0/-1) tests/test-data-cdrom/.disk/info (+0/-1) tests/test-data-cdrom/.disk/udeb_include (+0/-4) tests/test-data-cdrom/README.diskdefines (+0/-9) tests/test-data-cdrom/cdromupgrade (+0/-32) tests/test-data-cdrom/dists/intrepid/Release (+0/-27) tests/test-data-cdrom/dists/intrepid/Release.gpg (+0/-7) tests/test-data-cdrom/dists/intrepid/main/binary-amd64/Release (+0/-6) tests/test-data-cdrom/dists/intrepid/main/debian-installer/binary-amd64/Packages.gz (+0/-1) tests/test-data-cdrom/dists/intrepid/restricted/binary-amd64/Release (+0/-6) tests/test-data/fstab.ntfs.orig (+0/-22) tests/test-data/xorg.conf.orig (+0/-89) tests/test_cdrom.py (+0/-131) tests/test_end_of_life.py (+0/-65) tests/test_kernel_from_baseinstaller.py (+0/-42) tests/test_prerequists.py (+0/-160) tests/test_quirks.py (+0/-181) tests/test_sources_list.py (+0/-324) tests/test_xorg_fix_intrepid.py (+0/-46) utils/demoted.cfg.dapper (+0/-243) utils/demoted.cfg.hardy (+0/-568) utils/demotions.py (+0/-129) utils/est_kernel_size.py (+0/-15) utils/update-base-installer.sh (+0/-51) utils/update_mirrors.py (+0/-22) |
| To merge this branch: | bzr merge lp:~mterry/update-manager/split-release-upgrader |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Didier Roche | Approve on 2012-06-27 | ||
| Michael Vogt | 2012-06-07 | Pending | |
|
Review via email:
|
|||
This proposal supersedes a proposal from 2012-06-07.
Commit Message
Description of the Change
This drops all the bits from https:/
It will need a further change to update-notifier to notice the new paths for check-new-release, but that's a separate merge.
(resubmitted so I could set a pre-req branch on lp:~mterry/update-manager/drop-auto-tester)
- 2449. By Michael Terry on 2012-06-13
-
merge from trunk
- 2450. By Michael Terry on 2012-06-13
-
whoops, and drop a couple references to DistUpgrade added in trunk
- 2451. By Michael Terry on 2012-06-25
-
merge from trunk again
- 2452. By Michael Terry on 2012-06-27
-
merge from trunk
| Michael Terry (mterry) wrote : | # |
The --with python2 is because there's still a python-
- 2453. By Michael Terry on 2012-06-27
-
add python3-distupgrade Depend to python3-
update- manager
| Didier Roche (didrocks) wrote : | # |
@Michael: I meant, there is no --with python3? ;)
| Michael Terry (mterry) wrote : | # |
It's using python2 and python3:
dh $@ --with=
- 2454. By Michael Terry on 2012-06-27
-
drop release-
upgrader- specific test - 2455. By Michael Terry on 2012-06-27
-
drop python2 package, since it isn't needed
Preview Diff
| 1 | === modified file '.bzr-builddeb/default.conf' |
| 2 | --- .bzr-builddeb/default.conf 2011-10-07 08:20:22 +0000 |
| 3 | +++ .bzr-builddeb/default.conf 2012-06-27 19:20:36 +0000 |
| 4 | @@ -1,5 +1,2 @@ |
| 5 | [BUILDDEB] |
| 6 | native = true |
| 7 | - |
| 8 | -[HOOKS] |
| 9 | -pre-build = ./pre-build.sh |
| 10 | |
| 11 | === removed directory 'DistUpgrade' |
| 12 | === removed file 'DistUpgrade/Changelog' |
| 13 | --- DistUpgrade/Changelog 2007-02-14 22:43:51 +0000 |
| 14 | +++ DistUpgrade/Changelog 1970-01-01 00:00:00 +0000 |
| 15 | @@ -1,188 +0,0 @@ |
| 16 | -2007-02-14: |
| 17 | - - automatically generate the .py file from the .ui files |
| 18 | -2007-02-14: |
| 19 | - - fix the $dist-proposed handling |
| 20 | - - fix in $dist-commercial handling (LP#66783) |
| 21 | - - updated demotions |
| 22 | -2007-02-13: |
| 23 | - - fix in the reboot code (lp: #84538) |
| 24 | - - make some string more distro neutral |
| 25 | -2007-02-07: |
| 26 | - - add support for the cdrom upgrader to update itself |
| 27 | -2007-02-05: |
| 28 | - - use the new python-apt aptsources api |
| 29 | - - server mode has magic to deal with runing under ssh |
| 30 | -2007-02-02: |
| 31 | - - merged the KDE frontend (thanks Riddell) |
| 32 | - - added tasks support |
| 33 | - - add dist-upgrade --mode=server |
| 34 | -2007-02-01: |
| 35 | - - fix apport integration |
| 36 | -2007-01-29: |
| 37 | - - fixes in the InstallProgress.error() method |
| 38 | - - DistUpgrade/DistUpgradeView.py: fix InstallProgress refactoring |
| 39 | - - updated obsoletes |
| 40 | - - auto-generate the codename for the upgrade based on the build-system coden (lp: #77620) |
| 41 | - - various bugfixes |
| 42 | - - apport support |
| 43 | -2006-12-12: |
| 44 | - - rewrote the _checkFreeSpace() and add better checking |
| 45 | - for /boot (#70683) |
| 46 | -2006-11-28: |
| 47 | - - add quirks rule to install ndiswrapper-utils-1.9 if 1.8 is |
| 48 | - installed |
| 49 | -2006-11-27: |
| 50 | - - fix caption in main glade file |
| 51 | - - use "Dpkg::StopOnError","False" option |
| 52 | -2006-11-23: |
| 53 | - - initial feisty upload |
| 54 | -2006-10-28: |
| 55 | - - catch errors when load_icon() does not work |
| 56 | -2006-10-27: |
| 57 | - - reset self.read so that we do not loop endlessly when dpkg |
| 58 | - sends unexpected data (lp: #68553) |
| 59 | -2006-10-26: |
| 60 | - - make sure that xserver-xorg-video-all get installed if |
| 61 | - xserver-xorg-driver-all was installed before (lp: #58424) |
| 62 | -2006-10-21: |
| 63 | - - comment out old cdrom sources |
| 64 | - - demotions updated |
| 65 | -2006-10-21: |
| 66 | - - fix incorrect arguments in fixup logging (lp: #67311) |
| 67 | - - more error logging |
| 68 | - - fix upgrade problems for people with unofficial compiz |
| 69 | - repositories (lp: #58424) |
| 70 | - - rosetta i18n updates |
| 71 | - - uploaded |
| 72 | -2006-10-17: |
| 73 | - - ensure bzr, tomboy and xserver-xorg-input-* are properly |
| 74 | - upgraded |
| 75 | - - don't fail if dpkg sents unexpected status lines (lp: #66013) |
| 76 | -2006-10-16: |
| 77 | - - remove leftover references to ubuntu-base and |
| 78 | - use ubuntu-minimal and ubuntu-standard instead |
| 79 | - - updated translations from rosetta |
| 80 | -2006-10-13: |
| 81 | - - log held-back as well |
| 82 | -2006-10-12: |
| 83 | - - check if cdrom.lst actually exists before copying it |
| 84 | -2006-10-11: |
| 85 | - - keep pixbuf loader reference around so that we |
| 86 | - have one after the upgrade when the old |
| 87 | - /usr/lib/gtk-2.0/loader/2.4.0/ loader is gone. |
| 88 | - This fixes the problem of missing stock-icons |
| 89 | - after the upgrade. Also revalidate the theme |
| 90 | - in each step. |
| 91 | -2006-10-10: |
| 92 | - - fix time calculation |
| 93 | - - fix kubuntu upgrade case |
| 94 | -2006-10-06: |
| 95 | - - fix source.list rewrite corner case bug (#64159) |
| 96 | -2006-10-04: |
| 97 | - - improve the space checking/logging |
| 98 | -2006-09-29: |
| 99 | - - typo fix (thanks to Jane Silber) (lp: #62946) |
| 100 | -2006-09-28: |
| 101 | - - bugfix in the cdromupgrade script |
| 102 | -2006-09-27: |
| 103 | - - uploaded a version that only reverts the backport fetching |
| 104 | - but no other changes compared to 2006-09-23 |
| 105 | -2006-09-27: |
| 106 | - - embarrassing bug cdromupgrade.sh |
| 107 | -2006-09-26: |
| 108 | - - comment out the getRequiredBackport code because we will |
| 109 | - not use Breaks for the dapper->edgy upgrade yet |
| 110 | - (see #54234 for the rationale) |
| 111 | - - updated demotions.cfg for dapper->edgy |
| 112 | - - special case the packages affected by the Breaks changes |
| 113 | - - make sure that no translations get lost during the upgrade |
| 114 | - (thanks to mdz for pointing this out) |
| 115 | - - bugfixes |
| 116 | -2006-09-23: |
| 117 | - - support fetching backports of selected packages first and |
| 118 | - use them for the upgrade (needed to support Breaks) |
| 119 | - - fetch/use apt/dpkg/python-apt backports for the upgrade |
| 120 | -2006-09-06: |
| 121 | - - increased the "free-space-savety-buffer" to 100MB |
| 122 | -2006-09-05: |
| 123 | - - added "RemoveEssentialOk" option and put "sysvinit" into it |
| 124 | -2006-09-04: |
| 125 | - - set Debug::pkgDepCache::AutoInstall as debug option too |
| 126 | - - be more robust against failure from the locales |
| 127 | - - remove libgl1-mesa (no longer needed on edgy) |
| 128 | -2006-09-03: |
| 129 | - - fix in the cdromupgrade script path detection |
| 130 | -2006-09-01: |
| 131 | - - make the cdromupgrade wrapper work with the compressed version |
| 132 | - of the upgrader as put onto the CD |
| 133 | - - uploaded |
| 134 | -2006-08-30: |
| 135 | - - fixes to the cdromupgrade wrapper |
| 136 | -2006-08-29: |
| 137 | - - always enable the "main" component to make sure it is available |
| 138 | - - add download estimated time |
| 139 | - - add --cdrom switch to make cdrom based dist-upgrades possible |
| 140 | - - better error reporting |
| 141 | - - moved the logging into the /var/log/dist-upgrade/ dir |
| 142 | - - change the obsoletes calculation when run without network and |
| 143 | - consider demotions as obsoletes then (because we can't really |
| 144 | - use the "pkg.downloadable" hint without network) |
| 145 | - - uploaded |
| 146 | -2006-08-18: |
| 147 | - - sort the demoted software list |
| 148 | -2006-07-31: |
| 149 | - - updated to edgy |
| 150 | - - uploadedd |
| 151 | -2006-05-31: |
| 152 | - - fix bug in the free space calculation (#47092) |
| 153 | - - updated ReleaseAnnouncement |
| 154 | - - updated translations |
| 155 | - - fix a missing bindtextdomain |
| 156 | - - fix a incorrect ngettext usage |
| 157 | - - added quirks handler to fix nvidia-glx issue (#47017) |
| 158 | - Thanks to the amazing Kiko for helping improve this! |
| 159 | -2006-05-24: |
| 160 | - - if the initial "update()" fails, just exit, don't try |
| 161 | - to restore the old sources.list (nothing was modified yet) |
| 162 | - Ubuntu: #46712 |
| 163 | - - fix a bug in the sourcesList rewriting (ubuntu: #46245) |
| 164 | - - expand the terminal when no libgnome2-perl is installed |
| 165 | - because debconf might want to ask questions (ubuntu: #46214) |
| 166 | - - disable the breezy cdrom source to make removal of demoted |
| 167 | - packages work properly (ubuntu: #46336) |
| 168 | - - translations updated from rosetta |
| 169 | - - fixed a bug in the demotions calculation (ubuntu: #46245) |
| 170 | - - typos fixed and translations unfuzzied (ubuntu: #46792,#46464) |
| 171 | - - upload |
| 172 | -2006-05-12: |
| 173 | - - space checking improved (ubuntu: #43948) |
| 174 | - - show software that was demoted from main -> universe |
| 175 | - - improve the remaining time reporting |
| 176 | - - translation updates |
| 177 | - - upload |
| 178 | -2006-05-09: |
| 179 | - - upload |
| 180 | -2006-05-08: |
| 181 | - - fix error when asking for media-change (ubuntu: 43442,43728) |
| 182 | -2006-05-02: |
| 183 | - - upload |
| 184 | -2006-04-28: |
| 185 | - - add more sanity checking, if no valid mirror is found in the |
| 186 | - sources.list ask for "dumb" rewrite |
| 187 | - - if nothing valid was found after a dumb rewrite, add official |
| 188 | - sources |
| 189 | - - don't report install TIMEOUT over and over in the log |
| 190 | - - report what package caused a install TIMEOUT |
| 191 | -2006-04-27: |
| 192 | - - add a additonal sanity check after the rewriting of the sources.list |
| 193 | - (check for BaseMetaPkgs still in the cache) |
| 194 | - - on abort reopen() the cache to force writing a new |
| 195 | - /var/cache/apt/pkgcache.bin |
| 196 | - - use a much more compelte mirror list (based on the information |
| 197 | - from https://wiki.ubuntu.com/Archive) |
| 198 | -2006-04-25: |
| 199 | - - make sure that DistUpgradeView.getTerminal().call() actually |
| 200 | - waits until the command has finished (dpkg --configure -a) |
| 201 | -2006-04-18: |
| 202 | - - add logging to the sources.list modification code |
| 203 | - - general logging improvements (thanks to Xavier Poinsard) |
| 204 | |
| 205 | === removed file 'DistUpgrade/DevelReleaseAnnouncement' |
| 206 | --- DistUpgrade/DevelReleaseAnnouncement 2012-05-11 15:03:22 +0000 |
| 207 | +++ DistUpgrade/DevelReleaseAnnouncement 1970-01-01 00:00:00 +0000 |
| 208 | @@ -1,58 +0,0 @@ |
| 209 | -= Welcome to the Ubuntu 'Quantal Quetzal' development release = |
| 210 | - |
| 211 | -''This is still a BETA release.'' |
| 212 | -''Do not install it on production machines.'' |
| 213 | - |
| 214 | -Thanks for your interest in this development release of Ubuntu. |
| 215 | -The Ubuntu developers are moving very quickly to bring you the |
| 216 | -absolute latest and greatest software the Open Source Community has to |
| 217 | -offer. This development release brings you a taste of the newest features |
| 218 | -for the next version of Ubuntu. |
| 219 | - |
| 220 | -== Testing == |
| 221 | - |
| 222 | -Please help to test this development snapshot and report problems back to the |
| 223 | -developers. For more information about testing Ubuntu, please read: |
| 224 | - |
| 225 | - http://www.ubuntu.com/testing |
| 226 | - |
| 227 | - |
| 228 | -== Reporting Bugs == |
| 229 | - |
| 230 | -This development release of Ubuntu contains bugs. If you want to help |
| 231 | -out with bugs, the Bug Squad is always looking for help. Please read the |
| 232 | -following information about reporting bugs: |
| 233 | - |
| 234 | - http://help.ubuntu.com/community/ReportingBugs |
| 235 | - |
| 236 | -Then report bugs using apport in Ubuntu. For example: |
| 237 | - |
| 238 | - ubuntu-bug linux |
| 239 | - |
| 240 | -will open a bug report in Launchpad regarding the linux package. Your |
| 241 | -comments, bug reports, patches and suggestions will help fix bugs and improve |
| 242 | -future releases. |
| 243 | - |
| 244 | - |
| 245 | -== Participate in Ubuntu == |
| 246 | - |
| 247 | -If you would like to help shape Ubuntu, take a look at the list of |
| 248 | -ways you can participate at |
| 249 | - |
| 250 | - http://www.ubuntu.com/community/participate/ |
| 251 | - |
| 252 | - |
| 253 | -== More Information == |
| 254 | - |
| 255 | -You can find out more about Ubuntu on the Ubuntu website and Ubuntu |
| 256 | -wiki. |
| 257 | - |
| 258 | - http://www.ubuntu.com/ |
| 259 | - http://wiki.ubuntu.com/ |
| 260 | - |
| 261 | - |
| 262 | -To sign up for Ubuntu development announcements, please |
| 263 | -subscribe to Ubuntu's development announcement list at: |
| 264 | - |
| 265 | - http://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-announce |
| 266 | - |
| 267 | |
| 268 | === removed symlink 'DistUpgrade/DistUpgrade' |
| 269 | === target was u'.' |
| 270 | === removed file 'DistUpgrade/DistUpgrade.cfg' |
| 271 | --- DistUpgrade/DistUpgrade.cfg 2012-06-11 12:47:59 +0000 |
| 272 | +++ DistUpgrade/DistUpgrade.cfg 1970-01-01 00:00:00 +0000 |
| 273 | @@ -1,117 +0,0 @@ |
| 274 | -[View] |
| 275 | -# the views will be tried in this order, if one fails to import, the next |
| 276 | -# is tried |
| 277 | -View=DistUpgradeViewGtk3,DistUpgradeViewGtk,DistUpgradeViewKDE,DistUpgradeViewText |
| 278 | -#View=DistUpgradeViewNonInteractive |
| 279 | -#Depends= python-apt (>= 0.6.0), apt (>= 0.6) |
| 280 | -# the views below support upgrades over ssh connection |
| 281 | -SupportSSH=DistUpgradeViewText,DistUpgradeViewNonInteractive |
| 282 | - |
| 283 | -# Distro contains global information about the upgrade |
| 284 | -[Distro] |
| 285 | -# the meta-pkgs we support |
| 286 | -MetaPkgs=ubuntu-desktop, kubuntu-desktop, xubuntu-desktop, ubuntustudio-desktop, ichthux-desktop, mythbuntu-desktop, ubuntu-netbook, kubuntu-netbook, lubuntu-desktop |
| 287 | -BaseMetaPkgs=ubuntu-minimal, ubuntu-standard |
| 288 | -Demotions=demoted.cfg |
| 289 | -RemoveEssentialOk=sysvinit, sysvutils, belocs-locales-bin |
| 290 | -RemovalBlacklistFile=removal_blacklist.cfg |
| 291 | -# if those packages were installed, make sure to keep them installed |
| 292 | -KeepInstalledPkgs=gnumeric, hpijs, xserver-xorg-video-all |
| 293 | -KeepInstalledSection=translations |
| 294 | -RemoveObsoletes=yes |
| 295 | -ForcedObsoletes=ksplash-engine-moodin, powernowd, laptop-mode-tools |
| 296 | -# hints for for stuff that should be done early |
| 297 | -PostUpgradePurge=ltsp-client, ltspfsd, linux-restricted-modules-common |
| 298 | -PostUpgradeRemove=libflashsupport, kvm-source, gtk-qt-engine, libparted1.8-12, usplash, printconf, foomatic-db-gutenprint, ebox-printers, kbluetooth, kde-plasmoid-cwp |
| 299 | -PostUpgradeUpgrade=brasero,edubuntu-desktop |
| 300 | -#PostUpgradeInstall=apt |
| 301 | -PostInstallScripts=./xorg_fix_proprietary.py |
| 302 | -EnableApport=yes |
| 303 | -# this supported blacklisting certain versions to ensure we do not upgrade |
| 304 | -# - blcr-dkms fails to build on kernel 2.6.35 |
| 305 | -BadVersions=blcr-dkms_0.8.2-13 |
| 306 | -# ubiquity slideshow |
| 307 | -#SlideshowUrl=http://people.canonical.com/~mvo/ubiquity-slideshow-upgrade/slides/ |
| 308 | - |
| 309 | -[KernelRemoval] |
| 310 | -Version=3.2.0 |
| 311 | -BaseNames=linux-image,linux-headers,linux-image-debug,linux-backport-modules,linux-header-lbm |
| 312 | -Types=386,ec2,generic,rt,server,virtual |
| 313 | - |
| 314 | -# information about the individual meta-pkgs |
| 315 | -[ubuntu-desktop] |
| 316 | -KeyDependencies=gdm, ubuntu-artwork, ubuntu-sounds |
| 317 | -# those pkgs will be marked remove right after the distUpgrade in the cache |
| 318 | -PostUpgradeRemove=xscreensaver, gnome-cups-manager, powermanagement-interface, deskbar-applet, nautilus-cd-burner |
| 319 | -ForcedObsoletes=desktop-effects, cups-pdf, gnome-app-install, policykit-gnome, gnome-mount |
| 320 | - |
| 321 | -[kubuntu-desktop] |
| 322 | -KeyDependencies=kdm, kubuntu-artwork |
| 323 | -PostUpgradeRemove=powermanagement-interface, guidance-power-manager, kde-guidance-powermanager |
| 324 | -# those packages are marked as obsolete right after the upgrade |
| 325 | -ForcedObsoletes=ivman, cups-pdf, gtk-qt-engine |
| 326 | - |
| 327 | -[kubuntu-netbook] |
| 328 | -KeyDependencies=kdm, kubuntu-netbook-default-settings |
| 329 | - |
| 330 | -[ubuntu-netbook] |
| 331 | -KeyDependencies=gdm, ubuntu-netbook-default-settings |
| 332 | - |
| 333 | -[xubuntu-desktop] |
| 334 | -KeyDependencies=xubuntu-artwork, xubuntu-default-settings, xfwm4 |
| 335 | -PostUpgradeRemove=notification-daemon |
| 336 | -ForcedObsoletes=cups-pdf |
| 337 | - |
| 338 | -[ubuntustudio-desktop] |
| 339 | -KeyDependencies=ubuntustudio-default-settings, ubuntustudio-look |
| 340 | - |
| 341 | -[ichthux-desktop] |
| 342 | -KeyDependencies=ichthux-artwork, ichthux-default-settings |
| 343 | - |
| 344 | -[mythbuntu-desktop] |
| 345 | -KeyDependencies=mythbuntu-artwork, mythbuntu-default-settings |
| 346 | - |
| 347 | -[lubuntu-desktop] |
| 348 | -KeyDependencies=lubuntu-core, lubuntu-default-settings |
| 349 | -#Remove previous gnome component from lubuntu to avoid pulling gnome depends on upgrade (LP: #945215) |
| 350 | -PostUpgradeRemove=gnome-bluetooth, gnome-power-manager |
| 351 | - |
| 352 | -[Files] |
| 353 | -BackupExt=distUpgrade |
| 354 | -LogDir=/var/log/dist-upgrade/ |
| 355 | - |
| 356 | -[Sources] |
| 357 | -From=precise |
| 358 | -To=quantal |
| 359 | -ValidOrigin=Ubuntu |
| 360 | -ValidMirrors = mirrors.cfg |
| 361 | -Components=main,restricted,universe,multiverse |
| 362 | -Pockets=security,updates,proposed,backports |
| 363 | -;AllowThirdParty=False |
| 364 | - |
| 365 | -;[PreRequists] |
| 366 | -;Packages=release-upgrader-apt,release-upgrader-dpkg |
| 367 | -;SourcesList=prerequists-sources.list |
| 368 | -;SourcesList-ia64=prerequists-sources.ports.list |
| 369 | -;SourcesList-hppa=prerequists-sources.ports.list |
| 370 | - |
| 371 | -[Aufs] |
| 372 | -; this is a xor option, either full or chroot overlay |
| 373 | -;EnableFullOverlay=yes |
| 374 | -;EnableChrootOverlay=yes |
| 375 | -; sync changes from the chroot back to the real system |
| 376 | -;EnableChrootRsync=yes |
| 377 | -; what chroot dir to use |
| 378 | -;ChrootDir=/tmp/upgrade-chroot |
| 379 | -; the RW dir to use (either for full overlay or chroot overlay) |
| 380 | -;RWDir=/tmp/upgrade-rw |
| 381 | - |
| 382 | -[Network] |
| 383 | -MaxRetries=3 |
| 384 | - |
| 385 | -[NonInteractive] |
| 386 | -ForceOverwrite=yes |
| 387 | -RealReboot=no |
| 388 | -DebugBrokenScripts=no |
| 389 | -DpkgProgressLog=no |
| 390 | -;TerminalTimeout=2400 |
| 391 | |
| 392 | === removed file 'DistUpgrade/DistUpgrade.cfg.dapper' |
| 393 | --- DistUpgrade/DistUpgrade.cfg.dapper 2008-06-24 20:17:19 +0000 |
| 394 | +++ DistUpgrade/DistUpgrade.cfg.dapper 1970-01-01 00:00:00 +0000 |
| 395 | @@ -1,56 +0,0 @@ |
| 396 | -[View] |
| 397 | -View=DistUpgradeViewGtk,DistUpgradeViewKDE, DistUpgradeViewText |
| 398 | - |
| 399 | -# Distro contains global information about the upgrade |
| 400 | -[Distro] |
| 401 | -# the meta-pkgs we support |
| 402 | -MetaPkgs=ubuntu-desktop, kubuntu-desktop, edubuntu-desktop, xubuntu-desktop |
| 403 | -BaseMetaPkgs=ubuntu-minimal, ubuntu-standard, bash |
| 404 | -PostUpgradePurge=xorg-common, libgl1-mesa, ltsp-client, ltspfsd, python2.3 |
| 405 | -Demotions=demoted.cfg.dapper |
| 406 | -RemoveEssentialOk=sysvinit |
| 407 | -RemovalBlacklistFile=removal_blacklist.cfg |
| 408 | -PostInstallScripts=/usr/lib/udev/migrate-fstab-to-uuid.sh |
| 409 | -KeepInstalledPkgs=lvm2 |
| 410 | -KeepInstalledSection=translations |
| 411 | -RemoveObsoletes=yes |
| 412 | -ForcedObsoletes=esound, esound-common, slocate, ksplash-engine-moodin |
| 413 | - |
| 414 | -# information about the individual meta-pkgs |
| 415 | -[ubuntu-desktop] |
| 416 | -KeyDependencies=gdm, gnome-panel, ubuntu-artwork |
| 417 | -# those pkgs will be marked remove right after the distUpgrade in the cache |
| 418 | -PostUpgradeRemove=xchat, xscreensaver, gnome-cups-manager |
| 419 | - |
| 420 | -[kubuntu-desktop] |
| 421 | -KeyDependencies=kdm, kicker, kubuntu-artwork-usplash |
| 422 | -# those packages are marked as obsolete right after the upgrade |
| 423 | -ForcedObsoletes=ivman, slocate |
| 424 | - |
| 425 | -[edubuntu-desktop] |
| 426 | -KeyDependencies=edubuntu-artwork, tuxpaint |
| 427 | - |
| 428 | -[xubuntu-desktop] |
| 429 | -KeyDependencies=xubuntu-artwork-usplash, xubuntu-default-settings, xfwm4 |
| 430 | - |
| 431 | - |
| 432 | -[Files] |
| 433 | -BackupExt=distUpgrade |
| 434 | -LogDir=/var/log/dist-upgrade |
| 435 | - |
| 436 | -[PreRequists] |
| 437 | -Packages=release-upgrader-apt,release-upgrader-dpkg |
| 438 | -SourcesList=prerequists-sources.dapper.list |
| 439 | -SourcesList-ia64=prerequists-sources.dapper-ports.list |
| 440 | -SourcesList-hppa=prerequists-sources.dapper-ports.list |
| 441 | - |
| 442 | -[Sources] |
| 443 | -From=dapper |
| 444 | -To=hardy |
| 445 | -ValidOrigin=Ubuntu |
| 446 | -ValidMirrors = mirrors.cfg |
| 447 | - |
| 448 | -[Network] |
| 449 | -MaxRetries=3 |
| 450 | - |
| 451 | - |
| 452 | |
| 453 | === removed file 'DistUpgrade/DistUpgrade.cfg.hardy' |
| 454 | --- DistUpgrade/DistUpgrade.cfg.hardy 2010-04-12 09:08:58 +0000 |
| 455 | +++ DistUpgrade/DistUpgrade.cfg.hardy 1970-01-01 00:00:00 +0000 |
| 456 | @@ -1,106 +0,0 @@ |
| 457 | -[View] |
| 458 | -# the views will be tried in this order, if one fails to import, the next |
| 459 | -# is tried |
| 460 | -View=DistUpgradeViewGtk,DistUpgradeViewKDE,DistUpgradeViewText |
| 461 | -#View=DistUpgradeViewNonInteractive |
| 462 | -#Depends= python-apt (>= 0.6.0), apt (>= 0.6) |
| 463 | -# the views below support upgrades over ssh connection |
| 464 | -SupportSSH=DistUpgradeViewText,DistUpgradeViewNonInteractive |
| 465 | - |
| 466 | -# Distro contains global information about the upgrade |
| 467 | -[Distro] |
| 468 | -# the meta-pkgs we support |
| 469 | -MetaPkgs=ubuntu-desktop, kubuntu-desktop, edubuntu-desktop, xubuntu-desktop, ubuntustudio-desktop, ichthux-desktop, mythbuntu-desktop, kubuntu-kde4-desktop |
| 470 | -BaseMetaPkgs=ubuntu-minimal, ubuntu-standard |
| 471 | -Demotions=demoted.cfg.hardy |
| 472 | -RemoveEssentialOk=sysvinit, sysvutils, belocs-locales-bin |
| 473 | -RemovalBlacklistFile=removal_blacklist.cfg |
| 474 | -# if those packages were installed, make sure to keep them installed |
| 475 | -KeepInstalledPkgs=gnumeric, hpijs, xserver-xorg-video-all |
| 476 | -KeepInstalledSection=translations |
| 477 | -RemoveObsoletes=yes |
| 478 | -ForcedObsoletes=ksplash-engine-moodin, powernowd, laptop-mode-tools |
| 479 | -# libflashsupport is now oboselete and causes problems so we remove it |
| 480 | -# early |
| 481 | -PostUpgradePurge=ltsp-client, ltspfsd, linux-restricted-modules-common |
| 482 | -PostUpgradeRemove=libflashsupport, slocate, gtk-qt-engine, libparted1.8-12, usplash |
| 483 | -#PostUpgradeInstall=apt |
| 484 | -PostInstallScripts=./xorg_fix_proprietary.py |
| 485 | -# this supported blacklisting certain versions to ensure we do not upgrade |
| 486 | -# - the openoffice.org-filter-binfilter causes a pre-depends cycle error |
| 487 | -# (#516727) |
| 488 | -BadVersions=openoffice.org-filter-binfilter_1:3.2.0~rc4-1ubuntu1 |
| 489 | -EnableApport=no |
| 490 | - |
| 491 | -[KernelRemoval] |
| 492 | -Version=2.6.24 |
| 493 | -BaseNames=linux-image,linux-headers,linux-image-debug,linux-ubuntu-modules,linux-header-lum,linux-backport-modules,linux-header-lbm,linux-restricted-modules |
| 494 | -Types=386,generic,rt,server,virtual |
| 495 | - |
| 496 | -# information about the individual meta-pkgs |
| 497 | -[ubuntu-desktop] |
| 498 | -KeyDependencies=gdm, usplash-theme-ubuntu, ubuntu-artwork, ubuntu-sounds |
| 499 | -# those pkgs will be marked remove right after the distUpgrade in the cache |
| 500 | -PostUpgradeRemove=xscreensaver, gnome-cups-manager, powermanagement-interface, deskbar-applet, nautilus-cd-burner, tracker |
| 501 | -ForcedObsoletes=desktop-effects, cups-pdf |
| 502 | - |
| 503 | -[kubuntu-desktop] |
| 504 | -KeyDependencies=kdm, kubuntu-artwork-usplash |
| 505 | -PostUpgradeRemove=powermanagement-interface,adept |
| 506 | -# those packages are marked as obsolete right after the upgrade |
| 507 | -ForcedObsoletes=ivman, cups-pdf, guidance-power-manager, gtk-qt-engine |
| 508 | - |
| 509 | -[kubuntu-kde4-desktop] |
| 510 | -KeyDependencies=kdebase-bin-kde4, kubuntu-artwork-usplash, kwin-kde4 |
| 511 | - |
| 512 | -[edubuntu-desktop] |
| 513 | -KeyDependencies=edubuntu-artwork, tuxpaint |
| 514 | - |
| 515 | -[xubuntu-desktop] |
| 516 | -KeyDependencies=xubuntu-artwork-usplash, xubuntu-default-settings, xfwm4 |
| 517 | -PostUpgradeRemove=notification-daemon |
| 518 | -ForcedObsoletes=cups-pdf |
| 519 | - |
| 520 | -[ubuntustudio-desktop] |
| 521 | -KeyDependencies=ubuntustudio-default-settings, ubuntustudio-look, usplash-theme-ubuntustudio |
| 522 | - |
| 523 | -[ichthux-desktop] |
| 524 | -KeyDependencies=ichthux-artwork-usplash, ichthux-default-settings |
| 525 | - |
| 526 | -[mythbuntu-desktop] |
| 527 | -KeyDependencies=mythbuntu-artwork-usplash,mythbuntu-default-settings |
| 528 | - |
| 529 | -[Files] |
| 530 | -BackupExt=distUpgrade |
| 531 | -LogDir=/var/log/dist-upgrade/ |
| 532 | - |
| 533 | -[Sources] |
| 534 | -From=hardy |
| 535 | -To=lucid |
| 536 | -ValidOrigin=Ubuntu |
| 537 | -ValidMirrors = mirrors.cfg |
| 538 | -Components=main,restricted,universe,multiverse |
| 539 | - |
| 540 | -;[PreRequists] |
| 541 | -;Packages=release-upgrader-apt,release-upgrader-dpkg |
| 542 | -;SourcesList=prerequists-sources.list |
| 543 | -;SourcesList-ia64=prerequists-sources.ports.list |
| 544 | -;SourcesList-hppa=prerequists-sources.ports.list |
| 545 | - |
| 546 | -[Aufs] |
| 547 | -; this is a xor option, either full or chroot overlay |
| 548 | -;EnableFullOverlay=yes |
| 549 | -;EnableChrootOverlay=yes |
| 550 | -; sync changes from the chroot back to the real system |
| 551 | -;EnableChrootRsync=yes |
| 552 | -; what chroot dir to use |
| 553 | -;ChrootDir=/tmp/upgrade-chroot |
| 554 | -; the RW dir to use (either for full overlay or chroot overlay) |
| 555 | -;RWDir=/tmp/upgrade-rw |
| 556 | - |
| 557 | -[Network] |
| 558 | -MaxRetries=3 |
| 559 | - |
| 560 | -[NonInteractive] |
| 561 | -ForceOverwrite=no |
| 562 | -RealReboot=no |
| 563 | |
| 564 | === removed file 'DistUpgrade/DistUpgrade.cfg.lucid' |
| 565 | --- DistUpgrade/DistUpgrade.cfg.lucid 2012-04-17 19:05:26 +0000 |
| 566 | +++ DistUpgrade/DistUpgrade.cfg.lucid 1970-01-01 00:00:00 +0000 |
| 567 | @@ -1,114 +0,0 @@ |
| 568 | -[View] |
| 569 | -# the views will be tried in this order, if one fails to import, the next |
| 570 | -# is tried |
| 571 | -View=DistUpgradeViewGtk,DistUpgradeViewGtk3,DistUpgradeViewKDE,DistUpgradeViewText |
| 572 | -#View=DistUpgradeViewNonInteractive |
| 573 | -#Depends= python-apt (>= 0.6.0), apt (>= 0.6) |
| 574 | -# the views below support upgrades over ssh connection |
| 575 | -SupportSSH=DistUpgradeViewText,DistUpgradeViewNonInteractive |
| 576 | - |
| 577 | -# Distro contains global information about the upgrade |
| 578 | -[Distro] |
| 579 | -# the meta-pkgs we support |
| 580 | -MetaPkgs=ubuntu-desktop, kubuntu-desktop, xubuntu-desktop, ubuntustudio-desktop, ichthux-desktop, mythbuntu-desktop, ubuntu-netbook, kubuntu-netbook |
| 581 | -BaseMetaPkgs=ubuntu-minimal, ubuntu-standard |
| 582 | -Demotions=demoted.cfg |
| 583 | -RemoveEssentialOk=sysvinit, sysvutils, belocs-locales-bin |
| 584 | -RemovalBlacklistFile=removal_blacklist.cfg |
| 585 | -# if those packages were installed, make sure to keep them installed |
| 586 | -KeepInstalledPkgs=gnumeric, hpijs, xserver-xorg-video-all |
| 587 | -KeepInstalledSection=translations |
| 588 | -RemoveObsoletes=yes |
| 589 | -ForcedObsoletes=ksplash-engine-moodin, powernowd, laptop-mode-tools |
| 590 | -# hints for for stuff that should be done early |
| 591 | -PostUpgradePurge=ltsp-client, ltspfsd, linux-restricted-modules-common |
| 592 | -PostUpgradeRemove=libflashsupport, kvm-source, gtk-qt-engine, libparted1.8-12, usplash, printconf, foomatic-db-gutenprint, ebox-printers, kbluetooth, kde-plasmoid-cwp |
| 593 | -PostUpgradeUpgrade=brasero,edubuntu-desktop |
| 594 | -#PostUpgradeInstall=apt |
| 595 | -PostInstallScripts=./xorg_fix_proprietary.py |
| 596 | -EnableApport=yes |
| 597 | -# this supported blacklisting certain versions to ensure we do not upgrade |
| 598 | -# - blcr-dkms fails to build on kernel 2.6.35 |
| 599 | -BadVersions=blcr-dkms_0.8.2-13 |
| 600 | -# ubiquity slideshow |
| 601 | -#SlideshowUrl=http://people.canonical.com/~mvo/ubiquity-slideshow-upgrade/slides/ |
| 602 | -# useful for e.g. testing |
| 603 | -;AllowUnauthenticated=yes |
| 604 | - |
| 605 | -[KernelRemoval] |
| 606 | -Version=2.6.32 |
| 607 | -BaseNames=linux-image,linux-headers,linux-image-debug,linux-backport-modules,linux-header-lbm |
| 608 | -Types=386,ec2,generic,rt,server,virtual |
| 609 | - |
| 610 | -# information about the individual meta-pkgs |
| 611 | -[ubuntu-desktop] |
| 612 | -KeyDependencies=gdm, ubuntu-artwork, ubuntu-sounds |
| 613 | -# those pkgs will be marked remove right after the distUpgrade in the cache |
| 614 | -PostUpgradeRemove=xscreensaver, gnome-cups-manager, powermanagement-interface, deskbar-applet, nautilus-cd-burner |
| 615 | -ForcedObsoletes=desktop-effects, cups-pdf, gnome-app-install, policykit-gnome, gnome-mount |
| 616 | - |
| 617 | -[kubuntu-desktop] |
| 618 | -KeyDependencies=kdm, kubuntu-artwork |
| 619 | -PostUpgradeRemove=powermanagement-interface, guidance-power-manager, kde-guidance-powermanager |
| 620 | -# those packages are marked as obsolete right after the upgrade |
| 621 | -ForcedObsoletes=ivman, cups-pdf, gtk-qt-engine |
| 622 | - |
| 623 | -[kubuntu-netbook] |
| 624 | -KeyDependencies=kdm, kubuntu-netbook-default-settings |
| 625 | - |
| 626 | -[ubuntu-netbook] |
| 627 | -KeyDependencies=gdm, ubuntu-netbook-default-settings |
| 628 | - |
| 629 | -[xubuntu-desktop] |
| 630 | -KeyDependencies=xubuntu-artwork, xubuntu-default-settings, xfwm4 |
| 631 | -PostUpgradeRemove=notification-daemon |
| 632 | -ForcedObsoletes=cups-pdf |
| 633 | - |
| 634 | -[ubuntustudio-desktop] |
| 635 | -KeyDependencies=ubuntustudio-default-settings, ubuntustudio-look |
| 636 | - |
| 637 | -[ichthux-desktop] |
| 638 | -KeyDependencies=ichthux-artwork, ichthux-default-settings |
| 639 | - |
| 640 | -[mythbuntu-desktop] |
| 641 | -KeyDependencies=mythbuntu-artwork, mythbuntu-default-settings |
| 642 | - |
| 643 | -[Files] |
| 644 | -BackupExt=distUpgrade |
| 645 | -LogDir=/var/log/dist-upgrade/ |
| 646 | - |
| 647 | -[Sources] |
| 648 | -From=lucid |
| 649 | -To=precise |
| 650 | -ValidOrigin=Ubuntu |
| 651 | -ValidMirrors = mirrors.cfg |
| 652 | -Components=main,restricted,universe,multiverse |
| 653 | -Pockets=security,updates,proposed,backports |
| 654 | -;AllowThirdParty=False |
| 655 | - |
| 656 | -[PreRequists] |
| 657 | -Packages=libapt-pkg4.12,libapt-inst1.4,release-upgrader-python-apt |
| 658 | -SourcesList=prerequists-sources.list |
| 659 | -;SourcesList-ia64=prerequists-sources.ports.list |
| 660 | -;SourcesList-hppa=prerequists-sources.ports.list |
| 661 | - |
| 662 | -[Aufs] |
| 663 | -; this is a xor option, either full or chroot overlay |
| 664 | -;EnableFullOverlay=yes |
| 665 | -;EnableChrootOverlay=yes |
| 666 | -; sync changes from the chroot back to the real system |
| 667 | -;EnableChrootRsync=yes |
| 668 | -; what chroot dir to use |
| 669 | -;ChrootDir=/tmp/upgrade-chroot |
| 670 | -; the RW dir to use (either for full overlay or chroot overlay) |
| 671 | -;RWDir=/tmp/upgrade-rw |
| 672 | - |
| 673 | -[Network] |
| 674 | -MaxRetries=3 |
| 675 | - |
| 676 | -[NonInteractive] |
| 677 | -ForceOverwrite=yes |
| 678 | -RealReboot=no |
| 679 | -DebugBrokenScripts=no |
| 680 | -DpkgProgressLog=no |
| 681 | -;TerminalTimeout=2400 |
| 682 | |
| 683 | === removed file 'DistUpgrade/DistUpgrade.ui' |
| 684 | --- DistUpgrade/DistUpgrade.ui 2012-05-11 15:03:22 +0000 |
| 685 | +++ DistUpgrade/DistUpgrade.ui 1970-01-01 00:00:00 +0000 |
| 686 | @@ -1,1605 +0,0 @@ |
| 687 | -<?xml version="1.0" encoding="UTF-8"?> |
| 688 | -<interface> |
| 689 | - <!-- interface-requires gtk+ 2.6 --> |
| 690 | - <object class="GtkDialog" id="dialog_cancel"> |
| 691 | - <property name="can_focus">False</property> |
| 692 | - <property name="border_width">6</property> |
| 693 | - <property name="resizable">False</property> |
| 694 | - <property name="window_position">center-on-parent</property> |
| 695 | - <property name="type_hint">dialog</property> |
| 696 | - <property name="skip_taskbar_hint">True</property> |
| 697 | - <property name="skip_pager_hint">True</property> |
| 698 | - <property name="urgency_hint">True</property> |
| 699 | - <child internal-child="vbox"> |
| 700 | - <object class="GtkBox" id="vbox11"> |
| 701 | - <property name="visible">True</property> |
| 702 | - <property name="can_focus">False</property> |
| 703 | - <property name="spacing">12</property> |
| 704 | - <child internal-child="action_area"> |
| 705 | - <object class="GtkButtonBox" id="hbuttonbox5"> |
| 706 | - <property name="visible">True</property> |
| 707 | - <property name="can_focus">False</property> |
| 708 | - <property name="layout_style">end</property> |
| 709 | - <child> |
| 710 | - <object class="GtkButton" id="button_cancel"> |
| 711 | - <property name="label" translatable="yes">_Cancel Upgrade</property> |
| 712 | - <property name="visible">True</property> |
| 713 | - <property name="can_focus">True</property> |
| 714 | - <property name="can_default">True</property> |
| 715 | - <property name="receives_default">False</property> |
| 716 | - <property name="use_action_appearance">False</property> |
| 717 | - <property name="use_underline">True</property> |
| 718 | - </object> |
| 719 | - <packing> |
| 720 | - <property name="expand">False</property> |
| 721 | - <property name="fill">False</property> |
| 722 | - <property name="position">0</property> |
| 723 | - </packing> |
| 724 | - </child> |
| 725 | - <child> |
| 726 | - <object class="GtkButton" id="button_resume"> |
| 727 | - <property name="label" translatable="yes">_Resume Upgrade</property> |
| 728 | - <property name="visible">True</property> |
| 729 | - <property name="can_focus">True</property> |
| 730 | - <property name="can_default">True</property> |
| 731 | - <property name="has_default">True</property> |
| 732 | - <property name="receives_default">False</property> |
| 733 | - <property name="use_action_appearance">False</property> |
| 734 | - <property name="use_underline">True</property> |
| 735 | - </object> |
| 736 | - <packing> |
| 737 | - <property name="expand">False</property> |
| 738 | - <property name="fill">False</property> |
| 739 | - <property name="position">1</property> |
| 740 | - </packing> |
| 741 | - </child> |
| 742 | - </object> |
| 743 | - <packing> |
| 744 | - <property name="expand">False</property> |
| 745 | - <property name="fill">True</property> |
| 746 | - <property name="pack_type">end</property> |
| 747 | - <property name="position">0</property> |
| 748 | - </packing> |
| 749 | - </child> |
| 750 | - <child> |
| 751 | - <object class="GtkHBox" id="hbox11"> |
| 752 | - <property name="visible">True</property> |
| 753 | - <property name="can_focus">False</property> |
| 754 | - <property name="border_width">6</property> |
| 755 | - <property name="spacing">12</property> |
| 756 | - <child> |
| 757 | - <object class="GtkImage" id="image8"> |
| 758 | - <property name="visible">True</property> |
| 759 | - <property name="can_focus">False</property> |
| 760 | - <property name="xalign">0</property> |
| 761 | - <property name="yalign">0</property> |
| 762 | - <property name="stock">gtk-dialog-question</property> |
| 763 | - <property name="icon-size">6</property> |
| 764 | - </object> |
| 765 | - <packing> |
| 766 | - <property name="expand">False</property> |
| 767 | - <property name="fill">True</property> |
| 768 | - <property name="position">0</property> |
| 769 | - </packing> |
| 770 | - </child> |
| 771 | - <child> |
| 772 | - <object class="GtkLabel" id="label29"> |
| 773 | - <property name="visible">True</property> |
| 774 | - <property name="can_focus">False</property> |
| 775 | - <property name="xalign">0</property> |
| 776 | - <property name="yalign">0</property> |
| 777 | - <property name="label" translatable="yes"><b><big>Cancel the running upgrade?</big></b> |
| 778 | - |
| 779 | -The system could be in an unusable state if you cancel the upgrade. You are strongly adviced to resume the upgrade.</property> |
| 780 | - <property name="use_markup">True</property> |
| 781 | - <property name="wrap">True</property> |
| 782 | - </object> |
| 783 | - <packing> |
| 784 | - <property name="expand">False</property> |
| 785 | - <property name="fill">False</property> |
| 786 | - <property name="position">1</property> |
| 787 | - </packing> |
| 788 | - </child> |
| 789 | - </object> |
| 790 | - <packing> |
| 791 | - <property name="expand">False</property> |
| 792 | - <property name="fill">True</property> |
| 793 | - <property name="position">1</property> |
| 794 | - </packing> |
| 795 | - </child> |
| 796 | - </object> |
| 797 | - </child> |
| 798 | - <action-widgets> |
| 799 | - <action-widget response="-6">button_cancel</action-widget> |
| 800 | - <action-widget response="-5">button_resume</action-widget> |
| 801 | - </action-widgets> |
| 802 | - </object> |
| 803 | - <object class="GtkDialog" id="dialog_changes"> |
| 804 | - <property name="can_focus">False</property> |
| 805 | - <property name="border_width">6</property> |
| 806 | - <property name="window_position">center-on-parent</property> |
| 807 | - <property name="default_width">500</property> |
| 808 | - <property name="default_height">550</property> |
| 809 | - <property name="type_hint">dialog</property> |
| 810 | - <property name="skip_taskbar_hint">True</property> |
| 811 | - <property name="skip_pager_hint">True</property> |
| 812 | - <property name="urgency_hint">True</property> |
| 813 | - <child internal-child="vbox"> |
| 814 | - <object class="GtkBox" id="vbox2"> |
| 815 | - <property name="visible">True</property> |
| 816 | - <property name="can_focus">False</property> |
| 817 | - <property name="spacing">6</property> |
| 818 | - <child internal-child="action_area"> |
| 819 | - <object class="GtkButtonBox" id="hbuttonbox1"> |
| 820 | - <property name="visible">True</property> |
| 821 | - <property name="can_focus">False</property> |
| 822 | - <property name="layout_style">end</property> |
| 823 | - <child> |
| 824 | - <object class="GtkButton" id="button_cancel_changes"> |
| 825 | - <property name="label">gtk-cancel</property> |
| 826 | - <property name="visible">True</property> |
| 827 | - <property name="can_focus">True</property> |
| 828 | - <property name="can_default">True</property> |
| 829 | - <property name="receives_default">False</property> |
| 830 | - <property name="use_action_appearance">False</property> |
| 831 | - <property name="use_stock">True</property> |
| 832 | - </object> |
| 833 | - <packing> |
| 834 | - <property name="expand">False</property> |
| 835 | - <property name="fill">False</property> |
| 836 | - <property name="position">0</property> |
| 837 | - </packing> |
| 838 | - </child> |
| 839 | - <child> |
| 840 | - <object class="GtkButton" id="button_confirm_changes"> |
| 841 | - <property name="label" translatable="yes">_Start Upgrade</property> |
| 842 | - <property name="visible">True</property> |
| 843 | - <property name="can_focus">True</property> |
| 844 | - <property name="can_default">True</property> |
| 845 | - <property name="receives_default">False</property> |
| 846 | - <property name="use_action_appearance">False</property> |
| 847 | - <property name="use_underline">True</property> |
| 848 | - </object> |
| 849 | - <packing> |
| 850 | - <property name="expand">False</property> |
| 851 | - <property name="fill">False</property> |
| 852 | - <property name="position">1</property> |
| 853 | - </packing> |
| 854 | - </child> |
| 855 | - </object> |
| 856 | - <packing> |
| 857 | - <property name="expand">False</property> |
| 858 | - <property name="fill">True</property> |
| 859 | - <property name="pack_type">end</property> |
| 860 | - <property name="position">0</property> |
| 861 | - </packing> |
| 862 | - </child> |
| 863 | - <child> |
| 864 | - <object class="GtkHBox" id="hbox12"> |
| 865 | - <property name="visible">True</property> |
| 866 | - <property name="can_focus">False</property> |
| 867 | - <property name="border_width">6</property> |
| 868 | - <property name="spacing">12</property> |
| 869 | - <child> |
| 870 | - <object class="GtkImage" id="image9"> |
| 871 | - <property name="visible">True</property> |
| 872 | - <property name="can_focus">False</property> |
| 873 | - <property name="xalign">0</property> |
| 874 | - <property name="yalign">0</property> |
| 875 | - <property name="stock">gtk-dialog-question</property> |
| 876 | - <property name="icon-size">6</property> |
| 877 | - </object> |
| 878 | - <packing> |
| 879 | - <property name="expand">False</property> |
| 880 | - <property name="fill">True</property> |
| 881 | - <property name="position">0</property> |
| 882 | - </packing> |
| 883 | - </child> |
| 884 | - <child> |
| 885 | - <object class="GtkVBox" id="vbox3"> |
| 886 | - <property name="visible">True</property> |
| 887 | - <property name="can_focus">False</property> |
| 888 | - <property name="spacing">12</property> |
| 889 | - <child> |
| 890 | - <object class="GtkLabel" id="label_summary"> |
| 891 | - <property name="visible">True</property> |
| 892 | - <property name="can_focus">True</property> |
| 893 | - <property name="xalign">0</property> |
| 894 | - <property name="use_markup">True</property> |
| 895 | - <property name="wrap">True</property> |
| 896 | - <property name="selectable">True</property> |
| 897 | - </object> |
| 898 | - <packing> |
| 899 | - <property name="expand">False</property> |
| 900 | - <property name="fill">True</property> |
| 901 | - <property name="position">0</property> |
| 902 | - </packing> |
| 903 | - </child> |
| 904 | - <child> |
| 905 | - <object class="GtkLabel" id="label_changes"> |
| 906 | - <property name="visible">True</property> |
| 907 | - <property name="can_focus">False</property> |
| 908 | - <property name="xalign">0</property> |
| 909 | - <property name="use_markup">True</property> |
| 910 | - <property name="wrap">True</property> |
| 911 | - </object> |
| 912 | - <packing> |
| 913 | - <property name="expand">False</property> |
| 914 | - <property name="fill">True</property> |
| 915 | - <property name="position">1</property> |
| 916 | - </packing> |
| 917 | - </child> |
| 918 | - <child> |
| 919 | - <object class="GtkExpander" id="expander_details"> |
| 920 | - <property name="visible">True</property> |
| 921 | - <property name="can_focus">True</property> |
| 922 | - <property name="spacing">6</property> |
| 923 | - <child> |
| 924 | - <object class="GtkScrolledWindow" id="scrolledwindow1"> |
| 925 | - <property name="height_request">200</property> |
| 926 | - <property name="visible">True</property> |
| 927 | - <property name="can_focus">True</property> |
| 928 | - <property name="shadow_type">in</property> |
| 929 | - <child> |
| 930 | - <object class="GtkTreeView" id="treeview_details"> |
| 931 | - <property name="visible">True</property> |
| 932 | - <property name="can_focus">True</property> |
| 933 | - <property name="headers_visible">False</property> |
| 934 | - </object> |
| 935 | - </child> |
| 936 | - </object> |
| 937 | - </child> |
| 938 | - <child type="label"> |
| 939 | - <object class="GtkLabel" id="label4"> |
| 940 | - <property name="visible">True</property> |
| 941 | - <property name="can_focus">False</property> |
| 942 | - <property name="label" translatable="yes">Details</property> |
| 943 | - </object> |
| 944 | - </child> |
| 945 | - </object> |
| 946 | - <packing> |
| 947 | - <property name="expand">True</property> |
| 948 | - <property name="fill">True</property> |
| 949 | - <property name="position">2</property> |
| 950 | - </packing> |
| 951 | - </child> |
| 952 | - </object> |
| 953 | - <packing> |
| 954 | - <property name="expand">True</property> |
| 955 | - <property name="fill">True</property> |
| 956 | - <property name="position">1</property> |
| 957 | - </packing> |
| 958 | - </child> |
| 959 | - </object> |
| 960 | - <packing> |
| 961 | - <property name="expand">True</property> |
| 962 | - <property name="fill">True</property> |
| 963 | - <property name="position">1</property> |
| 964 | - </packing> |
| 965 | - </child> |
| 966 | - </object> |
| 967 | - </child> |
| 968 | - <action-widgets> |
| 969 | - <action-widget response="-6">button_cancel_changes</action-widget> |
| 970 | - <action-widget response="-8">button_confirm_changes</action-widget> |
| 971 | - </action-widgets> |
| 972 | - </object> |
| 973 | - <object class="GtkDialog" id="dialog_conffile"> |
| 974 | - <property name="can_focus">False</property> |
| 975 | - <property name="border_width">5</property> |
| 976 | - <property name="resizable">False</property> |
| 977 | - <property name="modal">True</property> |
| 978 | - <property name="window_position">center-on-parent</property> |
| 979 | - <property name="type_hint">dialog</property> |
| 980 | - <child internal-child="vbox"> |
| 981 | - <object class="GtkBox" id="vbox12"> |
| 982 | - <property name="visible">True</property> |
| 983 | - <property name="can_focus">False</property> |
| 984 | - <property name="spacing">12</property> |
| 985 | - <child internal-child="action_area"> |
| 986 | - <object class="GtkButtonBox" id="hbuttonbox6"> |
| 987 | - <property name="visible">True</property> |
| 988 | - <property name="can_focus">False</property> |
| 989 | - <property name="layout_style">end</property> |
| 990 | - <child> |
| 991 | - <object class="GtkButton" id="button9"> |
| 992 | - <property name="visible">True</property> |
| 993 | - <property name="can_focus">True</property> |
| 994 | - <property name="can_default">True</property> |
| 995 | - <property name="has_default">True</property> |
| 996 | - <property name="receives_default">False</property> |
| 997 | - <property name="use_action_appearance">False</property> |
| 998 | - <child> |
| 999 | - <object class="GtkAlignment" id="alignment2"> |
| 1000 | - <property name="visible">True</property> |
| 1001 | - <property name="can_focus">False</property> |
| 1002 | - <property name="xscale">0</property> |
| 1003 | - <property name="yscale">0</property> |
| 1004 | - <child> |
| 1005 | - <object class="GtkHBox" id="hbox13"> |
| 1006 | - <property name="visible">True</property> |
| 1007 | - <property name="can_focus">False</property> |
| 1008 | - <property name="spacing">2</property> |
| 1009 | - <child> |
| 1010 | - <object class="GtkImage" id="image10"> |
| 1011 | - <property name="visible">True</property> |
| 1012 | - <property name="can_focus">False</property> |
| 1013 | - <property name="stock">gtk-cancel</property> |
| 1014 | - </object> |
| 1015 | - <packing> |
| 1016 | - <property name="expand">False</property> |
| 1017 | - <property name="fill">False</property> |
| 1018 | - <property name="position">0</property> |
| 1019 | - </packing> |
| 1020 | - </child> |
| 1021 | - <child> |
| 1022 | - <object class="GtkLabel" id="label30"> |
| 1023 | - <property name="visible">True</property> |
| 1024 | - <property name="can_focus">False</property> |
| 1025 | - <property name="label" translatable="yes">_Keep</property> |
| 1026 | - <property name="use_underline">True</property> |
| 1027 | - </object> |
| 1028 | - <packing> |
| 1029 | - <property name="expand">False</property> |
| 1030 | - <property name="fill">False</property> |
| 1031 | - <property name="position">1</property> |
| 1032 | - </packing> |
| 1033 | - </child> |
| 1034 | - </object> |
| 1035 | - </child> |
| 1036 | - </object> |
| 1037 | - </child> |
| 1038 | - </object> |
| 1039 | - <packing> |
| 1040 | - <property name="expand">False</property> |
| 1041 | - <property name="fill">False</property> |
| 1042 | - <property name="position">0</property> |
| 1043 | - </packing> |
| 1044 | - </child> |
| 1045 | - <child> |
| 1046 | - <object class="GtkButton" id="button10"> |
| 1047 | - <property name="visible">True</property> |
| 1048 | - <property name="can_focus">True</property> |
| 1049 | - <property name="can_default">True</property> |
| 1050 | - <property name="receives_default">False</property> |
| 1051 | - <property name="use_action_appearance">False</property> |
| 1052 | - <child> |
| 1053 | - <object class="GtkAlignment" id="alignment3"> |
| 1054 | - <property name="visible">True</property> |
| 1055 | - <property name="can_focus">False</property> |
| 1056 | - <property name="xscale">0</property> |
| 1057 | - <property name="yscale">0</property> |
| 1058 | - <child> |
| 1059 | - <object class="GtkHBox" id="hbox14"> |
| 1060 | - <property name="visible">True</property> |
| 1061 | - <property name="can_focus">False</property> |
| 1062 | - <property name="spacing">2</property> |
| 1063 | - <child> |
| 1064 | - <object class="GtkImage" id="image11"> |
| 1065 | - <property name="visible">True</property> |
| 1066 | - <property name="can_focus">False</property> |
| 1067 | - <property name="stock">gtk-ok</property> |
| 1068 | - </object> |
| 1069 | - <packing> |
| 1070 | - <property name="expand">False</property> |
| 1071 | - <property name="fill">False</property> |
| 1072 | - <property name="position">0</property> |
| 1073 | - </packing> |
| 1074 | - </child> |
| 1075 | - <child> |
| 1076 | - <object class="GtkLabel" id="label31"> |
| 1077 | - <property name="visible">True</property> |
| 1078 | - <property name="can_focus">False</property> |
| 1079 | - <property name="label" translatable="yes">_Replace</property> |
| 1080 | - <property name="use_underline">True</property> |
| 1081 | - </object> |
| 1082 | - <packing> |
| 1083 | - <property name="expand">False</property> |
| 1084 | - <property name="fill">False</property> |
| 1085 | - <property name="position">1</property> |
| 1086 | - </packing> |
| 1087 | - </child> |
| 1088 | - </object> |
| 1089 | - </child> |
| 1090 | - </object> |
| 1091 | - </child> |
| 1092 | - </object> |
| 1093 | - <packing> |
| 1094 | - <property name="expand">False</property> |
| 1095 | - <property name="fill">False</property> |
| 1096 | - <property name="position">1</property> |
| 1097 | - </packing> |
| 1098 | - </child> |
| 1099 | - </object> |
| 1100 | - <packing> |
| 1101 | - <property name="expand">False</property> |
| 1102 | - <property name="fill">True</property> |
| 1103 | - <property name="pack_type">end</property> |
| 1104 | - <property name="position">0</property> |
| 1105 | - </packing> |
| 1106 | - </child> |
| 1107 | - <child> |
| 1108 | - <object class="GtkHBox" id="hbox15"> |
| 1109 | - <property name="visible">True</property> |
| 1110 | - <property name="can_focus">False</property> |
| 1111 | - <property name="border_width">6</property> |
| 1112 | - <property name="spacing">12</property> |
| 1113 | - <child> |
| 1114 | - <object class="GtkImage" id="image12"> |
| 1115 | - <property name="visible">True</property> |
| 1116 | - <property name="can_focus">False</property> |
| 1117 | - <property name="xalign">0</property> |
| 1118 | - <property name="yalign">0</property> |
| 1119 | - <property name="stock">gtk-dialog-question</property> |
| 1120 | - <property name="icon-size">6</property> |
| 1121 | - </object> |
| 1122 | - <packing> |
| 1123 | - <property name="expand">False</property> |
| 1124 | - <property name="fill">False</property> |
| 1125 | - <property name="position">0</property> |
| 1126 | - </packing> |
| 1127 | - </child> |
| 1128 | - <child> |
| 1129 | - <object class="GtkVBox" id="vbox13"> |
| 1130 | - <property name="visible">True</property> |
| 1131 | - <property name="can_focus">False</property> |
| 1132 | - <property name="spacing">12</property> |
| 1133 | - <child> |
| 1134 | - <object class="GtkLabel" id="label_conffile"> |
| 1135 | - <property name="visible">True</property> |
| 1136 | - <property name="can_focus">False</property> |
| 1137 | - <property name="xalign">0</property> |
| 1138 | - <property name="use_markup">True</property> |
| 1139 | - <property name="wrap">True</property> |
| 1140 | - </object> |
| 1141 | - <packing> |
| 1142 | - <property name="expand">False</property> |
| 1143 | - <property name="fill">False</property> |
| 1144 | - <property name="position">0</property> |
| 1145 | - </packing> |
| 1146 | - </child> |
| 1147 | - </object> |
| 1148 | - <packing> |
| 1149 | - <property name="expand">True</property> |
| 1150 | - <property name="fill">True</property> |
| 1151 | - <property name="position">1</property> |
| 1152 | - </packing> |
| 1153 | - </child> |
| 1154 | - </object> |
| 1155 | - <packing> |
| 1156 | - <property name="expand">False</property> |
| 1157 | - <property name="fill">True</property> |
| 1158 | - <property name="position">1</property> |
| 1159 | - </packing> |
| 1160 | - </child> |
| 1161 | - <child> |
| 1162 | - <object class="GtkExpander" id="expander3"> |
| 1163 | - <property name="visible">True</property> |
| 1164 | - <property name="can_focus">True</property> |
| 1165 | - <child> |
| 1166 | - <object class="GtkVBox" id="vbox14"> |
| 1167 | - <property name="visible">True</property> |
| 1168 | - <property name="can_focus">False</property> |
| 1169 | - <child> |
| 1170 | - <object class="GtkScrolledWindow" id="scrolledwindow5"> |
| 1171 | - <property name="visible">True</property> |
| 1172 | - <property name="can_focus">True</property> |
| 1173 | - <property name="shadow_type">in</property> |
| 1174 | - <child> |
| 1175 | - <object class="GtkTextView" id="textview_conffile"> |
| 1176 | - <property name="height_request">300</property> |
| 1177 | - <property name="visible">True</property> |
| 1178 | - <property name="can_focus">True</property> |
| 1179 | - <property name="editable">False</property> |
| 1180 | - <property name="cursor_visible">False</property> |
| 1181 | - </object> |
| 1182 | - </child> |
| 1183 | - </object> |
| 1184 | - <packing> |
| 1185 | - <property name="expand">False</property> |
| 1186 | - <property name="fill">False</property> |
| 1187 | - <property name="position">0</property> |
| 1188 | - </packing> |
| 1189 | - </child> |
| 1190 | - </object> |
| 1191 | - </child> |
| 1192 | - <child type="label"> |
| 1193 | - <object class="GtkLabel" id="label33"> |
| 1194 | - <property name="visible">True</property> |
| 1195 | - <property name="can_focus">False</property> |
| 1196 | - <property name="label" translatable="yes">Difference between the files</property> |
| 1197 | - </object> |
| 1198 | - </child> |
| 1199 | - </object> |
| 1200 | - <packing> |
| 1201 | - <property name="expand">False</property> |
| 1202 | - <property name="fill">True</property> |
| 1203 | - <property name="position">2</property> |
| 1204 | - </packing> |
| 1205 | - </child> |
| 1206 | - </object> |
| 1207 | - </child> |
| 1208 | - <action-widgets> |
| 1209 | - <action-widget response="-9">button9</action-widget> |
| 1210 | - <action-widget response="-8">button10</action-widget> |
| 1211 | - </action-widgets> |
| 1212 | - </object> |
| 1213 | - <object class="GtkDialog" id="dialog_error"> |
| 1214 | - <property name="can_focus">False</property> |
| 1215 | - <property name="border_width">6</property> |
| 1216 | - <property name="resizable">False</property> |
| 1217 | - <property name="window_position">center-on-parent</property> |
| 1218 | - <property name="type_hint">dialog</property> |
| 1219 | - <property name="skip_taskbar_hint">True</property> |
| 1220 | - <property name="skip_pager_hint">True</property> |
| 1221 | - <property name="urgency_hint">True</property> |
| 1222 | - <child internal-child="vbox"> |
| 1223 | - <object class="GtkBox" id="vbox6"> |
| 1224 | - <property name="visible">True</property> |
| 1225 | - <property name="can_focus">False</property> |
| 1226 | - <property name="spacing">12</property> |
| 1227 | - <child internal-child="action_area"> |
| 1228 | - <object class="GtkButtonBox" id="hbuttonbox3"> |
| 1229 | - <property name="visible">True</property> |
| 1230 | - <property name="can_focus">False</property> |
| 1231 | - <property name="layout_style">end</property> |
| 1232 | - <child> |
| 1233 | - <object class="GtkButton" id="button_bugreport"> |
| 1234 | - <property name="label" translatable="yes">_Report Bug</property> |
| 1235 | - <property name="can_focus">True</property> |
| 1236 | - <property name="can_default">True</property> |
| 1237 | - <property name="has_default">True</property> |
| 1238 | - <property name="receives_default">False</property> |
| 1239 | - <property name="use_action_appearance">False</property> |
| 1240 | - <property name="use_underline">True</property> |
| 1241 | - </object> |
| 1242 | - <packing> |
| 1243 | - <property name="expand">False</property> |
| 1244 | - <property name="fill">False</property> |
| 1245 | - <property name="position">0</property> |
| 1246 | - </packing> |
| 1247 | - </child> |
| 1248 | - <child> |
| 1249 | - <object class="GtkButton" id="button6"> |
| 1250 | - <property name="label">gtk-close</property> |
| 1251 | - <property name="visible">True</property> |
| 1252 | - <property name="can_focus">True</property> |
| 1253 | - <property name="can_default">True</property> |
| 1254 | - <property name="has_default">True</property> |
| 1255 | - <property name="receives_default">False</property> |
| 1256 | - <property name="use_action_appearance">False</property> |
| 1257 | - <property name="use_stock">True</property> |
| 1258 | - </object> |
| 1259 | - <packing> |
| 1260 | - <property name="expand">False</property> |
| 1261 | - <property name="fill">False</property> |
| 1262 | - <property name="position">1</property> |
| 1263 | - </packing> |
| 1264 | - </child> |
| 1265 | - </object> |
| 1266 | - <packing> |
| 1267 | - <property name="expand">False</property> |
| 1268 | - <property name="fill">True</property> |
| 1269 | - <property name="pack_type">end</property> |
| 1270 | - <property name="position">0</property> |
| 1271 | - </packing> |
| 1272 | - </child> |
| 1273 | - <child> |
| 1274 | - <object class="GtkHBox" id="hbox8"> |
| 1275 | - <property name="visible">True</property> |
| 1276 | - <property name="can_focus">False</property> |
| 1277 | - <property name="border_width">6</property> |
| 1278 | - <property name="spacing">12</property> |
| 1279 | - <child> |
| 1280 | - <object class="GtkImage" id="image5"> |
| 1281 | - <property name="visible">True</property> |
| 1282 | - <property name="can_focus">False</property> |
| 1283 | - <property name="xalign">0</property> |
| 1284 | - <property name="yalign">0</property> |
| 1285 | - <property name="stock">gtk-dialog-error</property> |
| 1286 | - <property name="icon-size">6</property> |
| 1287 | - </object> |
| 1288 | - <packing> |
| 1289 | - <property name="expand">False</property> |
| 1290 | - <property name="fill">True</property> |
| 1291 | - <property name="position">0</property> |
| 1292 | - </packing> |
| 1293 | - </child> |
| 1294 | - <child> |
| 1295 | - <object class="GtkVBox" id="vbox7"> |
| 1296 | - <property name="visible">True</property> |
| 1297 | - <property name="can_focus">False</property> |
| 1298 | - <property name="spacing">12</property> |
| 1299 | - <child> |
| 1300 | - <object class="GtkLabel" id="label_error"> |
| 1301 | - <property name="visible">True</property> |
| 1302 | - <property name="can_focus">True</property> |
| 1303 | - <property name="xalign">0</property> |
| 1304 | - <property name="use_markup">True</property> |
| 1305 | - <property name="wrap">True</property> |
| 1306 | - <property name="selectable">True</property> |
| 1307 | - </object> |
| 1308 | - <packing> |
| 1309 | - <property name="expand">False</property> |
| 1310 | - <property name="fill">True</property> |
| 1311 | - <property name="position">0</property> |
| 1312 | - </packing> |
| 1313 | - </child> |
| 1314 | - <child> |
| 1315 | - <object class="GtkScrolledWindow" id="scroll_error"> |
| 1316 | - <property name="width_request">400</property> |
| 1317 | - <property name="height_request">200</property> |
| 1318 | - <property name="can_focus">True</property> |
| 1319 | - <property name="shadow_type">in</property> |
| 1320 | - <child> |
| 1321 | - <object class="GtkTextView" id="textview_error"> |
| 1322 | - <property name="visible">True</property> |
| 1323 | - <property name="can_focus">True</property> |
| 1324 | - <property name="pixels_above_lines">4</property> |
| 1325 | - <property name="pixels_below_lines">4</property> |
| 1326 | - <property name="editable">False</property> |
| 1327 | - <property name="left_margin">4</property> |
| 1328 | - <property name="right_margin">4</property> |
| 1329 | - </object> |
| 1330 | - </child> |
| 1331 | - </object> |
| 1332 | - <packing> |
| 1333 | - <property name="expand">True</property> |
| 1334 | - <property name="fill">True</property> |
| 1335 | - <property name="position">1</property> |
| 1336 | - </packing> |
| 1337 | - </child> |
| 1338 | - </object> |
| 1339 | - <packing> |
| 1340 | - <property name="expand">True</property> |
| 1341 | - <property name="fill">True</property> |
| 1342 | - <property name="position">1</property> |
| 1343 | - </packing> |
| 1344 | - </child> |
| 1345 | - </object> |
| 1346 | - <packing> |
| 1347 | - <property name="expand">False</property> |
| 1348 | - <property name="fill">True</property> |
| 1349 | - <property name="position">1</property> |
| 1350 | - </packing> |
| 1351 | - </child> |
| 1352 | - </object> |
| 1353 | - </child> |
| 1354 | - <action-widgets> |
| 1355 | - <action-widget response="-8">button_bugreport</action-widget> |
| 1356 | - <action-widget response="-7">button6</action-widget> |
| 1357 | - </action-widgets> |
| 1358 | - </object> |
| 1359 | - <object class="GtkDialog" id="dialog_information"> |
| 1360 | - <property name="can_focus">False</property> |
| 1361 | - <property name="border_width">6</property> |
| 1362 | - <property name="resizable">False</property> |
| 1363 | - <property name="window_position">center-on-parent</property> |
| 1364 | - <property name="type_hint">dialog</property> |
| 1365 | - <property name="skip_taskbar_hint">True</property> |
| 1366 | - <property name="skip_pager_hint">True</property> |
| 1367 | - <property name="urgency_hint">True</property> |
| 1368 | - <child internal-child="vbox"> |
| 1369 | - <object class="GtkBox" id="vbox15"> |
| 1370 | - <property name="visible">True</property> |
| 1371 | - <property name="can_focus">False</property> |
| 1372 | - <property name="spacing">12</property> |
| 1373 | - <child internal-child="action_area"> |
| 1374 | - <object class="GtkButtonBox" id="hbuttonbox7"> |
| 1375 | - <property name="visible">True</property> |
| 1376 | - <property name="can_focus">False</property> |
| 1377 | - <property name="layout_style">end</property> |
| 1378 | - <child> |
| 1379 | - <object class="GtkButton" id="button12"> |
| 1380 | - <property name="label">gtk-close</property> |
| 1381 | - <property name="visible">True</property> |
| 1382 | - <property name="can_focus">True</property> |
| 1383 | - <property name="can_default">True</property> |
| 1384 | - <property name="has_default">True</property> |
| 1385 | - <property name="receives_default">False</property> |
| 1386 | - <property name="use_action_appearance">False</property> |
| 1387 | - <property name="use_stock">True</property> |
| 1388 | - </object> |
| 1389 | - <packing> |
| 1390 | - <property name="expand">False</property> |
| 1391 | - <property name="fill">False</property> |
| 1392 | - <property name="position">0</property> |
| 1393 | - </packing> |
| 1394 | - </child> |
| 1395 | - </object> |
| 1396 | - <packing> |
| 1397 | - <property name="expand">False</property> |
| 1398 | - <property name="fill">True</property> |
| 1399 | - <property name="pack_type">end</property> |
| 1400 | - <property name="position">0</property> |
| 1401 | - </packing> |
| 1402 | - </child> |
| 1403 | - <child> |
| 1404 | - <object class="GtkHBox" id="hbox16"> |
| 1405 | - <property name="visible">True</property> |
| 1406 | - <property name="can_focus">False</property> |
| 1407 | - <property name="border_width">6</property> |
| 1408 | - <property name="spacing">12</property> |
| 1409 | - <child> |
| 1410 | - <object class="GtkImage" id="image13"> |
| 1411 | - <property name="visible">True</property> |
| 1412 | - <property name="can_focus">False</property> |
| 1413 | - <property name="xalign">0</property> |
| 1414 | - <property name="yalign">0</property> |
| 1415 | - <property name="stock">gtk-dialog-info</property> |
| 1416 | - <property name="icon-size">6</property> |
| 1417 | - </object> |
| 1418 | - <packing> |
| 1419 | - <property name="expand">False</property> |
| 1420 | - <property name="fill">True</property> |
| 1421 | - <property name="position">0</property> |
| 1422 | - </packing> |
| 1423 | - </child> |
| 1424 | - <child> |
| 1425 | - <object class="GtkVBox" id="vbox16"> |
| 1426 | - <property name="visible">True</property> |
| 1427 | - <property name="can_focus">False</property> |
| 1428 | - <property name="spacing">12</property> |
| 1429 | - <child> |
| 1430 | - <object class="GtkLabel" id="label_information"> |
| 1431 | - <property name="visible">True</property> |
| 1432 | - <property name="can_focus">True</property> |
| 1433 | - <property name="xalign">0</property> |
| 1434 | - <property name="use_markup">True</property> |
| 1435 | - <property name="wrap">True</property> |
| 1436 | - <property name="selectable">True</property> |
| 1437 | - </object> |
| 1438 | - <packing> |
| 1439 | - <property name="expand">False</property> |
| 1440 | - <property name="fill">True</property> |
| 1441 | - <property name="position">0</property> |
| 1442 | - </packing> |
| 1443 | - </child> |
| 1444 | - <child> |
| 1445 | - <object class="GtkScrolledWindow" id="scroll_information"> |
| 1446 | - <property name="width_request">400</property> |
| 1447 | - <property name="height_request">200</property> |
| 1448 | - <property name="can_focus">True</property> |
| 1449 | - <property name="shadow_type">in</property> |
| 1450 | - <child> |
| 1451 | - <object class="GtkTextView" id="textview_information"> |
| 1452 | - <property name="visible">True</property> |
| 1453 | - <property name="can_focus">True</property> |
| 1454 | - <property name="pixels_above_lines">4</property> |
| 1455 | - <property name="pixels_below_lines">4</property> |
| 1456 | - <property name="editable">False</property> |
| 1457 | - <property name="left_margin">4</property> |
| 1458 | - <property name="right_margin">4</property> |
| 1459 | - </object> |
| 1460 | - </child> |
| 1461 | - </object> |
| 1462 | - <packing> |
| 1463 | - <property name="expand">True</property> |
| 1464 | - <property name="fill">True</property> |
| 1465 | - <property name="position">1</property> |
| 1466 | - </packing> |
| 1467 | - </child> |
| 1468 | - </object> |
| 1469 | - <packing> |
| 1470 | - <property name="expand">True</property> |
| 1471 | - <property name="fill">True</property> |
| 1472 | - <property name="position">1</property> |
| 1473 | - </packing> |
| 1474 | - </child> |
| 1475 | - </object> |
| 1476 | - <packing> |
| 1477 | - <property name="expand">False</property> |
| 1478 | - <property name="fill">True</property> |
| 1479 | - <property name="position">1</property> |
| 1480 | - </packing> |
| 1481 | - </child> |
| 1482 | - </object> |
| 1483 | - </child> |
| 1484 | - <action-widgets> |
| 1485 | - <action-widget response="-5">button12</action-widget> |
| 1486 | - </action-widgets> |
| 1487 | - </object> |
| 1488 | - <object class="GtkDialog" id="dialog_obsolete"> |
| 1489 | - <property name="can_focus">False</property> |
| 1490 | - <property name="border_width">6</property> |
| 1491 | - <property name="resizable">False</property> |
| 1492 | - <property name="window_position">center-on-parent</property> |
| 1493 | - <property name="default_width">500</property> |
| 1494 | - <property name="default_height">400</property> |
| 1495 | - <property name="type_hint">dialog</property> |
| 1496 | - <property name="skip_taskbar_hint">True</property> |
| 1497 | - <property name="skip_pager_hint">True</property> |
| 1498 | - <property name="urgency_hint">True</property> |
| 1499 | - <child internal-child="vbox"> |
| 1500 | - <object class="GtkBox" id="vbox8"> |
| 1501 | - <property name="visible">True</property> |
| 1502 | - <property name="can_focus">False</property> |
| 1503 | - <property name="spacing">6</property> |
| 1504 | - <child internal-child="action_area"> |
| 1505 | - <object class="GtkButtonBox" id="hbuttonbox4"> |
| 1506 | - <property name="visible">True</property> |
| 1507 | - <property name="can_focus">False</property> |
| 1508 | - <property name="layout_style">end</property> |
| 1509 | - <child> |
| 1510 | - <object class="GtkButton" id="button7"> |
| 1511 | - <property name="label">gtk-cancel</property> |
| 1512 | - <property name="visible">True</property> |
| 1513 | - <property name="can_focus">True</property> |
| 1514 | - <property name="can_default">True</property> |
| 1515 | - <property name="receives_default">False</property> |
| 1516 | - <property name="use_action_appearance">False</property> |
| 1517 | - <property name="use_stock">True</property> |
| 1518 | - </object> |
| 1519 | - <packing> |
| 1520 | - <property name="expand">False</property> |
| 1521 | - <property name="fill">False</property> |
| 1522 | - <property name="position">0</property> |
| 1523 | - </packing> |
| 1524 | - </child> |
| 1525 | - <child> |
| 1526 | - <object class="GtkButton" id="button8"> |
| 1527 | - <property name="label" translatable="yes">_Continue</property> |
| 1528 | - <property name="visible">True</property> |
| 1529 | - <property name="can_focus">True</property> |
| 1530 | - <property name="can_default">True</property> |
| 1531 | - <property name="receives_default">False</property> |
| 1532 | - <property name="use_action_appearance">False</property> |
| 1533 | - <property name="use_underline">True</property> |
| 1534 | - </object> |
| 1535 | - <packing> |
| 1536 | - <property name="expand">False</property> |
| 1537 | - <property name="fill">False</property> |
| 1538 | - <property name="position">1</property> |
| 1539 | - </packing> |
| 1540 | - </child> |
| 1541 | - </object> |
| 1542 | - <packing> |
| 1543 | - <property name="expand">False</property> |
| 1544 | - <property name="fill">True</property> |
| 1545 | - <property name="pack_type">end</property> |
| 1546 | - <property name="position">0</property> |
| 1547 | - </packing> |
| 1548 | - </child> |
| 1549 | - <child> |
| 1550 | - <object class="GtkVBox" id="vbox9"> |
| 1551 | - <property name="visible">True</property> |
| 1552 | - <property name="can_focus">False</property> |
| 1553 | - <property name="border_width">6</property> |
| 1554 | - <property name="spacing">12</property> |
| 1555 | - <child> |
| 1556 | - <object class="GtkHBox" id="hbox9"> |
| 1557 | - <property name="visible">True</property> |
| 1558 | - <property name="can_focus">False</property> |
| 1559 | - <property name="spacing">12</property> |
| 1560 | - <child> |
| 1561 | - <object class="GtkImage" id="image6"> |
| 1562 | - <property name="visible">True</property> |
| 1563 | - <property name="can_focus">False</property> |
| 1564 | - <property name="xalign">0</property> |
| 1565 | - <property name="yalign">0</property> |
| 1566 | - <property name="stock">gtk-dialog-warning</property> |
| 1567 | - <property name="icon-size">6</property> |
| 1568 | - </object> |
| 1569 | - <packing> |
| 1570 | - <property name="expand">False</property> |
| 1571 | - <property name="fill">True</property> |
| 1572 | - <property name="position">0</property> |
| 1573 | - </packing> |
| 1574 | - </child> |
| 1575 | - <child> |
| 1576 | - <object class="GtkVBox" id="vbox10"> |
| 1577 | - <property name="visible">True</property> |
| 1578 | - <property name="can_focus">False</property> |
| 1579 | - <property name="spacing">12</property> |
| 1580 | - <child> |
| 1581 | - <object class="GtkLabel" id="label26"> |
| 1582 | - <property name="visible">True</property> |
| 1583 | - <property name="can_focus">False</property> |
| 1584 | - <property name="xalign">0</property> |
| 1585 | - <property name="yalign">0</property> |
| 1586 | - <property name="label" translatable="yes"><b><big>Start the upgrade?</big></b></property> |
| 1587 | - <property name="use_markup">True</property> |
| 1588 | - <property name="wrap">True</property> |
| 1589 | - </object> |
| 1590 | - <packing> |
| 1591 | - <property name="expand">False</property> |
| 1592 | - <property name="fill">False</property> |
| 1593 | - <property name="position">0</property> |
| 1594 | - </packing> |
| 1595 | - </child> |
| 1596 | - <child> |
| 1597 | - <object class="GtkLabel" id="label27"> |
| 1598 | - <property name="visible">True</property> |
| 1599 | - <property name="can_focus">False</property> |
| 1600 | - <property name="xalign">0</property> |
| 1601 | - <property name="yalign">0</property> |
| 1602 | - <property name="wrap">True</property> |
| 1603 | - </object> |
| 1604 | - <packing> |
| 1605 | - <property name="expand">False</property> |
| 1606 | - <property name="fill">False</property> |
| 1607 | - <property name="position">1</property> |
| 1608 | - </packing> |
| 1609 | - </child> |
| 1610 | - <child> |
| 1611 | - <object class="GtkExpander" id="expander2"> |
| 1612 | - <property name="visible">True</property> |
| 1613 | - <property name="can_focus">True</property> |
| 1614 | - <child> |
| 1615 | - <object class="GtkScrolledWindow" id="scrolledwindow4"> |
| 1616 | - <property name="width_request">400</property> |
| 1617 | - <property name="height_request">200</property> |
| 1618 | - <property name="visible">True</property> |
| 1619 | - <property name="can_focus">True</property> |
| 1620 | - <property name="shadow_type">in</property> |
| 1621 | - <child> |
| 1622 | - <object class="GtkTreeView" id="treeview2"> |
| 1623 | - <property name="visible">True</property> |
| 1624 | - <property name="can_focus">True</property> |
| 1625 | - <property name="headers_visible">False</property> |
| 1626 | - </object> |
| 1627 | - </child> |
| 1628 | - </object> |
| 1629 | - </child> |
| 1630 | - <child type="label"> |
| 1631 | - <object class="GtkLabel" id="label25"> |
| 1632 | - <property name="visible">True</property> |
| 1633 | - <property name="can_focus">False</property> |
| 1634 | - <property name="label" translatable="yes">Details</property> |
| 1635 | - </object> |
| 1636 | - </child> |
| 1637 | - </object> |
| 1638 | - <packing> |
| 1639 | - <property name="expand">False</property> |
| 1640 | - <property name="fill">False</property> |
| 1641 | - <property name="position">2</property> |
| 1642 | - </packing> |
| 1643 | - </child> |
| 1644 | - </object> |
| 1645 | - <packing> |
| 1646 | - <property name="expand">False</property> |
| 1647 | - <property name="fill">False</property> |
| 1648 | - <property name="position">1</property> |
| 1649 | - </packing> |
| 1650 | - </child> |
| 1651 | - </object> |
| 1652 | - <packing> |
| 1653 | - <property name="expand">False</property> |
| 1654 | - <property name="fill">False</property> |
| 1655 | - <property name="position">0</property> |
| 1656 | - </packing> |
| 1657 | - </child> |
| 1658 | - </object> |
| 1659 | - <packing> |
| 1660 | - <property name="expand">False</property> |
| 1661 | - <property name="fill">True</property> |
| 1662 | - <property name="position">1</property> |
| 1663 | - </packing> |
| 1664 | - </child> |
| 1665 | - </object> |
| 1666 | - </child> |
| 1667 | - <action-widgets> |
| 1668 | - <action-widget response="-6">button7</action-widget> |
| 1669 | - <action-widget response="-8">button8</action-widget> |
| 1670 | - </action-widgets> |
| 1671 | - </object> |
| 1672 | - <object class="GtkDialog" id="dialog_restart"> |
| 1673 | - <property name="can_focus">False</property> |
| 1674 | - <property name="border_width">6</property> |
| 1675 | - <property name="resizable">False</property> |
| 1676 | - <property name="window_position">center-on-parent</property> |
| 1677 | - <property name="type_hint">dialog</property> |
| 1678 | - <property name="skip_taskbar_hint">True</property> |
| 1679 | - <property name="skip_pager_hint">True</property> |
| 1680 | - <property name="urgency_hint">True</property> |
| 1681 | - <child internal-child="vbox"> |
| 1682 | - <object class="GtkBox" id="dialog-vbox1"> |
| 1683 | - <property name="visible">True</property> |
| 1684 | - <property name="can_focus">False</property> |
| 1685 | - <property name="spacing">12</property> |
| 1686 | - <child internal-child="action_area"> |
| 1687 | - <object class="GtkButtonBox" id="dialog-action_area1"> |
| 1688 | - <property name="visible">True</property> |
| 1689 | - <property name="can_focus">False</property> |
| 1690 | - <property name="layout_style">end</property> |
| 1691 | - <child> |
| 1692 | - <object class="GtkButton" id="button_restart"> |
| 1693 | - <property name="visible">True</property> |
| 1694 | - <property name="can_focus">True</property> |
| 1695 | - <property name="can_default">True</property> |
| 1696 | - <property name="receives_default">False</property> |
| 1697 | - <property name="use_action_appearance">False</property> |
| 1698 | - <child> |
| 1699 | - <object class="GtkAlignment" id="alignment1"> |
| 1700 | - <property name="visible">True</property> |
| 1701 | - <property name="can_focus">False</property> |
| 1702 | - <property name="xscale">0</property> |
| 1703 | - <property name="yscale">0</property> |
| 1704 | - <child> |
| 1705 | - <object class="GtkHBox" id="hbox6"> |
| 1706 | - <property name="visible">True</property> |
| 1707 | - <property name="can_focus">False</property> |
| 1708 | - <property name="spacing">2</property> |
| 1709 | - <child> |
| 1710 | - <object class="GtkImage" id="image3"> |
| 1711 | - <property name="visible">True</property> |
| 1712 | - <property name="can_focus">False</property> |
| 1713 | - <property name="stock">gtk-refresh</property> |
| 1714 | - </object> |
| 1715 | - <packing> |
| 1716 | - <property name="expand">False</property> |
| 1717 | - <property name="fill">False</property> |
| 1718 | - <property name="position">0</property> |
| 1719 | - </packing> |
| 1720 | - </child> |
| 1721 | - <child> |
| 1722 | - <object class="GtkLabel" id="label20"> |
| 1723 | - <property name="visible">True</property> |
| 1724 | - <property name="can_focus">False</property> |
| 1725 | - <property name="label" translatable="yes">_Restart Now</property> |
| 1726 | - <property name="use_underline">True</property> |
| 1727 | - </object> |
| 1728 | - <packing> |
| 1729 | - <property name="expand">False</property> |
| 1730 | - <property name="fill">False</property> |
| 1731 | - <property name="position">1</property> |
| 1732 | - </packing> |
| 1733 | - </child> |
| 1734 | - </object> |
| 1735 | - </child> |
| 1736 | - </object> |
| 1737 | - </child> |
| 1738 | - </object> |
| 1739 | - <packing> |
| 1740 | - <property name="expand">False</property> |
| 1741 | - <property name="fill">False</property> |
| 1742 | - <property name="position">0</property> |
| 1743 | - </packing> |
| 1744 | - </child> |
| 1745 | - <child> |
| 1746 | - <object class="GtkButton" id="button_restart1"> |
| 1747 | - <property name="label">gtk-close</property> |
| 1748 | - <property name="visible">True</property> |
| 1749 | - <property name="can_focus">True</property> |
| 1750 | - <property name="can_default">True</property> |
| 1751 | - <property name="receives_default">False</property> |
| 1752 | - <property name="use_action_appearance">False</property> |
| 1753 | - <property name="use_stock">True</property> |
| 1754 | - </object> |
| 1755 | - <packing> |
| 1756 | - <property name="expand">False</property> |
| 1757 | - <property name="fill">False</property> |
| 1758 | - <property name="position">1</property> |
| 1759 | - </packing> |
| 1760 | - </child> |
| 1761 | - </object> |
| 1762 | - <packing> |
| 1763 | - <property name="expand">False</property> |
| 1764 | - <property name="fill">True</property> |
| 1765 | - <property name="pack_type">end</property> |
| 1766 | - <property name="position">0</property> |
| 1767 | - </packing> |
| 1768 | - </child> |
| 1769 | - <child> |
| 1770 | - <object class="GtkHBox" id="hbox5"> |
| 1771 | - <property name="visible">True</property> |
| 1772 | - <property name="can_focus">False</property> |
| 1773 | - <property name="border_width">6</property> |
| 1774 | - <property name="spacing">12</property> |
| 1775 | - <child> |
| 1776 | - <object class="GtkImage" id="image2"> |
| 1777 | - <property name="visible">True</property> |
| 1778 | - <property name="can_focus">False</property> |
| 1779 | - <property name="xalign">0</property> |
| 1780 | - <property name="yalign">0</property> |
| 1781 | - <property name="stock">gtk-dialog-info</property> |
| 1782 | - <property name="icon-size">6</property> |
| 1783 | - </object> |
| 1784 | - <packing> |
| 1785 | - <property name="expand">False</property> |
| 1786 | - <property name="fill">True</property> |
| 1787 | - <property name="position">0</property> |
| 1788 | - </packing> |
| 1789 | - </child> |
| 1790 | - <child> |
| 1791 | - <object class="GtkLabel" id="label19"> |
| 1792 | - <property name="visible">True</property> |
| 1793 | - <property name="can_focus">False</property> |
| 1794 | - <property name="xalign">0</property> |
| 1795 | - <property name="yalign">0</property> |
| 1796 | - <property name="label" translatable="yes"><b><big>Restart the system to complete the upgrade</big></b> |
| 1797 | - |
| 1798 | -Please save your work before continuing.</property> |
| 1799 | - <property name="use_markup">True</property> |
| 1800 | - </object> |
| 1801 | - <packing> |
| 1802 | - <property name="expand">False</property> |
| 1803 | - <property name="fill">False</property> |
| 1804 | - <property name="position">1</property> |
| 1805 | - </packing> |
| 1806 | - </child> |
| 1807 | - </object> |
| 1808 | - <packing> |
| 1809 | - <property name="expand">False</property> |
| 1810 | - <property name="fill">True</property> |
| 1811 | - <property name="position">1</property> |
| 1812 | - </packing> |
| 1813 | - </child> |
| 1814 | - </object> |
| 1815 | - </child> |
| 1816 | - <action-widgets> |
| 1817 | - <action-widget response="-8">button_restart</action-widget> |
| 1818 | - <action-widget response="-5">button_restart1</action-widget> |
| 1819 | - </action-widgets> |
| 1820 | - </object> |
| 1821 | - <object class="GtkWindow" id="window_main"> |
| 1822 | - <property name="visible">True</property> |
| 1823 | - <property name="can_focus">False</property> |
| 1824 | - <property name="border_width">6</property> |
| 1825 | - <property name="title" translatable="yes">Distribution Upgrade</property> |
| 1826 | - <property name="resizable">False</property> |
| 1827 | - <property name="window_position">center</property> |
| 1828 | - <property name="urgency_hint">True</property> |
| 1829 | - <signal name="delete-event" handler="on_window_main_delete_event" swapped="no"/> |
| 1830 | - <child> |
| 1831 | - <object class="GtkVBox" id="vbox5"> |
| 1832 | - <property name="visible">True</property> |
| 1833 | - <property name="can_focus">False</property> |
| 1834 | - <property name="spacing">12</property> |
| 1835 | - <child> |
| 1836 | - <object class="GtkVBox" id="vbox_main"> |
| 1837 | - <property name="visible">True</property> |
| 1838 | - <property name="can_focus">False</property> |
| 1839 | - <property name="border_width">6</property> |
| 1840 | - <property name="spacing">12</property> |
| 1841 | - <child> |
| 1842 | - <object class="GtkLabel" id="label_title"> |
| 1843 | - <property name="visible">True</property> |
| 1844 | - <property name="can_focus">False</property> |
| 1845 | - <property name="xalign">0</property> |
| 1846 | - <property name="label" translatable="yes"><b><big>Upgrading Ubuntu to version 12.10</big></b></property> |
| 1847 | - <property name="use_markup">True</property> |
| 1848 | - </object> |
| 1849 | - <packing> |
| 1850 | - <property name="expand">False</property> |
| 1851 | - <property name="fill">False</property> |
| 1852 | - <property name="position">0</property> |
| 1853 | - </packing> |
| 1854 | - </child> |
| 1855 | - <child> |
| 1856 | - <object class="GtkHBox" id="hbox3"> |
| 1857 | - <property name="visible">True</property> |
| 1858 | - <property name="can_focus">False</property> |
| 1859 | - <child> |
| 1860 | - <object class="GtkLabel" id="label17"> |
| 1861 | - <property name="visible">True</property> |
| 1862 | - <property name="can_focus">False</property> |
| 1863 | - <property name="label" translatable="yes"> </property> |
| 1864 | - </object> |
| 1865 | - <packing> |
| 1866 | - <property name="expand">False</property> |
| 1867 | - <property name="fill">False</property> |
| 1868 | - <property name="position">0</property> |
| 1869 | - </packing> |
| 1870 | - </child> |
| 1871 | - <child> |
| 1872 | - <object class="GtkTable" id="table_steps"> |
| 1873 | - <property name="visible">True</property> |
| 1874 | - <property name="can_focus">False</property> |
| 1875 | - <property name="n_rows">6</property> |
| 1876 | - <property name="n_columns">2</property> |
| 1877 | - <property name="column_spacing">6</property> |
| 1878 | - <property name="row_spacing">6</property> |
| 1879 | - <child> |
| 1880 | - <object class="GtkLabel" id="label_step1"> |
| 1881 | - <property name="visible">True</property> |
| 1882 | - <property name="can_focus">False</property> |
| 1883 | - <property name="xalign">0</property> |
| 1884 | - <property name="label" translatable="yes">Preparing to upgrade</property> |
| 1885 | - </object> |
| 1886 | - <packing> |
| 1887 | - <property name="left_attach">1</property> |
| 1888 | - <property name="right_attach">2</property> |
| 1889 | - <property name="x_options">GTK_FILL</property> |
| 1890 | - <property name="y_options"></property> |
| 1891 | - </packing> |
| 1892 | - </child> |
| 1893 | - <child> |
| 1894 | - <object class="GtkLabel" id="label_step2"> |
| 1895 | - <property name="visible">True</property> |
| 1896 | - <property name="can_focus">False</property> |
| 1897 | - <property name="xalign">0</property> |
| 1898 | - <property name="label" translatable="yes">Setting new software channels</property> |
| 1899 | - </object> |
| 1900 | - <packing> |
| 1901 | - <property name="left_attach">1</property> |
| 1902 | - <property name="right_attach">2</property> |
| 1903 | - <property name="top_attach">1</property> |
| 1904 | - <property name="bottom_attach">2</property> |
| 1905 | - <property name="x_options">GTK_FILL</property> |
| 1906 | - <property name="y_options"></property> |
| 1907 | - </packing> |
| 1908 | - </child> |
| 1909 | - <child> |
| 1910 | - <object class="GtkLabel" id="label_step3"> |
| 1911 | - <property name="visible">True</property> |
| 1912 | - <property name="can_focus">False</property> |
| 1913 | - <property name="xalign">0</property> |
| 1914 | - <property name="label" translatable="yes">Getting new packages</property> |
| 1915 | - </object> |
| 1916 | - <packing> |
| 1917 | - <property name="left_attach">1</property> |
| 1918 | - <property name="right_attach">2</property> |
| 1919 | - <property name="top_attach">2</property> |
| 1920 | - <property name="bottom_attach">3</property> |
| 1921 | - <property name="x_options">GTK_FILL</property> |
| 1922 | - <property name="y_options"></property> |
| 1923 | - </packing> |
| 1924 | - </child> |
| 1925 | - <child> |
| 1926 | - <object class="GtkHBox" id="hbox17"> |
| 1927 | - <property name="visible">True</property> |
| 1928 | - <property name="can_focus">False</property> |
| 1929 | - <child> |
| 1930 | - <object class="GtkArrow" id="arrow_step1"> |
| 1931 | - <property name="can_focus">False</property> |
| 1932 | - </object> |
| 1933 | - <packing> |
| 1934 | - <property name="expand">True</property> |
| 1935 | - <property name="fill">True</property> |
| 1936 | - <property name="position">0</property> |
| 1937 | - </packing> |
| 1938 | - </child> |
| 1939 | - <child> |
| 1940 | - <object class="GtkImage" id="image_step1"> |
| 1941 | - <property name="width_request">18</property> |
| 1942 | - <property name="height_request">18</property> |
| 1943 | - <property name="can_focus">False</property> |
| 1944 | - </object> |
| 1945 | - <packing> |
| 1946 | - <property name="expand">True</property> |
| 1947 | - <property name="fill">True</property> |
| 1948 | - <property name="position">1</property> |
| 1949 | - </packing> |
| 1950 | - </child> |
| 1951 | - </object> |
| 1952 | - <packing> |
| 1953 | - <property name="x_options">GTK_FILL</property> |
| 1954 | - <property name="y_options">GTK_FILL</property> |
| 1955 | - </packing> |
| 1956 | - </child> |
| 1957 | - <child> |
| 1958 | - <object class="GtkHBox" id="hbox18"> |
| 1959 | - <property name="visible">True</property> |
| 1960 | - <property name="can_focus">False</property> |
| 1961 | - <child> |
| 1962 | - <object class="GtkArrow" id="arrow_step2"> |
| 1963 | - <property name="can_focus">False</property> |
| 1964 | - </object> |
| 1965 | - <packing> |
| 1966 | - <property name="expand">True</property> |
| 1967 | - <property name="fill">True</property> |
| 1968 | - <property name="position">0</property> |
| 1969 | - </packing> |
| 1970 | - </child> |
| 1971 | - <child> |
| 1972 | - <object class="GtkImage" id="image_step2"> |
| 1973 | - <property name="width_request">18</property> |
| 1974 | - <property name="height_request">18</property> |
| 1975 | - <property name="can_focus">False</property> |
| 1976 | - </object> |
| 1977 | - <packing> |
| 1978 | - <property name="expand">True</property> |
| 1979 | - <property name="fill">True</property> |
| 1980 | - <property name="position">1</property> |
| 1981 | - </packing> |
| 1982 | - </child> |
| 1983 | - </object> |
| 1984 | - <packing> |
| 1985 | - <property name="top_attach">1</property> |
| 1986 | - <property name="bottom_attach">2</property> |
| 1987 | - <property name="x_options">GTK_FILL</property> |
| 1988 | - <property name="y_options">GTK_FILL</property> |
| 1989 | - </packing> |
| 1990 | - </child> |
| 1991 | - <child> |
| 1992 | - <object class="GtkHBox" id="hbox19"> |
| 1993 | - <property name="visible">True</property> |
| 1994 | - <property name="can_focus">False</property> |
| 1995 | - <child> |
| 1996 | - <object class="GtkArrow" id="arrow_step3"> |
| 1997 | - <property name="can_focus">False</property> |
| 1998 | - </object> |
| 1999 | - <packing> |
| 2000 | - <property name="expand">True</property> |
| 2001 | - <property name="fill">True</property> |
| 2002 | - <property name="position">0</property> |
| 2003 | - </packing> |
| 2004 | - </child> |
| 2005 | - <child> |
| 2006 | - <object class="GtkImage" id="image_step3"> |
| 2007 | - <property name="width_request">18</property> |
| 2008 | - <property name="height_request">18</property> |
| 2009 | - <property name="can_focus">False</property> |
| 2010 | - </object> |
| 2011 | - <packing> |
| 2012 | - <property name="expand">True</property> |
| 2013 | - <property name="fill">True</property> |
| 2014 | - <property name="position">1</property> |
| 2015 | - </packing> |
| 2016 | - </child> |
| 2017 | - </object> |
| 2018 | - <packing> |
| 2019 | - <property name="top_attach">2</property> |
| 2020 | - <property name="bottom_attach">3</property> |
| 2021 | - <property name="x_options">GTK_FILL</property> |
| 2022 | - <property name="y_options">GTK_FILL</property> |
| 2023 | - </packing> |
| 2024 | - </child> |
| 2025 | - <child> |
| 2026 | - <object class="GtkLabel" id="label_step6"> |
| 2027 | - <property name="visible">True</property> |
| 2028 | - <property name="can_focus">False</property> |
| 2029 | - <property name="xalign">0</property> |
| 2030 | - <property name="label" translatable="yes">Restarting the computer</property> |
| 2031 | - </object> |
| 2032 | - <packing> |
| 2033 | - <property name="left_attach">1</property> |
| 2034 | - <property name="right_attach">2</property> |
| 2035 | - <property name="top_attach">5</property> |
| 2036 | - <property name="bottom_attach">6</property> |
| 2037 | - <property name="x_options">GTK_FILL</property> |
| 2038 | - <property name="y_options"></property> |
| 2039 | - </packing> |
| 2040 | - </child> |
| 2041 | - <child> |
| 2042 | - <object class="GtkHBox" id="hbox21"> |
| 2043 | - <property name="visible">True</property> |
| 2044 | - <property name="can_focus">False</property> |
| 2045 | - <child> |
| 2046 | - <object class="GtkArrow" id="arrow_step6"> |
| 2047 | - <property name="can_focus">False</property> |
| 2048 | - </object> |
| 2049 | - <packing> |
| 2050 | - <property name="expand">True</property> |
| 2051 | - <property name="fill">True</property> |
| 2052 | - <property name="position">0</property> |
| 2053 | - </packing> |
| 2054 | - </child> |
| 2055 | - <child> |
| 2056 | - <object class="GtkImage" id="image_step6"> |
| 2057 | - <property name="width_request">18</property> |
| 2058 | - <property name="height_request">18</property> |
| 2059 | - <property name="can_focus">False</property> |
| 2060 | - </object> |
| 2061 | - <packing> |
| 2062 | - <property name="expand">True</property> |
| 2063 | - <property name="fill">True</property> |
| 2064 | - <property name="position">1</property> |
| 2065 | - </packing> |
| 2066 | - </child> |
| 2067 | - </object> |
| 2068 | - <packing> |
| 2069 | - <property name="top_attach">5</property> |
| 2070 | - <property name="bottom_attach">6</property> |
| 2071 | - <property name="x_options">GTK_FILL</property> |
| 2072 | - <property name="y_options">GTK_FILL</property> |
| 2073 | - </packing> |
| 2074 | - </child> |
| 2075 | - <child> |
| 2076 | - <object class="GtkHBox" id="hbox20"> |
| 2077 | - <property name="visible">True</property> |
| 2078 | - <property name="can_focus">False</property> |
| 2079 | - <child> |
| 2080 | - <object class="GtkArrow" id="arrow_step5"> |
| 2081 | - <property name="can_focus">False</property> |
| 2082 | - </object> |
| 2083 | - <packing> |
| 2084 | - <property name="expand">True</property> |
| 2085 | - <property name="fill">True</property> |
| 2086 | - <property name="position">0</property> |
| 2087 | - </packing> |
| 2088 | - </child> |
| 2089 | - <child> |
| 2090 | - <object class="GtkImage" id="image_step5"> |
| 2091 | - <property name="width_request">18</property> |
| 2092 | - <property name="height_request">18</property> |
| 2093 | - <property name="can_focus">False</property> |
| 2094 | - </object> |
| 2095 | - <packing> |
| 2096 | - <property name="expand">True</property> |
| 2097 | - <property name="fill">True</property> |
| 2098 | - <property name="position">1</property> |
| 2099 | - </packing> |
| 2100 | - </child> |
| 2101 | - </object> |
| 2102 | - <packing> |
| 2103 | - <property name="top_attach">4</property> |
| 2104 | - <property name="bottom_attach">5</property> |
| 2105 | - <property name="x_options">GTK_FILL</property> |
| 2106 | - <property name="y_options">GTK_FILL</property> |
| 2107 | - </packing> |
| 2108 | - </child> |
| 2109 | - <child> |
| 2110 | - <object class="GtkLabel" id="label_step5"> |
| 2111 | - <property name="visible">True</property> |
| 2112 | - <property name="can_focus">False</property> |
| 2113 | - <property name="xalign">0</property> |
| 2114 | - <property name="label" translatable="yes">Cleaning up</property> |
| 2115 | - </object> |
| 2116 | - <packing> |
| 2117 | - <property name="left_attach">1</property> |
| 2118 | - <property name="right_attach">2</property> |
| 2119 | - <property name="top_attach">4</property> |
| 2120 | - <property name="bottom_attach">5</property> |
| 2121 | - <property name="x_options">GTK_FILL</property> |
| 2122 | - <property name="y_options"></property> |
| 2123 | - </packing> |
| 2124 | - </child> |
| 2125 | - <child> |
| 2126 | - <object class="GtkLabel" id="label_step4"> |
| 2127 | - <property name="visible">True</property> |
| 2128 | - <property name="can_focus">False</property> |
| 2129 | - <property name="xalign">0</property> |
| 2130 | - <property name="label" translatable="yes">Installing the upgrades</property> |
| 2131 | - </object> |
| 2132 | - <packing> |
| 2133 | - <property name="left_attach">1</property> |
| 2134 | - <property name="right_attach">2</property> |
| 2135 | - <property name="top_attach">3</property> |
| 2136 | - <property name="bottom_attach">4</property> |
| 2137 | - <property name="x_options">GTK_FILL</property> |
| 2138 | - <property name="y_options"></property> |
| 2139 | - </packing> |
| 2140 | - </child> |
| 2141 | - <child> |
| 2142 | - <object class="GtkHBox" id="hbox22"> |
| 2143 | - <property name="visible">True</property> |
| 2144 | - <property name="can_focus">False</property> |
| 2145 | - <child> |
| 2146 | - <object class="GtkArrow" id="arrow_step4"> |
| 2147 | - <property name="can_focus">False</property> |
| 2148 | - </object> |
| 2149 | - <packing> |
| 2150 | - <property name="expand">True</property> |
| 2151 | - <property name="fill">True</property> |
| 2152 | - <property name="position">0</property> |
| 2153 | - </packing> |
| 2154 | - </child> |
| 2155 | - <child> |
| 2156 | - <object class="GtkImage" id="image_step4"> |
| 2157 | - <property name="width_request">18</property> |
| 2158 | - <property name="height_request">18</property> |
| 2159 | - <property name="can_focus">False</property> |
| 2160 | - </object> |
| 2161 | - <packing> |
| 2162 | - <property name="expand">True</property> |
| 2163 | - <property name="fill">True</property> |
| 2164 | - <property name="position">1</property> |
| 2165 | - </packing> |
| 2166 | - </child> |
| 2167 | - </object> |
| 2168 | - <packing> |
| 2169 | - <property name="top_attach">3</property> |
| 2170 | - <property name="bottom_attach">4</property> |
| 2171 | - <property name="x_options">GTK_FILL</property> |
| 2172 | - <property name="y_options">GTK_FILL</property> |
| 2173 | - </packing> |
| 2174 | - </child> |
| 2175 | - </object> |
| 2176 | - <packing> |
| 2177 | - <property name="expand">True</property> |
| 2178 | - <property name="fill">True</property> |
| 2179 | - <property name="position">1</property> |
| 2180 | - </packing> |
| 2181 | - </child> |
| 2182 | - </object> |
| 2183 | - <packing> |
| 2184 | - <property name="expand">True</property> |
| 2185 | - <property name="fill">True</property> |
| 2186 | - <property name="position">1</property> |
| 2187 | - </packing> |
| 2188 | - </child> |
| 2189 | - <child> |
| 2190 | - <object class="GtkVBox" id="vbox22"> |
| 2191 | - <property name="visible">True</property> |
| 2192 | - <property name="can_focus">False</property> |
| 2193 | - <property name="spacing">4</property> |
| 2194 | - <child> |
| 2195 | - <object class="GtkProgressBar" id="progressbar_cache"> |
| 2196 | - <property name="width_request">350</property> |
| 2197 | - <property name="visible">True</property> |
| 2198 | - <property name="can_focus">False</property> |
| 2199 | - <property name="pulse_step">0.10000000149</property> |
| 2200 | - <property name="text"> </property> |
| 2201 | - <property name="ellipsize">end</property> |
| 2202 | - </object> |
| 2203 | - <packing> |
| 2204 | - <property name="expand">False</property> |
| 2205 | - <property name="fill">False</property> |
| 2206 | - <property name="position">0</property> |
| 2207 | - </packing> |
| 2208 | - </child> |
| 2209 | - <child> |
| 2210 | - <object class="GtkLabel" id="label_status"> |
| 2211 | - <property name="visible">True</property> |
| 2212 | - <property name="can_focus">False</property> |
| 2213 | - <property name="xalign">0</property> |
| 2214 | - <property name="wrap">True</property> |
| 2215 | - <property name="ellipsize">end</property> |
| 2216 | - </object> |
| 2217 | - <packing> |
| 2218 | - <property name="expand">False</property> |
| 2219 | - <property name="fill">False</property> |
| 2220 | - <property name="position">1</property> |
| 2221 | - </packing> |
| 2222 | - </child> |
| 2223 | - </object> |
| 2224 | - <packing> |
| 2225 | - <property name="expand">True</property> |
| 2226 | - <property name="fill">True</property> |
| 2227 | - <property name="position">2</property> |
| 2228 | - </packing> |
| 2229 | - </child> |
| 2230 | - <child> |
| 2231 | - <object class="GtkHBox" id="hbox23"> |
| 2232 | - <property name="visible">True</property> |
| 2233 | - <property name="can_focus">False</property> |
| 2234 | - <child> |
| 2235 | - <object class="GtkExpander" id="expander_terminal"> |
| 2236 | - <property name="visible">True</property> |
| 2237 | - <property name="sensitive">False</property> |
| 2238 | - <property name="can_focus">True</property> |
| 2239 | - <property name="spacing">4</property> |
| 2240 | - <child> |
| 2241 | - <object class="GtkHBox" id="hbox_custom"> |
| 2242 | - <property name="visible">True</property> |
| 2243 | - <property name="can_focus">False</property> |
| 2244 | - </object> |
| 2245 | - </child> |
| 2246 | - <child type="label"> |
| 2247 | - <object class="GtkLabel" id="label6"> |
| 2248 | - <property name="visible">True</property> |
| 2249 | - <property name="can_focus">False</property> |
| 2250 | - <property name="label" translatable="yes">Terminal</property> |
| 2251 | - </object> |
| 2252 | - </child> |
| 2253 | - </object> |
| 2254 | - <packing> |
| 2255 | - <property name="expand">True</property> |
| 2256 | - <property name="fill">True</property> |
| 2257 | - <property name="position">0</property> |
| 2258 | - </packing> |
| 2259 | - </child> |
| 2260 | - <child> |
| 2261 | - <object class="GtkButton" id="button_fetch_cancel"> |
| 2262 | - <property name="label">gtk-cancel</property> |
| 2263 | - <property name="can_focus">True</property> |
| 2264 | - <property name="receives_default">False</property> |
| 2265 | - <property name="use_action_appearance">False</property> |
| 2266 | - <property name="use_stock">True</property> |
| 2267 | - </object> |
| 2268 | - <packing> |
| 2269 | - <property name="expand">False</property> |
| 2270 | - <property name="fill">False</property> |
| 2271 | - <property name="position">1</property> |
| 2272 | - </packing> |
| 2273 | - </child> |
| 2274 | - </object> |
| 2275 | - <packing> |
| 2276 | - <property name="expand">True</property> |
| 2277 | - <property name="fill">True</property> |
| 2278 | - <property name="position">3</property> |
| 2279 | - </packing> |
| 2280 | - </child> |
| 2281 | - </object> |
| 2282 | - <packing> |
| 2283 | - <property name="expand">True</property> |
| 2284 | - <property name="fill">True</property> |
| 2285 | - <property name="position">0</property> |
| 2286 | - </packing> |
| 2287 | - </child> |
| 2288 | - </object> |
| 2289 | - </child> |
| 2290 | - </object> |
| 2291 | -</interface> |
| 2292 | |
| 2293 | === removed file 'DistUpgrade/DistUpgradeApport.py' |
| 2294 | --- DistUpgrade/DistUpgradeApport.py 2012-06-18 18:41:13 +0000 |
| 2295 | +++ DistUpgrade/DistUpgradeApport.py 1970-01-01 00:00:00 +0000 |
| 2296 | @@ -1,91 +0,0 @@ |
| 2297 | - |
| 2298 | -import os |
| 2299 | -import logging |
| 2300 | -import subprocess |
| 2301 | -import sys |
| 2302 | -import gettext |
| 2303 | -import errno |
| 2304 | - |
| 2305 | - |
| 2306 | -def apport_crash(type, value, tb): |
| 2307 | - logging.debug("running apport_crash()") |
| 2308 | - try: |
| 2309 | - from apport_python_hook import apport_excepthook |
| 2310 | - from apport.report import Report |
| 2311 | - except ImportError as e: |
| 2312 | - logging.error("failed to import apport python module, can't report bug: %s" % e) |
| 2313 | - return False |
| 2314 | - # we pretend we are update-manager |
| 2315 | - sys.argv[0] = "/usr/bin/update-manager" |
| 2316 | - apport_excepthook(type, value, tb) |
| 2317 | - # now add the files in /var/log/dist-upgrade/* |
| 2318 | - if os.path.exists('/var/crash/_usr_bin_update-manager.0.crash'): |
| 2319 | - report = Report() |
| 2320 | - report.setdefault('Tags', 'dist-upgrade') |
| 2321 | - report['Tags'] += ' dist-upgrade' |
| 2322 | - for fname in os.listdir("/var/log/dist-upgrade/"): |
| 2323 | - f = os.path.join("/var/log/dist-upgrade", fname) |
| 2324 | - if not os.path.isfile(f) or os.path.getsize(f) == 0: |
| 2325 | - continue |
| 2326 | - report[f.replace(".", "").replace("-", "")] = (open(f), ) |
| 2327 | - report.add_to_existing('/var/crash/_usr_bin_update-manager.0.crash') |
| 2328 | - return True |
| 2329 | - |
| 2330 | - |
| 2331 | -def apport_pkgfailure(pkg, errormsg): |
| 2332 | - logging.debug("running apport_pkgfailure() %s: %s", pkg, errormsg) |
| 2333 | - LOGDIR = "/var/log/dist-upgrade/" |
| 2334 | - s = "/usr/share/apport/package_hook" |
| 2335 | - |
| 2336 | - # we do not report followup errors from earlier failures |
| 2337 | - # dpkg messages will not be translated if DPKG_UNTRANSLATED_MESSAGES is |
| 2338 | - # set which it is by default so check for the English message first |
| 2339 | - if "dependency problems - leaving unconfigured" in errormsg: |
| 2340 | - return False |
| 2341 | - if gettext.dgettext('dpkg', "dependency problems - leaving unconfigured") in errormsg: |
| 2342 | - return False |
| 2343 | - # we do not run apport_pkgfailure for full disk errors |
| 2344 | - if os.strerror(errno.ENOSPC) in errormsg: |
| 2345 | - logging.debug("dpkg error because of full disk, not reporting against %s " % pkg) |
| 2346 | - return False |
| 2347 | - |
| 2348 | - if os.path.exists(s): |
| 2349 | - try: |
| 2350 | - p = subprocess.Popen([s, "-p", pkg, "-l", LOGDIR, "--tags", |
| 2351 | - "dist-upgrade"], stdin=subprocess.PIPE) |
| 2352 | - p.stdin.write("%s\n" % errormsg) |
| 2353 | - p.stdin.close() |
| 2354 | - #p.wait() |
| 2355 | - except Exception as e: |
| 2356 | - logging.warning("Failed to run apport (%s)" % e) |
| 2357 | - return False |
| 2358 | - return True |
| 2359 | - return False |
| 2360 | - |
| 2361 | - |
| 2362 | -def run_apport(): |
| 2363 | - " run apport, check if we have a display " |
| 2364 | - if "RELEASE_UPRADER_NO_APPORT" in os.environ: |
| 2365 | - logging.debug("RELEASE_UPRADER_NO_APPORT env set") |
| 2366 | - return False |
| 2367 | - if "DISPLAY" in os.environ: |
| 2368 | - for p in ["/usr/share/apport/apport-gtk", "/usr/share/apport/apport-qt"]: |
| 2369 | - if os.path.exists(p): |
| 2370 | - ret = -1 |
| 2371 | - try: |
| 2372 | - ret = subprocess.call(p) |
| 2373 | - except Exception: |
| 2374 | - logging.exception("Unable to launch '%s' " % p) |
| 2375 | - return (ret == 0) |
| 2376 | - elif os.path.exists("/usr/bin/apport-cli"): |
| 2377 | - try: |
| 2378 | - return (subprocess.call("/usr/bin/apport-cli") == 0) |
| 2379 | - except Exception: |
| 2380 | - logging.exception("Unable to launch '/usr/bin/apport-cli'") |
| 2381 | - return False |
| 2382 | - logging.debug("can't find apport") |
| 2383 | - return False |
| 2384 | - |
| 2385 | - |
| 2386 | -if __name__ == "__main__": |
| 2387 | - apport_crash(None, None, None) |
| 2388 | |
| 2389 | === removed file 'DistUpgrade/DistUpgradeAptCdrom.py' |
| 2390 | --- DistUpgrade/DistUpgradeAptCdrom.py 2012-06-12 13:52:04 +0000 |
| 2391 | +++ DistUpgrade/DistUpgradeAptCdrom.py 1970-01-01 00:00:00 +0000 |
| 2392 | @@ -1,308 +0,0 @@ |
| 2393 | -# DistUpgradeAptCdrom.py |
| 2394 | -# |
| 2395 | -# Copyright (c) 2008 Canonical |
| 2396 | -# |
| 2397 | -# Author: Michael Vogt <michael.vogt@ubuntu.com> |
| 2398 | -# |
| 2399 | -# This program is free software; you can redistribute it and/or |
| 2400 | -# modify it under the terms of the GNU General Public License as |
| 2401 | -# published by the Free Software Foundation; either version 2 of the |
| 2402 | -# License, or (at your option) any later version. |
| 2403 | -# |
| 2404 | -# This program is distributed in the hope that it will be useful, |
| 2405 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 2406 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 2407 | -# GNU General Public License for more details. |
| 2408 | -# |
| 2409 | -# You should have received a copy of the GNU General Public License |
| 2410 | -# along with this program; if not, write to the Free Software |
| 2411 | -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
| 2412 | -# USA |
| 2413 | - |
| 2414 | -import re |
| 2415 | -import os |
| 2416 | -import apt |
| 2417 | -import apt_pkg |
| 2418 | -import logging |
| 2419 | -import gzip |
| 2420 | -import shutil |
| 2421 | -import subprocess |
| 2422 | -import sys |
| 2423 | -from gettext import gettext as _ |
| 2424 | - |
| 2425 | - |
| 2426 | -class AptCdromError(Exception): |
| 2427 | - " base exception for apt cdrom errors " |
| 2428 | - pass |
| 2429 | - |
| 2430 | -class AptCdrom(object): |
| 2431 | - " represents a apt cdrom object " |
| 2432 | - |
| 2433 | - def __init__(self, view, path): |
| 2434 | - self.view = view |
| 2435 | - self.cdrompath = path |
| 2436 | - # the directories we found on disk with signatures, packages and i18n |
| 2437 | - self.packages = set() |
| 2438 | - self.signatures = set() |
| 2439 | - self.i18n = set() |
| 2440 | - |
| 2441 | - def restore_backup(self, backup_ext): |
| 2442 | - " restore the backup copy of the cdroms.list file (*not* sources.list)! " |
| 2443 | - cdromstate = os.path.join(apt_pkg.config.find_dir("Dir::State"), |
| 2444 | - apt_pkg.config.find("Dir::State::cdroms")) |
| 2445 | - if os.path.exists(cdromstate+backup_ext): |
| 2446 | - shutil.copy(cdromstate+backup_ext, cdromstate) |
| 2447 | - # mvo: we don't have to care about restoring the sources.list here because |
| 2448 | - # aptsources will do this for us anyway |
| 2449 | - |
| 2450 | - |
| 2451 | - def comment_out_cdrom_entry(self): |
| 2452 | - """ comment out the cdrom entry """ |
| 2453 | - diskname = self._readDiskName() |
| 2454 | - pentry = self._generateSourcesListLine(diskname, self.packages) |
| 2455 | - sourceslist=apt_pkg.config.find_file("Dir::Etc::sourcelist") |
| 2456 | - content = open(sourceslist).read() |
| 2457 | - content = content.replace(pentry, "# %s" % pentry) |
| 2458 | - open(sourceslist, "w").write(content) |
| 2459 | - |
| 2460 | - def _scanCD(self): |
| 2461 | - """ |
| 2462 | - scan the CD for interessting files and return them as: |
| 2463 | - (packagesfiles, signaturefiles, i18nfiles) |
| 2464 | - """ |
| 2465 | - packages = set() |
| 2466 | - signatures = set() |
| 2467 | - i18n = set() |
| 2468 | - for root, dirs, files in os.walk(self.cdrompath, topdown=True): |
| 2469 | - if (root.endswith("debian-installer") or |
| 2470 | - root.endswith("dist-upgrader")): |
| 2471 | - del dirs[:] |
| 2472 | - continue |
| 2473 | - elif ".aptignr" in files: |
| 2474 | - continue |
| 2475 | - elif "Packages" in files: |
| 2476 | - packages.add(os.path.join(root,"Packages")) |
| 2477 | - elif "Packages.gz" in files: |
| 2478 | - packages.add(os.path.join(root,"Packages.gz")) |
| 2479 | - elif "Sources" in files or "Sources.gz" in files: |
| 2480 | - logging.error("Sources entry found in %s but not supported" % root) |
| 2481 | - elif "Release.gpg" in files: |
| 2482 | - signatures.add(os.path.join(root,"Release.gpg")) |
| 2483 | - elif "i18n" in dirs: |
| 2484 | - for f in os.listdir(os.path.join(root,"i18n")): |
| 2485 | - i18n.add(os.path.join(root,"i18n",f)) |
| 2486 | - # there is nothing under pool but deb packages (no |
| 2487 | - # indexfiles, so we skip that here |
| 2488 | - elif os.path.split(root)[1] == ("pool"): |
| 2489 | - del dirs[:] |
| 2490 | - return (packages, signatures, i18n) |
| 2491 | - |
| 2492 | - def _writeDatabase(self): |
| 2493 | - " update apts cdrom.list " |
| 2494 | - dbfile = apt_pkg.config.find_file("Dir::State::cdroms") |
| 2495 | - cdrom = apt_pkg.Cdrom() |
| 2496 | - id=cdrom.ident(apt.progress.base.CdromProgress()) |
| 2497 | - label = self._readDiskName() |
| 2498 | - out=open(dbfile,"a") |
| 2499 | - out.write('CD::%s "%s";\n' % (id, label)) |
| 2500 | - out.write('CD::%s::Label "%s";\n' % (id, label)) |
| 2501 | - |
| 2502 | - def _dropArch(self, packages): |
| 2503 | - " drop architectures that are not ours " |
| 2504 | - # create a copy |
| 2505 | - packages = set(packages) |
| 2506 | - # now go over the packagesdirs and drop stuff that is not |
| 2507 | - # our binary-$arch |
| 2508 | - arch = apt_pkg.config.find("APT::Architecture") |
| 2509 | - for d in set(packages): |
| 2510 | - if "/binary-" in d and not arch in d: |
| 2511 | - packages.remove(d) |
| 2512 | - return packages |
| 2513 | - |
| 2514 | - def _readDiskName(self): |
| 2515 | - # default to cdrompath if there is no name |
| 2516 | - diskname = self.cdrompath |
| 2517 | - info = os.path.join(self.cdrompath, ".disk","info") |
| 2518 | - if os.path.exists(info): |
| 2519 | - diskname = open(info).read() |
| 2520 | - for special in ('"',']','[','_'): |
| 2521 | - diskname = diskname.replace(special,'_') |
| 2522 | - return diskname |
| 2523 | - |
| 2524 | - def _generateSourcesListLine(self, diskname, packages): |
| 2525 | - # see apts indexcopy.cc:364 for details |
| 2526 | - path = "" |
| 2527 | - dist = "" |
| 2528 | - comps = [] |
| 2529 | - for d in packages: |
| 2530 | - # match(1) is the path, match(2) the dist |
| 2531 | - # and match(3) the components |
| 2532 | - m = re.match("(.*)/dists/([^/]*)/(.*)/binary-*", d) |
| 2533 | - if not m: |
| 2534 | - raise AptCdromError(_("Could not calculate sources.list entry")) |
| 2535 | - path = m.group(1) |
| 2536 | - dist = m.group(2) |
| 2537 | - comps.append(m.group(3)) |
| 2538 | - if not path or not comps: |
| 2539 | - return None |
| 2540 | - comps.sort() |
| 2541 | - pentry = "deb cdrom:[%s]/ %s %s" % (diskname, dist, " ".join(comps)) |
| 2542 | - return pentry |
| 2543 | - |
| 2544 | - def _copyTranslations(self, translations, targetdir=None): |
| 2545 | - if not targetdir: |
| 2546 | - targetdir=apt_pkg.config.find_dir("Dir::State::lists") |
| 2547 | - diskname = self._readDiskName() |
| 2548 | - for f in translations: |
| 2549 | - fname = apt_pkg.uri_to_filename("cdrom:[%s]/%s" % (diskname,f[f.find("dists"):])) |
| 2550 | - outf = os.path.join(targetdir,os.path.splitext(fname)[0]) |
| 2551 | - if f.endswith(".gz"): |
| 2552 | - g=gzip.open(f) |
| 2553 | - try: |
| 2554 | - with open(outf, "wb") as out: |
| 2555 | - # uncompress in 64k chunks |
| 2556 | - while True: |
| 2557 | - s=g.read(64000) |
| 2558 | - out.write(s) |
| 2559 | - if s == b"": |
| 2560 | - break |
| 2561 | - finally: |
| 2562 | - g.close() |
| 2563 | - else: |
| 2564 | - shutil.copy(f,outf) |
| 2565 | - return True |
| 2566 | - |
| 2567 | - def _copyPackages(self, packages, targetdir=None): |
| 2568 | - if not targetdir: |
| 2569 | - targetdir=apt_pkg.config.find_dir("Dir::State::lists") |
| 2570 | - # CopyPackages() |
| 2571 | - diskname = self._readDiskName() |
| 2572 | - for f in packages: |
| 2573 | - fname = apt_pkg.uri_to_filename("cdrom:[%s]/%s" % (diskname,f[f.find("dists"):])) |
| 2574 | - outf = os.path.join(targetdir,os.path.splitext(fname)[0]) |
| 2575 | - if f.endswith(".gz"): |
| 2576 | - g=gzip.open(f) |
| 2577 | - try: |
| 2578 | - with open(outf, "wb") as out: |
| 2579 | - # uncompress in 64k chunks |
| 2580 | - while True: |
| 2581 | - s=g.read(64000) |
| 2582 | - out.write(s) |
| 2583 | - if s == b"": |
| 2584 | - break |
| 2585 | - finally: |
| 2586 | - g.close() |
| 2587 | - else: |
| 2588 | - shutil.copy(f,outf) |
| 2589 | - return True |
| 2590 | - |
| 2591 | - def _verifyRelease(self, signatures): |
| 2592 | - " verify the signatues and hashes " |
| 2593 | - gpgv = apt_pkg.config.find("Dir::Bin::gpg","/usr/bin/gpgv") |
| 2594 | - keyring = apt_pkg.config.find("Apt::GPGV::TrustedKeyring", |
| 2595 | - "/etc/apt/trusted.gpg") |
| 2596 | - for sig in signatures: |
| 2597 | - basepath = os.path.split(sig)[0] |
| 2598 | - # do gpg checking |
| 2599 | - releasef = os.path.splitext(sig)[0] |
| 2600 | - cmd = [gpgv,"--keyring",keyring, |
| 2601 | - "--ignore-time-conflict", |
| 2602 | - sig, releasef] |
| 2603 | - ret = subprocess.call(cmd) |
| 2604 | - if not (ret == 0): |
| 2605 | - return False |
| 2606 | - # now do the hash sum checks |
| 2607 | - t=apt_pkg.TagFile(open(releasef)) |
| 2608 | - t.step() |
| 2609 | - for entry in t.section["SHA256"].split("\n"): |
| 2610 | - (hash,size,name) = entry.split() |
| 2611 | - f=os.path.join(basepath,name) |
| 2612 | - if not os.path.exists(f): |
| 2613 | - logging.info("ignoring missing '%s'" % f) |
| 2614 | - continue |
| 2615 | - sum = apt_pkg.sha256sum(open(f)) |
| 2616 | - if not (sum == hash): |
| 2617 | - logging.error("hash sum mismatch expected %s but got %s" % (hash, sum)) |
| 2618 | - return False |
| 2619 | - return True |
| 2620 | - |
| 2621 | - def _copyRelease(self, signatures, targetdir=None): |
| 2622 | - " copy the release file " |
| 2623 | - if not targetdir: |
| 2624 | - targetdir=apt_pkg.config.find_dir("Dir::State::lists") |
| 2625 | - diskname = self._readDiskName() |
| 2626 | - for sig in signatures: |
| 2627 | - releasef = os.path.splitext(sig)[0] |
| 2628 | - # copy both Release and Release.gpg |
| 2629 | - for f in (sig, releasef): |
| 2630 | - fname = apt_pkg.uri_to_filename("cdrom:[%s]/%s" % (diskname,f[f.find("dists"):])) |
| 2631 | - shutil.copy(f,os.path.join(targetdir,fname)) |
| 2632 | - return True |
| 2633 | - |
| 2634 | - def _doAdd(self): |
| 2635 | - " reimplement pkgCdrom::Add() in python " |
| 2636 | - # os.walk() will not follow symlinks so we don't need |
| 2637 | - # pkgCdrom::Score() and not dropRepeats() that deal with |
| 2638 | - # killing the links |
| 2639 | - (self.packages, self.signatures, self.i18n) = self._scanCD() |
| 2640 | - self.packages = self._dropArch(self.packages) |
| 2641 | - if len(self.packages) == 0: |
| 2642 | - logging.error("no useable indexes found on CD, wrong ARCH?") |
| 2643 | - raise AptCdromError(_("Unable to locate any package files, perhaps this is not a Ubuntu Disc or the wrong architecture?")) |
| 2644 | - |
| 2645 | - # CopyAndVerify |
| 2646 | - if self._verifyRelease(self.signatures): |
| 2647 | - self._copyRelease(self.signatures) |
| 2648 | - |
| 2649 | - # copy the packages and translations |
| 2650 | - self._copyPackages(self.packages) |
| 2651 | - self._copyTranslations(self.i18n) |
| 2652 | - |
| 2653 | - # add CD to cdroms.list "database" and update sources.list |
| 2654 | - diskname = self._readDiskName() |
| 2655 | - if not diskname: |
| 2656 | - logging.error("no .disk/ directory found") |
| 2657 | - return False |
| 2658 | - debline = self._generateSourcesListLine(diskname, self.packages) |
| 2659 | - |
| 2660 | - # prepend to the sources.list |
| 2661 | - sourceslist=apt_pkg.config.find_file("Dir::Etc::sourcelist") |
| 2662 | - content=open(sourceslist).read() |
| 2663 | - open(sourceslist,"w").write("# added by the release upgrader\n%s\n%s" % (debline,content)) |
| 2664 | - self._writeDatabase() |
| 2665 | - |
| 2666 | - return True |
| 2667 | - |
| 2668 | - def add(self, backup_ext=None): |
| 2669 | - " add a cdrom to apt's database " |
| 2670 | - logging.debug("AptCdrom.add() called with '%s'", self.cdrompath) |
| 2671 | - # do backup (if needed) of the cdroms.list file |
| 2672 | - if backup_ext: |
| 2673 | - cdromstate = os.path.join(apt_pkg.config.find_dir("Dir::State"), |
| 2674 | - apt_pkg.config.find("Dir::State::cdroms")) |
| 2675 | - if os.path.exists(cdromstate): |
| 2676 | - shutil.copy(cdromstate, cdromstate+backup_ext) |
| 2677 | - # do the actual work |
| 2678 | - apt_pkg.config.set("Acquire::cdrom::mount",self.cdrompath) |
| 2679 | - apt_pkg.config.set("APT::CDROM::NoMount","true") |
| 2680 | - # FIXME: add cdrom progress here for the view |
| 2681 | - #progress = self.view.getCdromProgress() |
| 2682 | - try: |
| 2683 | - res = self._doAdd() |
| 2684 | - except (SystemError, AptCdromError) as e: |
| 2685 | - logging.error("can't add cdrom: %s" % e) |
| 2686 | - self.view.error(_("Failed to add the CD"), |
| 2687 | - _("There was a error adding the CD, the " |
| 2688 | - "upgrade will abort. Please report this as " |
| 2689 | - "a bug if this is a valid Ubuntu CD.\n\n" |
| 2690 | - "The error message was:\n'%s'") % e) |
| 2691 | - return False |
| 2692 | - logging.debug("AptCdrom.add() returned: %s" % res) |
| 2693 | - return res |
| 2694 | - |
| 2695 | - def __bool__(self): |
| 2696 | - """ helper to use this as 'if cdrom:' """ |
| 2697 | - return self.cdrompath is not None |
| 2698 | - |
| 2699 | - if sys.version < '3': |
| 2700 | - __nonzero__ = __bool__ |
| 2701 | |
| 2702 | === removed file 'DistUpgrade/DistUpgradeAufs.py' |
| 2703 | --- DistUpgrade/DistUpgradeAufs.py 2012-05-01 14:11:33 +0000 |
| 2704 | +++ DistUpgrade/DistUpgradeAufs.py 1970-01-01 00:00:00 +0000 |
| 2705 | @@ -1,253 +0,0 @@ |
| 2706 | -from __future__ import absolute_import, print_function |
| 2707 | - |
| 2708 | -import logging |
| 2709 | -import os |
| 2710 | -import subprocess |
| 2711 | -import tempfile |
| 2712 | - |
| 2713 | -def aufsOptionsAndEnvironmentSetup(options, config): |
| 2714 | - """ setup the environment based on the config and options |
| 2715 | - It will use |
| 2716 | - config("Aufs","Enabled") - to show if its enabled |
| 2717 | - and |
| 2718 | - config("Aufs","RWDir") - for the writable overlay dir |
| 2719 | - """ |
| 2720 | - logging.debug("aufsOptionsAndEnvironmentSetup()") |
| 2721 | - # enabled from the commandline (full overlay by default) |
| 2722 | - if options and options.useAufs: |
| 2723 | - logging.debug("enabling full overlay from commandline") |
| 2724 | - config.set("Aufs","Enabled", "True") |
| 2725 | - config.set("Aufs","EnableFullOverlay","True") |
| 2726 | - |
| 2727 | - # setup environment based on config |
| 2728 | - tmprw = tempfile.mkdtemp(prefix="upgrade-rw-") |
| 2729 | - aufs_rw_dir = config.getWithDefault("Aufs","RWDir", tmprw) |
| 2730 | - logging.debug("using '%s' as aufs_rw_dir" % aufs_rw_dir) |
| 2731 | - os.environ["RELEASE_UPGRADE_AUFS_RWDIR"] = aufs_rw_dir |
| 2732 | - config.set("Aufs","RWDir",aufs_rw_dir) |
| 2733 | - # now the chroot tmpdir |
| 2734 | - tmpchroot = tempfile.mkdtemp(prefix="upgrade-chroot-") |
| 2735 | - os.chmod(tmpchroot, 0o755) |
| 2736 | - aufs_chroot_dir = config.getWithDefault("Aufs","ChrootDir", tmpchroot) |
| 2737 | - logging.debug("using '%s' as aufs chroot dir" % aufs_chroot_dir) |
| 2738 | - |
| 2739 | - if config.getWithDefault("Aufs","EnableFullOverlay", False): |
| 2740 | - logging.debug("enabling aufs full overlay (from config)") |
| 2741 | - config.set("Aufs","Enabled", "True") |
| 2742 | - os.environ["RELEASE_UPGRADE_USE_AUFS_FULL_OVERLAY"] = "1" |
| 2743 | - if config.getWithDefault("Aufs","EnableChrootOverlay",False): |
| 2744 | - logging.debug("enabling aufs chroot overlay") |
| 2745 | - config.set("Aufs","Enabled", "True") |
| 2746 | - os.environ["RELEASE_UPGRADE_USE_AUFS_CHROOT"] = aufs_chroot_dir |
| 2747 | - if config.getWithDefault("Aufs","EnableChrootRsync", False): |
| 2748 | - logging.debug("enable aufs chroot rsync back to real system") |
| 2749 | - os.environ["RELEASE_UPGRADE_RSYNC_AUFS_CHROOT"] = "1" |
| 2750 | - |
| 2751 | - |
| 2752 | -def _bindMount(from_dir, to_dir, rbind=False): |
| 2753 | - " helper that bind mounts a given dir to a new place " |
| 2754 | - if not os.path.exists(to_dir): |
| 2755 | - os.makedirs(to_dir) |
| 2756 | - if rbind: |
| 2757 | - bind = "--rbind" |
| 2758 | - else: |
| 2759 | - bind = "--bind" |
| 2760 | - cmd = ["mount",bind, from_dir, to_dir] |
| 2761 | - logging.debug("cmd: %s" % cmd) |
| 2762 | - res = subprocess.call(cmd) |
| 2763 | - if res != 0: |
| 2764 | - # FIXME: revert already mounted stuff |
| 2765 | - logging.error("Failed to bind mount from '%s' to '%s'" % (from_dir, to_dir)) |
| 2766 | - return False |
| 2767 | - return True |
| 2768 | - |
| 2769 | -def _aufsOverlayMount(target, rw_dir, chroot_dir="/"): |
| 2770 | - """ |
| 2771 | - helper that takes a target dir and mounts a rw dir over it, e.g. |
| 2772 | - /var , /tmp/upgrade-rw |
| 2773 | - """ |
| 2774 | - if not os.path.exists(rw_dir+target): |
| 2775 | - os.makedirs(rw_dir+target) |
| 2776 | - if not os.path.exists(chroot_dir+target): |
| 2777 | - os.makedirs(chroot_dir+target) |
| 2778 | - # FIXME: figure out when to use aufs and when to use overlayfs |
| 2779 | - use_overlayfs = False |
| 2780 | - if use_overlayfs: |
| 2781 | - cmd = ["mount", |
| 2782 | - "-t","overlayfs", |
| 2783 | - "-o","upperdir=%s,lowerdir=%s" % (rw_dir+target, target), |
| 2784 | - "none", |
| 2785 | - chroot_dir+target] |
| 2786 | - else: |
| 2787 | - cmd = ["mount", |
| 2788 | - "-t","aufs", |
| 2789 | - "-o","br:%s:%s=ro" % (rw_dir+target, target), |
| 2790 | - "none", |
| 2791 | - chroot_dir+target] |
| 2792 | - res = subprocess.call(cmd) |
| 2793 | - if res != 0: |
| 2794 | - # FIXME: revert already mounted stuff |
| 2795 | - logging.error("Failed to mount rw aufs overlay for '%s'" % target) |
| 2796 | - return False |
| 2797 | - logging.debug("cmd '%s' return '%s' " % (cmd, res)) |
| 2798 | - return True |
| 2799 | - |
| 2800 | -def is_aufs_mount(dir): |
| 2801 | - " test if the given dir is already mounted with aufs overlay " |
| 2802 | - for line in open("/proc/mounts"): |
| 2803 | - (device, mountpoint, fstype, options, a, b) = line.split() |
| 2804 | - if device == "none" and fstype == "aufs" and mountpoint == dir: |
| 2805 | - return True |
| 2806 | - return False |
| 2807 | - |
| 2808 | -def is_submount(mountpoint, systemdirs): |
| 2809 | - " helper: check if the given mountpoint is a submount of a systemdir " |
| 2810 | - logging.debug("is_submount: %s %s" % (mountpoint, systemdirs)) |
| 2811 | - for d in systemdirs: |
| 2812 | - if not d.endswith("/"): |
| 2813 | - d += "/" |
| 2814 | - if mountpoint.startswith(d): |
| 2815 | - return True |
| 2816 | - return False |
| 2817 | - |
| 2818 | -def is_real_fs(fs): |
| 2819 | - if fs.startswith("fuse"): |
| 2820 | - return False |
| 2821 | - if fs in ["rootfs","tmpfs","proc","fusectrl","aufs", |
| 2822 | - "devpts","binfmt_misc", "sysfs"]: |
| 2823 | - return False |
| 2824 | - return True |
| 2825 | - |
| 2826 | -def doAufsChrootRsync(aufs_chroot_dir): |
| 2827 | - """ |
| 2828 | - helper that rsyncs the changes in the aufs chroot back to the |
| 2829 | - real system |
| 2830 | - """ |
| 2831 | - from .DistUpgradeMain import SYSTEM_DIRS |
| 2832 | - for d in SYSTEM_DIRS: |
| 2833 | - if not os.path.exists(d): |
| 2834 | - continue |
| 2835 | - # its important to have the "/" at the end of source |
| 2836 | - # and dest so that rsync knows what to do |
| 2837 | - cmd = ["rsync","-aHAX","--del","-v", "--progress", |
| 2838 | - "/%s/%s/" % (aufs_chroot_dir, d), |
| 2839 | - "/%s/" % d] |
| 2840 | - logging.debug("running: '%s'" % cmd) |
| 2841 | - ret = subprocess.call(cmd) |
| 2842 | - logging.debug("rsync back result for %s: %i" % (d, ret)) |
| 2843 | - return True |
| 2844 | - |
| 2845 | -def doAufsChroot(aufs_rw_dir, aufs_chroot_dir): |
| 2846 | - " helper that sets the chroot up and does chroot() into it " |
| 2847 | - if not setupAufsChroot(aufs_rw_dir, aufs_chroot_dir): |
| 2848 | - return False |
| 2849 | - os.chroot(aufs_chroot_dir) |
| 2850 | - os.chdir("/") |
| 2851 | - return True |
| 2852 | - |
| 2853 | - |
| 2854 | -def setupAufsChroot(rw_dir, chroot_dir): |
| 2855 | - " setup aufs chroot that is based on / but with a writable overlay " |
| 2856 | - # with the chroot aufs we can just rsync the changes back |
| 2857 | - # from the chroot dir to the real dirs |
| 2858 | - # |
| 2859 | - # (if we run rsync with --backup --backup-dir we could even |
| 2860 | - # create something vaguely rollbackable |
| 2861 | - |
| 2862 | - # get the mount points before the aufs buisiness starts |
| 2863 | - mounts = open("/proc/mounts").read() |
| 2864 | - from .DistUpgradeMain import SYSTEM_DIRS |
| 2865 | - systemdirs = SYSTEM_DIRS |
| 2866 | - |
| 2867 | - # aufs mount or bind mount required dirs |
| 2868 | - for d in os.listdir("/"): |
| 2869 | - d = os.path.join("/",d) |
| 2870 | - if os.path.isdir(d): |
| 2871 | - if d in systemdirs: |
| 2872 | - logging.debug("bind mounting %s" % d) |
| 2873 | - if not _aufsOverlayMount(d, rw_dir, chroot_dir): |
| 2874 | - return False |
| 2875 | - else: |
| 2876 | - logging.debug("overlay mounting %s" % d) |
| 2877 | - if not _bindMount(d, chroot_dir+d, rbind=True): |
| 2878 | - return False |
| 2879 | - |
| 2880 | - # create binds for the systemdirs |
| 2881 | - #needs_bind_mount = set() |
| 2882 | - for line in mounts.split("\n"): |
| 2883 | - line = line.strip() |
| 2884 | - if not line: continue |
| 2885 | - (device, mountpoint, fstype, options, a, b) = line.split() |
| 2886 | - if (fstype != "aufs" and |
| 2887 | - not is_real_fs(fstype) and |
| 2888 | - is_submount(mountpoint, systemdirs)): |
| 2889 | - logging.debug("found %s that needs bind mount", mountpoint) |
| 2890 | - if not _bindMount(mountpoint, chroot_dir+mountpoint): |
| 2891 | - return False |
| 2892 | - return True |
| 2893 | - |
| 2894 | -def setupAufs(rw_dir): |
| 2895 | - " setup aufs overlay over the rootfs " |
| 2896 | - # * we need to find a way to tell all the existing daemon |
| 2897 | - # to look into the new namespace. so probably something |
| 2898 | - # like a reboot is required and some hackery in initramfs-tools |
| 2899 | - # to ensure that we boot into a overlay ready system |
| 2900 | - # * this is much less of a issue with the aufsChroot code |
| 2901 | - logging.debug("setupAufs") |
| 2902 | - if not os.path.exists("/proc/mounts"): |
| 2903 | - logging.debug("no /proc/mounts, can not do aufs overlay") |
| 2904 | - return False |
| 2905 | - |
| 2906 | - from .DistUpgradeMain import SYSTEM_DIRS |
| 2907 | - systemdirs = SYSTEM_DIRS |
| 2908 | - # verify that there are no submounts of a systemdir and collect |
| 2909 | - # the stuff that needs bind mounting (because a aufs does not |
| 2910 | - # include sub mounts) |
| 2911 | - needs_bind_mount = set() |
| 2912 | - needs_bind_mount.add("/var/cache/apt/archives") |
| 2913 | - for line in open("/proc/mounts"): |
| 2914 | - (device, mountpoint, fstype, options, a, b) = line.split() |
| 2915 | - if is_real_fs(fstype) and is_submount(mountpoint, systemdirs): |
| 2916 | - logging.warning("mountpoint %s submount of systemdir" % mountpoint) |
| 2917 | - return False |
| 2918 | - if (fstype != "aufs" and not is_real_fs(fstype) and is_submount(mountpoint, systemdirs)): |
| 2919 | - logging.debug("found %s that needs bind mount", mountpoint) |
| 2920 | - needs_bind_mount.add(mountpoint) |
| 2921 | - |
| 2922 | - # aufs mounts do not support stacked filesystems, so |
| 2923 | - # if we mount /var we will loose the tmpfs stuff |
| 2924 | - # first bind mount varun and varlock into the tmpfs |
| 2925 | - for d in needs_bind_mount: |
| 2926 | - if not _bindMount(d, rw_dir+"/needs_bind_mount/"+d): |
| 2927 | - return False |
| 2928 | - # setup writable overlay into /tmp/upgrade-rw so that all |
| 2929 | - # changes are written there instead of the real fs |
| 2930 | - for d in systemdirs: |
| 2931 | - if not is_aufs_mount(d): |
| 2932 | - if not _aufsOverlayMount(d, rw_dir): |
| 2933 | - return False |
| 2934 | - # now bind back the tempfs to the original location |
| 2935 | - for d in needs_bind_mount: |
| 2936 | - if not _bindMount(rw_dir+"/needs_bind_mount/"+d, d): |
| 2937 | - return False |
| 2938 | - |
| 2939 | - # The below information is only of historical relevance: |
| 2940 | - # now what we *could* do to apply the changes is to |
| 2941 | - # mount -o bind / /orig |
| 2942 | - # (bind is important, *not* rbind that includes submounts) |
| 2943 | - # |
| 2944 | - # This will give us the original "/" without the |
| 2945 | - # aufs rw overlay - *BUT* only if "/" is all on one parition |
| 2946 | - # |
| 2947 | - # then apply the diff (including the whiteouts) to /orig |
| 2948 | - # e.g. by "rsync -av /tmp/upgrade-rw /orig" |
| 2949 | - # "script that search for whiteouts and removes them" |
| 2950 | - # (whiteout files start with .wh.$name |
| 2951 | - # whiteout dirs with .wh..? - check with aufs man page) |
| 2952 | - return True |
| 2953 | - |
| 2954 | -if __name__ == "__main__": |
| 2955 | - logging.basicConfig(level=logging.DEBUG) |
| 2956 | - #print(setupAufs("/tmp/upgrade-rw")) |
| 2957 | - print(setupAufsChroot("/tmp/upgrade-chroot-rw", |
| 2958 | - "/tmp/upgrade-chroot")) |
| 2959 | |
| 2960 | === removed file 'DistUpgrade/DistUpgradeCache.py' |
| 2961 | --- DistUpgrade/DistUpgradeCache.py 2012-06-13 12:45:49 +0000 |
| 2962 | +++ DistUpgrade/DistUpgradeCache.py 1970-01-01 00:00:00 +0000 |
| 2963 | @@ -1,1235 +0,0 @@ |
| 2964 | -# DistUpgradeCache.py |
| 2965 | -# |
| 2966 | -# Copyright (c) 2004-2008 Canonical |
| 2967 | -# |
| 2968 | -# Author: Michael Vogt <michael.vogt@ubuntu.com> |
| 2969 | -# |
| 2970 | -# This program is free software; you can redistribute it and/or |
| 2971 | -# modify it under the terms of the GNU General Public License as |
| 2972 | -# published by the Free Software Foundation; either version 2 of the |
| 2973 | -# License, or (at your option) any later version. |
| 2974 | -# |
| 2975 | -# This program is distributed in the hope that it will be useful, |
| 2976 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 2977 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 2978 | -# GNU General Public License for more details. |
| 2979 | -# |
| 2980 | -# You should have received a copy of the GNU General Public License |
| 2981 | -# along with this program; if not, write to the Free Software |
| 2982 | -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
| 2983 | -# USA |
| 2984 | - |
| 2985 | -from __future__ import absolute_import, print_function |
| 2986 | - |
| 2987 | -import warnings |
| 2988 | -warnings.filterwarnings("ignore", "apt API not stable yet", FutureWarning) |
| 2989 | -import apt |
| 2990 | -import apt_pkg |
| 2991 | -import os |
| 2992 | -import re |
| 2993 | -import logging |
| 2994 | -import time |
| 2995 | -import datetime |
| 2996 | -import threading |
| 2997 | -try: |
| 2998 | - import configparser |
| 2999 | -except ImportError: |
| 3000 | - import ConfigParser as configparser |
| 3001 | -from subprocess import Popen, PIPE |
| 3002 | - |
| 3003 | -from .DistUpgradeGettext import gettext as _ |
| 3004 | -from .DistUpgradeGettext import ngettext |
| 3005 | - |
| 3006 | -from .utils import inside_chroot, estimate_kernel_size_in_boot |
| 3007 | - |
| 3008 | -class CacheException(Exception): |
| 3009 | - pass |
| 3010 | -class CacheExceptionLockingFailed(CacheException): |
| 3011 | - pass |
| 3012 | -class CacheExceptionDpkgInterrupted(CacheException): |
| 3013 | - pass |
| 3014 | - |
| 3015 | -# the initrd/vmlinuz/abi space required in /boot for each kernel |
| 3016 | -# we estimate based on the current kernel size and add a safety marging |
| 3017 | -def _set_kernel_initrd_size(): |
| 3018 | - size = estimate_kernel_size_in_boot() |
| 3019 | - if size == 0: |
| 3020 | - logging.warn("estimate_kernel_size_in_boot() returned '0'?") |
| 3021 | - size = 28*1024*1024 |
| 3022 | - # add small safety buffer |
| 3023 | - size += 1*1024*1024 |
| 3024 | - return size |
| 3025 | -KERNEL_INITRD_SIZE = _set_kernel_initrd_size() |
| 3026 | - |
| 3027 | -class FreeSpaceRequired(object): |
| 3028 | - """ FreeSpaceRequired object: |
| 3029 | - |
| 3030 | - This exposes: |
| 3031 | - - the total size required (size_total) |
| 3032 | - - the dir that requires the space (dir) |
| 3033 | - - the additional space that is needed (size_needed) |
| 3034 | - """ |
| 3035 | - def __init__(self, size_total, dir, size_needed): |
| 3036 | - self.size_total = size_total |
| 3037 | - self.dir = dir |
| 3038 | - self.size_needed = size_needed |
| 3039 | - def __str__(self): |
| 3040 | - return "FreeSpaceRequired Object: Dir: %s size_total: %s size_needed: %s" % (self.dir, self.size_total, self.size_needed) |
| 3041 | - |
| 3042 | - |
| 3043 | -class NotEnoughFreeSpaceError(CacheException): |
| 3044 | - """ |
| 3045 | - Exception if there is not enough free space for this operation |
| 3046 | - |
| 3047 | - """ |
| 3048 | - def __init__(self, free_space_required_list): |
| 3049 | - self.free_space_required_list = free_space_required_list |
| 3050 | - |
| 3051 | -class MyCache(apt.Cache): |
| 3052 | - ReInstReq = 1 |
| 3053 | - HoldReInstReq = 3 |
| 3054 | - |
| 3055 | - # init |
| 3056 | - def __init__(self, config, view, quirks, progress=None, lock=True): |
| 3057 | - apt.Cache.__init__(self, progress) |
| 3058 | - self.to_install = [] |
| 3059 | - self.to_remove = [] |
| 3060 | - self.view = view |
| 3061 | - self.quirks = quirks |
| 3062 | - self.lock = False |
| 3063 | - self.partialUpgrade = False |
| 3064 | - self.config = config |
| 3065 | - self.metapkgs = self.config.getlist("Distro","MetaPkgs") |
| 3066 | - # acquire lock |
| 3067 | - self._listsLock = -1 |
| 3068 | - if lock: |
| 3069 | - try: |
| 3070 | - apt_pkg.pkgsystem_lock() |
| 3071 | - self.lock_lists_dir() |
| 3072 | - self.lock = True |
| 3073 | - except SystemError as e: |
| 3074 | - # checking for this is ok, its not translatable |
| 3075 | - if "dpkg --configure -a" in str(e): |
| 3076 | - raise CacheExceptionDpkgInterrupted(e) |
| 3077 | - raise CacheExceptionLockingFailed(e) |
| 3078 | - # a list of regexp that are not allowed to be removed |
| 3079 | - self.removal_blacklist = config.getListFromFile("Distro","RemovalBlacklistFile") |
| 3080 | - self.uname = Popen(["uname","-r"], stdout=PIPE, |
| 3081 | - universal_newlines=True).communicate()[0].strip() |
| 3082 | - self._initAptLog() |
| 3083 | - # from hardy on we use recommends by default, so for the |
| 3084 | - # transition to the new dist we need to enable them now |
| 3085 | - if (config.get("Sources","From") == "hardy" and |
| 3086 | - not "RELEASE_UPGRADE_NO_RECOMMENDS" in os.environ): |
| 3087 | - apt_pkg.config.set("APT::Install-Recommends","true") |
| 3088 | - |
| 3089 | - def _apply_dselect_upgrade(self): |
| 3090 | - """ honor the dselect install state """ |
| 3091 | - for pkg in self: |
| 3092 | - if pkg.is_installed: |
| 3093 | - continue |
| 3094 | - if pkg._pkg.selected_state == apt_pkg.SELSTATE_INSTALL: |
| 3095 | - # upgrade() will take care of this |
| 3096 | - pkg.mark_install(auto_inst=False, auto_fix=False) |
| 3097 | - |
| 3098 | - @property |
| 3099 | - def req_reinstall_pkgs(self): |
| 3100 | - " return the packages not downloadable packages in reqreinst state " |
| 3101 | - reqreinst = set() |
| 3102 | - for pkg in self: |
| 3103 | - if ((not pkg.candidate or not pkg.candidate.downloadable) |
| 3104 | - and |
| 3105 | - (pkg._pkg.inst_state == self.ReInstReq or |
| 3106 | - pkg._pkg.inst_state == self.HoldReInstReq)): |
| 3107 | - reqreinst.add(pkg.name) |
| 3108 | - return reqreinst |
| 3109 | - |
| 3110 | - def fix_req_reinst(self, view): |
| 3111 | - " check for reqreinst state and offer to fix it " |
| 3112 | - reqreinst = self.req_reinstall_pkgs |
| 3113 | - if len(reqreinst) > 0: |
| 3114 | - header = ngettext("Remove package in bad state", |
| 3115 | - "Remove packages in bad state", |
| 3116 | - len(reqreinst)) |
| 3117 | - summary = ngettext("The package '%s' is in an inconsistent " |
| 3118 | - "state and needs to be reinstalled, but " |
| 3119 | - "no archive can be found for it. " |
| 3120 | - "Do you want to remove this package " |
| 3121 | - "now to continue?", |
| 3122 | - "The packages '%s' are in an inconsistent " |
| 3123 | - "state and need to be reinstalled, but " |
| 3124 | - "no archives can be found for them. Do you " |
| 3125 | - "want to remove these packages now to " |
| 3126 | - "continue?", |
| 3127 | - len(reqreinst)) % ", ".join(reqreinst) |
| 3128 | - if view.askYesNoQuestion(header, summary): |
| 3129 | - self.release_lock() |
| 3130 | - cmd = ["dpkg","--remove","--force-remove-reinstreq"] + list(reqreinst) |
| 3131 | - view.getTerminal().call(cmd) |
| 3132 | - self.get_lock() |
| 3133 | - return True |
| 3134 | - return False |
| 3135 | - |
| 3136 | - # logging stuff |
| 3137 | - def _initAptLog(self): |
| 3138 | - " init logging, create log file" |
| 3139 | - logdir = self.config.getWithDefault("Files","LogDir", |
| 3140 | - "/var/log/dist-upgrade") |
| 3141 | - if not os.path.exists(logdir): |
| 3142 | - os.makedirs(logdir) |
| 3143 | - apt_pkg.config.set("Dir::Log",logdir) |
| 3144 | - apt_pkg.config.set("Dir::Log::Terminal","apt-term.log") |
| 3145 | - self.logfd = os.open(os.path.join(logdir,"apt.log"), |
| 3146 | - os.O_RDWR|os.O_CREAT|os.O_APPEND, 0o644) |
| 3147 | - now = datetime.datetime.now() |
| 3148 | - header = "Log time: %s\n" % now |
| 3149 | - os.write(self.logfd, header.encode("utf-8")) |
| 3150 | - |
| 3151 | - # turn on debugging in the cache |
| 3152 | - apt_pkg.config.set("Debug::pkgProblemResolver","true") |
| 3153 | - apt_pkg.config.set("Debug::pkgDepCache::AutoInstall","true") |
| 3154 | - def _startAptResolverLog(self): |
| 3155 | - if hasattr(self, "old_stdout"): |
| 3156 | - os.close(self.old_stdout) |
| 3157 | - os.close(self.old_stderr) |
| 3158 | - self.old_stdout = os.dup(1) |
| 3159 | - self.old_stderr = os.dup(2) |
| 3160 | - os.dup2(self.logfd, 1) |
| 3161 | - os.dup2(self.logfd, 2) |
| 3162 | - def _stopAptResolverLog(self): |
| 3163 | - os.fsync(1) |
| 3164 | - os.fsync(2) |
| 3165 | - os.dup2(self.old_stdout, 1) |
| 3166 | - os.dup2(self.old_stderr, 2) |
| 3167 | - # use this decorator instead of the _start/_stop stuff directly |
| 3168 | - # FIXME: this should probably be a decorator class where all |
| 3169 | - # logging is moved into? |
| 3170 | - def withResolverLog(f): |
| 3171 | - " decorator to ensure that the apt output is logged " |
| 3172 | - def wrapper(*args, **kwargs): |
| 3173 | - args[0]._startAptResolverLog() |
| 3174 | - res = f(*args, **kwargs) |
| 3175 | - args[0]._stopAptResolverLog() |
| 3176 | - return res |
| 3177 | - return wrapper |
| 3178 | - |
| 3179 | - # properties |
| 3180 | - @property |
| 3181 | - def required_download(self): |
| 3182 | - """ get the size of the packages that are required to download """ |
| 3183 | - pm = apt_pkg.PackageManager(self._depcache) |
| 3184 | - fetcher = apt_pkg.Acquire() |
| 3185 | - pm.get_archives(fetcher, self._list, self._records) |
| 3186 | - return fetcher.fetch_needed |
| 3187 | - @property |
| 3188 | - def additional_required_space(self): |
| 3189 | - """ get the size of the additional required space on the fs """ |
| 3190 | - return self._depcache.usr_size |
| 3191 | - @property |
| 3192 | - def is_broken(self): |
| 3193 | - """ is the cache broken """ |
| 3194 | - return self._depcache.broken_count > 0 |
| 3195 | - |
| 3196 | - # methods |
| 3197 | - def lock_lists_dir(self): |
| 3198 | - name = apt_pkg.config.find_dir("Dir::State::Lists") + "lock" |
| 3199 | - self._listsLock = apt_pkg.get_lock(name) |
| 3200 | - if self._listsLock < 0: |
| 3201 | - e = "Can not lock '%s' " % name |
| 3202 | - raise CacheExceptionLockingFailed(e) |
| 3203 | - def unlock_lists_dir(self): |
| 3204 | - if self._listsLock > 0: |
| 3205 | - os.close(self._listsLock) |
| 3206 | - self._listsLock = -1 |
| 3207 | - def update(self, fprogress=None): |
| 3208 | - """ |
| 3209 | - our own update implementation is required because we keep the lists |
| 3210 | - dir lock |
| 3211 | - """ |
| 3212 | - self.unlock_lists_dir() |
| 3213 | - res = apt.Cache.update(self, fprogress) |
| 3214 | - self.lock_lists_dir() |
| 3215 | - if fprogress and fprogress.release_file_download_error: |
| 3216 | - # FIXME: not ideal error message, but we just reuse a |
| 3217 | - # existing one here to avoid a new string |
| 3218 | - raise IOError(_("The server may be overloaded")) |
| 3219 | - if res == False: |
| 3220 | - raise IOError("apt.cache.update() returned False, but did not raise exception?!?") |
| 3221 | - |
| 3222 | - def commit(self, fprogress, iprogress): |
| 3223 | - logging.info("cache.commit()") |
| 3224 | - if self.lock: |
| 3225 | - self.release_lock() |
| 3226 | - apt.Cache.commit(self, fprogress, iprogress) |
| 3227 | - |
| 3228 | - def release_lock(self, pkgSystemOnly=True): |
| 3229 | - if self.lock: |
| 3230 | - try: |
| 3231 | - apt_pkg.pkgsystem_unlock() |
| 3232 | - self.lock = False |
| 3233 | - except SystemError as e: |
| 3234 | - logging.debug("failed to SystemUnLock() (%s) " % e) |
| 3235 | - |
| 3236 | - def get_lock(self, pkgSystemOnly=True): |
| 3237 | - if not self.lock: |
| 3238 | - try: |
| 3239 | - apt_pkg.pkgsystem_lock() |
| 3240 | - self.lock = True |
| 3241 | - except SystemError as e: |
| 3242 | - logging.debug("failed to SystemLock() (%s) " % e) |
| 3243 | - |
| 3244 | - def downloadable(self, pkg, useCandidate=True): |
| 3245 | - " check if the given pkg can be downloaded " |
| 3246 | - if useCandidate: |
| 3247 | - ver = self._depcache.get_candidate_ver(pkg._pkg) |
| 3248 | - else: |
| 3249 | - ver = pkg._pkg.current_ver |
| 3250 | - if ver == None: |
| 3251 | - logging.warning("no version information for '%s' (useCandidate=%s)" % (pkg.name, useCandidate)) |
| 3252 | - return False |
| 3253 | - return ver.downloadable |
| 3254 | - |
| 3255 | - def pkg_auto_removable(self, pkg): |
| 3256 | - """ check if the pkg is auto-removable """ |
| 3257 | - return (pkg.is_installed and |
| 3258 | - self._depcache.is_garbage(pkg._pkg)) |
| 3259 | - |
| 3260 | - def fix_broken(self): |
| 3261 | - """ try to fix broken dependencies on the system, may throw |
| 3262 | - SystemError when it can't""" |
| 3263 | - return self._depcache.fix_broken() |
| 3264 | - |
| 3265 | - def create_snapshot(self): |
| 3266 | - """ create a snapshot of the current changes """ |
| 3267 | - self.to_install = [] |
| 3268 | - self.to_remove = [] |
| 3269 | - for pkg in self.get_changes(): |
| 3270 | - if pkg.marked_install or pkg.marked_upgrade: |
| 3271 | - self.to_install.append(pkg.name) |
| 3272 | - if pkg.marked_delete: |
| 3273 | - self.to_remove.append(pkg.name) |
| 3274 | - |
| 3275 | - def clear(self): |
| 3276 | - self._depcache.init() |
| 3277 | - |
| 3278 | - def restore_snapshot(self): |
| 3279 | - """ restore a snapshot """ |
| 3280 | - actiongroup = apt_pkg.ActionGroup(self._depcache) |
| 3281 | - # just make pyflakes shut up, later we need to use |
| 3282 | - # with self.actiongroup(): |
| 3283 | - actiongroup |
| 3284 | - self.clear() |
| 3285 | - for name in self.to_remove: |
| 3286 | - pkg = self[name] |
| 3287 | - pkg.mark_delete() |
| 3288 | - for name in self.to_install: |
| 3289 | - pkg = self[name] |
| 3290 | - pkg.mark_install(auto_fix=False, auto_inst=False) |
| 3291 | - |
| 3292 | - def need_server_mode(self): |
| 3293 | - """ |
| 3294 | - This checks if we run on a desktop or a server install. |
| 3295 | - |
| 3296 | - A server install has more freedoms, for a desktop install |
| 3297 | - we force a desktop meta package to be install on the upgrade. |
| 3298 | - |
| 3299 | - We look for a installed desktop meta pkg and for key |
| 3300 | - dependencies, if none of those are installed we assume |
| 3301 | - server mode |
| 3302 | - """ |
| 3303 | - #logging.debug("need_server_mode() run") |
| 3304 | - # check for the MetaPkgs (e.g. ubuntu-desktop) |
| 3305 | - metapkgs = self.config.getlist("Distro","MetaPkgs") |
| 3306 | - for key in metapkgs: |
| 3307 | - # if it is installed we are done |
| 3308 | - if key in self and self[key].is_installed: |
| 3309 | - logging.debug("need_server_mode(): run in 'desktop' mode, (because of pkg '%s')" % key) |
| 3310 | - return False |
| 3311 | - # if it is not installed, but its key depends are installed |
| 3312 | - # we are done too (we auto-select the package later) |
| 3313 | - deps_found = True |
| 3314 | - for pkg in self.config.getlist(key,"KeyDependencies"): |
| 3315 | - deps_found &= pkg in self and self[pkg].is_installed |
| 3316 | - if deps_found: |
| 3317 | - logging.debug("need_server_mode(): run in 'desktop' mode, (because of key deps for '%s')" % key) |
| 3318 | - return False |
| 3319 | - logging.debug("need_server_mode(): can not find a desktop meta package or key deps, running in server mode") |
| 3320 | - return True |
| 3321 | - |
| 3322 | - def sanity_check(self, view): |
| 3323 | - """ check if the cache is ok and if the required metapkgs |
| 3324 | - are installed |
| 3325 | - """ |
| 3326 | - if self.is_broken: |
| 3327 | - try: |
| 3328 | - logging.debug("Have broken pkgs, trying to fix them") |
| 3329 | - self.fix_broken() |
| 3330 | - except SystemError: |
| 3331 | - view.error(_("Broken packages"), |
| 3332 | - _("Your system contains broken packages " |
| 3333 | - "that couldn't be fixed with this " |
| 3334 | - "software. " |
| 3335 | - "Please fix them first using synaptic or " |
| 3336 | - "apt-get before proceeding.")) |
| 3337 | - return False |
| 3338 | - return True |
| 3339 | - |
| 3340 | - def mark_install(self, pkg, reason=""): |
| 3341 | - logging.debug("Installing '%s' (%s)" % (pkg, reason)) |
| 3342 | - if pkg in self: |
| 3343 | - self[pkg].mark_install() |
| 3344 | - if not (self[pkg].marked_install or self[pkg].marked_upgrade): |
| 3345 | - logging.error("Installing/upgrading '%s' failed" % pkg) |
| 3346 | - #raise SystemError("Installing '%s' failed" % pkg) |
| 3347 | - return False |
| 3348 | - return True |
| 3349 | - def mark_upgrade(self, pkg, reason=""): |
| 3350 | - logging.debug("Upgrading '%s' (%s)" % (pkg, reason)) |
| 3351 | - if pkg in self and self[pkg].is_installed: |
| 3352 | - self[pkg].mark_upgrade() |
| 3353 | - if not self[pkg].marked_upgrade: |
| 3354 | - logging.error("Upgrading '%s' failed" % pkg) |
| 3355 | - return False |
| 3356 | - return True |
| 3357 | - def mark_remove(self, pkg, reason=""): |
| 3358 | - logging.debug("Removing '%s' (%s)" % (pkg, reason)) |
| 3359 | - if pkg in self: |
| 3360 | - self[pkg].mark_delete() |
| 3361 | - def mark_purge(self, pkg, reason=""): |
| 3362 | - logging.debug("Purging '%s' (%s)" % (pkg, reason)) |
| 3363 | - if pkg in self: |
| 3364 | - self._depcache.mark_delete(self[pkg]._pkg,True) |
| 3365 | - |
| 3366 | - def _keep_installed(self, pkgname, reason): |
| 3367 | - if (pkgname in self |
| 3368 | - and self[pkgname].is_installed |
| 3369 | - and self[pkgname].marked_delete): |
| 3370 | - self.mark_install(pkgname, reason) |
| 3371 | - |
| 3372 | - def keep_installed_rule(self): |
| 3373 | - """ run after the dist-upgrade to ensure that certain |
| 3374 | - packages are kept installed """ |
| 3375 | - # first the global list |
| 3376 | - for pkgname in self.config.getlist("Distro","KeepInstalledPkgs"): |
| 3377 | - self._keep_installed(pkgname, "Distro KeepInstalledPkgs rule") |
| 3378 | - # the the per-metapkg rules |
| 3379 | - for key in self.metapkgs: |
| 3380 | - if key in self and (self[key].is_installed or |
| 3381 | - self[key].marked_install): |
| 3382 | - for pkgname in self.config.getlist(key,"KeepInstalledPkgs"): |
| 3383 | - self._keep_installed(pkgname, "%s KeepInstalledPkgs rule" % key) |
| 3384 | - |
| 3385 | - # only enforce section if we have a network. Otherwise we run |
| 3386 | - # into CD upgrade issues for installed language packs etc |
| 3387 | - if self.config.get("Options","withNetwork") == "True": |
| 3388 | - logging.debug("Running KeepInstalledSection rules") |
| 3389 | - # now the KeepInstalledSection code |
| 3390 | - for section in self.config.getlist("Distro","KeepInstalledSection"): |
| 3391 | - for pkg in self: |
| 3392 | - if (pkg.candidate and pkg.candidate.downloadable |
| 3393 | - and pkg.marked_delete and pkg.section == section): |
| 3394 | - self._keep_installed(pkg.name, "Distro KeepInstalledSection rule: %s" % section) |
| 3395 | - for key in self.metapkgs: |
| 3396 | - if key in self and (self[key].is_installed or |
| 3397 | - self[key].marked_install): |
| 3398 | - for section in self.config.getlist(key,"KeepInstalledSection"): |
| 3399 | - for pkg in self: |
| 3400 | - if (pkg.candidate and pkg.candidate.downloadable |
| 3401 | - and pkg.marked_delete and |
| 3402 | - pkg.section == section): |
| 3403 | - self._keep_installed(pkg.name, "%s KeepInstalledSection rule: %s" % (key, section)) |
| 3404 | - |
| 3405 | - |
| 3406 | - def post_upgrade_rule(self): |
| 3407 | - " run after the upgrade was done in the cache " |
| 3408 | - for (rule, action) in [("Install", self.mark_install), |
| 3409 | - ("Upgrade", self.mark_upgrade), |
| 3410 | - ("Remove", self.mark_remove), |
| 3411 | - ("Purge", self.mark_purge)]: |
| 3412 | - # first the global list |
| 3413 | - for pkg in self.config.getlist("Distro","PostUpgrade%s" % rule): |
| 3414 | - action(pkg, "Distro PostUpgrade%s rule" % rule) |
| 3415 | - for key in self.metapkgs: |
| 3416 | - if key in self and (self[key].is_installed or |
| 3417 | - self[key].marked_install): |
| 3418 | - for pkg in self.config.getlist(key,"PostUpgrade%s" % rule): |
| 3419 | - action(pkg, "%s PostUpgrade%s rule" % (key, rule)) |
| 3420 | - # run the quirks handlers |
| 3421 | - if not self.partialUpgrade: |
| 3422 | - self.quirks.run("PostDistUpgradeCache") |
| 3423 | - |
| 3424 | - def identifyObsoleteKernels(self): |
| 3425 | - # we have a funny policy that we remove security updates |
| 3426 | - # for the kernel from the archive again when a new ABI |
| 3427 | - # version hits the archive. this means that we have |
| 3428 | - # e.g. |
| 3429 | - # linux-image-2.6.24-15-generic |
| 3430 | - # is obsolete when |
| 3431 | - # linux-image-2.6.24-19-generic |
| 3432 | - # is available |
| 3433 | - # ... |
| 3434 | - # This code tries to identify the kernels that can be removed |
| 3435 | - logging.debug("identifyObsoleteKernels()") |
| 3436 | - obsolete_kernels = set() |
| 3437 | - version = self.config.get("KernelRemoval","Version") |
| 3438 | - basenames = self.config.getlist("KernelRemoval","BaseNames") |
| 3439 | - types = self.config.getlist("KernelRemoval","Types") |
| 3440 | - for pkg in self: |
| 3441 | - for base in basenames: |
| 3442 | - basename = "%s-%s-" % (base,version) |
| 3443 | - for type in types: |
| 3444 | - if (pkg.name.startswith(basename) and |
| 3445 | - pkg.name.endswith(type) and |
| 3446 | - pkg.is_installed): |
| 3447 | - if (pkg.name == "%s-%s" % (base,self.uname)): |
| 3448 | - logging.debug("skipping running kernel %s" % pkg.name) |
| 3449 | - continue |
| 3450 | - logging.debug("removing obsolete kernel '%s'" % pkg.name) |
| 3451 | - obsolete_kernels.add(pkg.name) |
| 3452 | - logging.debug("identifyObsoleteKernels found '%s'" % obsolete_kernels) |
| 3453 | - return obsolete_kernels |
| 3454 | - |
| 3455 | - def checkForNvidia(self): |
| 3456 | - """ |
| 3457 | - this checks for nvidia hardware and checks what driver is needed |
| 3458 | - """ |
| 3459 | - logging.debug("nvidiaUpdate()") |
| 3460 | - # if the free drivers would give us a equally hard time, we would |
| 3461 | - # never be able to release |
| 3462 | - try: |
| 3463 | - from .NvidiaDetector.nvidiadetector import NvidiaDetection |
| 3464 | - except (ImportError, SyntaxError) as e: |
| 3465 | - # SyntaxError is temporary until the port of NvidiaDetector to |
| 3466 | - # Python 3 is in the archive. |
| 3467 | - logging.error("NvidiaDetector can not be imported %s" % e) |
| 3468 | - return False |
| 3469 | - try: |
| 3470 | - # get new detection module and use the modalises files |
| 3471 | - # from within the release-upgrader |
| 3472 | - nv = NvidiaDetection(obsolete="./ubuntu-drivers-obsolete.pkgs") |
| 3473 | - #nv = NvidiaDetection() |
| 3474 | - # check if a binary driver is installed now |
| 3475 | - for oldDriver in nv.oldPackages: |
| 3476 | - if oldDriver in self and self[oldDriver].is_installed: |
| 3477 | - self.mark_remove(oldDriver, "old nvidia driver") |
| 3478 | - break |
| 3479 | - else: |
| 3480 | - logging.info("no old nvidia driver installed, installing no new") |
| 3481 | - return False |
| 3482 | - # check which one to use |
| 3483 | - driver = nv.selectDriver() |
| 3484 | - logging.debug("nv.selectDriver() returned '%s'" % driver) |
| 3485 | - if not driver in self: |
| 3486 | - logging.warning("no '%s' found" % driver) |
| 3487 | - return False |
| 3488 | - if not (self[driver].marked_install or self[driver].marked_upgrade): |
| 3489 | - self[driver].mark_install() |
| 3490 | - logging.info("installing %s as suggested by NvidiaDetector" % driver) |
| 3491 | - return True |
| 3492 | - except Exception as e: |
| 3493 | - logging.error("NvidiaDetection returned a error: %s" % e) |
| 3494 | - return False |
| 3495 | - |
| 3496 | - |
| 3497 | - def getKernelsFromBaseInstaller(self): |
| 3498 | - """get the list of recommended kernels from base-installer""" |
| 3499 | - p = Popen(["/bin/sh", "./get_kernel_list.sh"], |
| 3500 | - stdout=PIPE, universal_newlines=True) |
| 3501 | - res = p.wait() |
| 3502 | - if res != 0: |
| 3503 | - logging.warn("./get_kernel_list.sh returned non-zero exitcode") |
| 3504 | - return "" |
| 3505 | - kernels = p.communicate()[0] |
| 3506 | - kernels = [x.strip() for x in kernels.split("\n")] |
| 3507 | - kernels = [x for x in kernels if len(x) > 0] |
| 3508 | - logging.debug("./get_kernel_list.sh returns: %s" % kernels) |
| 3509 | - return kernels |
| 3510 | - |
| 3511 | - def _selectKernelFromBaseInstaller(self): |
| 3512 | - """ use the get_kernel_list.sh script (that uses base-installer) |
| 3513 | - to figure out what kernel is most suitable for the system |
| 3514 | - """ |
| 3515 | - # check if we have a kernel from that list installed first |
| 3516 | - kernels = self.getKernelsFromBaseInstaller() |
| 3517 | - for kernel in kernels: |
| 3518 | - if not kernel in self: |
| 3519 | - logging.debug("%s not available in cache" % kernel) |
| 3520 | - continue |
| 3521 | - # this can happen e.g. on cdrom -> cdrom only upgrades |
| 3522 | - # where on hardy we have linux-386 but on the lucid CD |
| 3523 | - # we only have linux-generic |
| 3524 | - if (not self[kernel].candidate or |
| 3525 | - not self[kernel].candidate.downloadable): |
| 3526 | - logging.debug("%s not downloadable" % kernel) |
| 3527 | - continue |
| 3528 | - # check if installed |
| 3529 | - if self[kernel].is_installed or self[kernel].marked_install: |
| 3530 | - logging.debug("%s kernel already installed" % kernel) |
| 3531 | - if self[kernel].is_upgradable and not self[kernel].marked_upgrade: |
| 3532 | - self.mark_upgrade(kernel, "Upgrading kernel from base-installer") |
| 3533 | - return |
| 3534 | - # if we have not found a kernel yet, use the first one that installs |
| 3535 | - for kernel in kernels: |
| 3536 | - if self.mark_install(kernel, |
| 3537 | - "Selecting new kernel from base-installer"): |
| 3538 | - if self._has_kernel_headers_installed(): |
| 3539 | - prefix, sep, postfix = kernel.partition("-") |
| 3540 | - headers = "%s-header-%s" % (prefix, postfix) |
| 3541 | - self.mark_install( |
| 3542 | - headers, |
| 3543 | - "Selecting new kernel headers from base-installer") |
| 3544 | - else: |
| 3545 | - logging.debug("no kernel-headers installed") |
| 3546 | - return |
| 3547 | - |
| 3548 | - def _has_kernel_headers_installed(self): |
| 3549 | - for pkg in self: |
| 3550 | - if (pkg.name.startswith("linux-headers-") and |
| 3551 | - pkg.is_installed): |
| 3552 | - return True |
| 3553 | - return False |
| 3554 | - |
| 3555 | - def checkForKernel(self): |
| 3556 | - """ check for the running kernel and try to ensure that we have |
| 3557 | - an updated version |
| 3558 | - """ |
| 3559 | - logging.debug("Kernel uname: '%s' " % self.uname) |
| 3560 | - try: |
| 3561 | - (version, build, flavour) = self.uname.split("-") |
| 3562 | - except Exception as e: |
| 3563 | - logging.warning("Can't parse kernel uname: '%s' (self compiled?)" % e) |
| 3564 | - return False |
| 3565 | - # now check if we have a SMP system |
| 3566 | - dmesg = Popen(["dmesg"],stdout=PIPE).communicate()[0] |
| 3567 | - if b"WARNING: NR_CPUS limit" in dmesg: |
| 3568 | - logging.debug("UP kernel on SMP system!?!") |
| 3569 | - # use base-installer to get the kernel we want (if it exists) |
| 3570 | - if os.path.exists("./get_kernel_list.sh"): |
| 3571 | - self._selectKernelFromBaseInstaller() |
| 3572 | - else: |
| 3573 | - logging.debug("skipping ./get_kernel_list.sh: not found") |
| 3574 | - return True |
| 3575 | - |
| 3576 | - def checkPriority(self): |
| 3577 | - # tuple of priorities we require to be installed |
| 3578 | - need = ('required', ) |
| 3579 | - # stuff that its ok not to have |
| 3580 | - removeEssentialOk = self.config.getlist("Distro","RemoveEssentialOk") |
| 3581 | - # check now |
| 3582 | - for pkg in self: |
| 3583 | - # WORKADOUND bug on the CD/python-apt #253255 |
| 3584 | - ver = pkg._pcache._depcache.get_candidate_ver(pkg._pkg) |
| 3585 | - if ver and ver.priority == 0: |
| 3586 | - logging.error("Package %s has no priority set" % pkg.name) |
| 3587 | - continue |
| 3588 | - if (pkg.candidate and pkg.candidate.downloadable and |
| 3589 | - not (pkg.is_installed or pkg.marked_install) and |
| 3590 | - not pkg.name in removeEssentialOk and |
| 3591 | - # ignore multiarch priority required packages |
| 3592 | - not ":" in pkg.name and |
| 3593 | - pkg.candidate.priority in need): |
| 3594 | - self.mark_install(pkg.name, "priority in required set '%s' but not scheduled for install" % need) |
| 3595 | - |
| 3596 | - # FIXME: make this a decorator (just like the withResolverLog()) |
| 3597 | - def updateGUI(self, view, lock): |
| 3598 | - i = 0 |
| 3599 | - while lock.locked(): |
| 3600 | - if i % 15 == 0: |
| 3601 | - view.pulseProgress() |
| 3602 | - view.processEvents() |
| 3603 | - time.sleep(0.02) |
| 3604 | - i += 1 |
| 3605 | - view.pulseProgress(finished=True) |
| 3606 | - view.processEvents() |
| 3607 | - |
| 3608 | - @withResolverLog |
| 3609 | - def distUpgrade(self, view, serverMode, partialUpgrade): |
| 3610 | - # keep the GUI alive |
| 3611 | - lock = threading.Lock() |
| 3612 | - lock.acquire() |
| 3613 | - t = threading.Thread(target=self.updateGUI, args=(self.view, lock,)) |
| 3614 | - t.start() |
| 3615 | - try: |
| 3616 | - # mvo: disabled as it casues to many errornous installs |
| 3617 | - #self._apply_dselect_upgrade() |
| 3618 | - |
| 3619 | - # upgrade (and make sure this way that the cache is ok) |
| 3620 | - self.upgrade(True) |
| 3621 | - |
| 3622 | - # check that everything in priority required is installed |
| 3623 | - self.checkPriority() |
| 3624 | - |
| 3625 | - # see if our KeepInstalled rules are honored |
| 3626 | - self.keep_installed_rule() |
| 3627 | - |
| 3628 | - # check if we got a new kernel (if we are not inside a |
| 3629 | - # chroot) |
| 3630 | - if inside_chroot(): |
| 3631 | - logging.warn("skipping kernel checks because we run inside a chroot") |
| 3632 | - else: |
| 3633 | - self.checkForKernel() |
| 3634 | - |
| 3635 | - # check for nvidia stuff |
| 3636 | - self.checkForNvidia() |
| 3637 | - |
| 3638 | - # and if we have some special rules |
| 3639 | - self.post_upgrade_rule() |
| 3640 | - |
| 3641 | - # install missing meta-packages (if not in server upgrade mode) |
| 3642 | - self._keepBaseMetaPkgsInstalled(view) |
| 3643 | - if not serverMode: |
| 3644 | - # if this fails, a system error is raised |
| 3645 | - self._installMetaPkgs(view) |
| 3646 | - |
| 3647 | - # see if it all makes sense, if not this function raises |
| 3648 | - self._verifyChanges() |
| 3649 | - |
| 3650 | - except SystemError as e: |
| 3651 | - # this should go into a finally: line, see below for the |
| 3652 | - # rationale why it doesn't |
| 3653 | - lock.release() |
| 3654 | - t.join() |
| 3655 | - # FIXME: change the text to something more useful |
| 3656 | - details = _("An unresolvable problem occurred while " |
| 3657 | - "calculating the upgrade:\n%s\n\n " |
| 3658 | - "This can be caused by:\n" |
| 3659 | - " * Upgrading to a pre-release version of Ubuntu\n" |
| 3660 | - " * Running the current pre-release version of Ubuntu\n" |
| 3661 | - " * Unofficial software packages not provided by Ubuntu\n" |
| 3662 | - "\n") % e |
| 3663 | - # we never have partialUpgrades (including removes) on a stable system |
| 3664 | - # with only ubuntu sources so we do not recommend reporting a bug |
| 3665 | - if partialUpgrade: |
| 3666 | - details += _("This is most likely a transient problem, " |
| 3667 | - "please try again later.") |
| 3668 | - else: |
| 3669 | - details += _("If none of this applies, then please report this bug using " |
| 3670 | - "the command 'ubuntu-bug update-manager' in a terminal.") |
| 3671 | - # make the error text available again on stdout for the |
| 3672 | - # text frontend |
| 3673 | - self._stopAptResolverLog() |
| 3674 | - view.error(_("Could not calculate the upgrade"), details) |
| 3675 | - # start the resolver log again because this is run with |
| 3676 | - # the withResolverLog decorator |
| 3677 | - self._startAptResolverLog() |
| 3678 | - logging.error("Dist-upgrade failed: '%s'", e) |
| 3679 | - return False |
| 3680 | - # would be nice to be able to use finally: here, but we need |
| 3681 | - # to run on python2.4 too |
| 3682 | - #finally: |
| 3683 | - # wait for the gui-update thread to exit |
| 3684 | - lock.release() |
| 3685 | - t.join() |
| 3686 | - |
| 3687 | - # check the trust of the packages that are going to change |
| 3688 | - untrusted = [] |
| 3689 | - for pkg in self.get_changes(): |
| 3690 | - if pkg.marked_delete: |
| 3691 | - continue |
| 3692 | - # special case because of a bug in pkg.candidate.origins |
| 3693 | - if pkg.marked_downgrade: |
| 3694 | - for ver in pkg._pkg.version_list: |
| 3695 | - # version is lower than installed one |
| 3696 | - if apt_pkg.version_compare( |
| 3697 | - ver.ver_str, pkg.installed.version) < 0: |
| 3698 | - for (verFileIter, index) in ver.file_list: |
| 3699 | - indexfile = pkg._pcache._list.find_index(verFileIter) |
| 3700 | - if indexfile and not indexfile.is_trusted: |
| 3701 | - untrusted.append(pkg.name) |
| 3702 | - break |
| 3703 | - continue |
| 3704 | - origins = pkg.candidate.origins |
| 3705 | - trusted = False |
| 3706 | - for origin in origins: |
| 3707 | - #print(origin) |
| 3708 | - trusted |= origin.trusted |
| 3709 | - if not trusted: |
| 3710 | - untrusted.append(pkg.name) |
| 3711 | - # check if the user overwrote the unauthenticated warning |
| 3712 | - try: |
| 3713 | - b = self.config.getboolean("Distro","AllowUnauthenticated") |
| 3714 | - if b: |
| 3715 | - logging.warning("AllowUnauthenticated set!") |
| 3716 | - return True |
| 3717 | - except configparser.NoOptionError as e: |
| 3718 | - pass |
| 3719 | - if len(untrusted) > 0: |
| 3720 | - untrusted.sort() |
| 3721 | - logging.error("Unauthenticated packages found: '%s'" % \ |
| 3722 | - " ".join(untrusted)) |
| 3723 | - # FIXME: maybe ask a question here? instead of failing? |
| 3724 | - self._stopAptResolverLog() |
| 3725 | - view.error(_("Error authenticating some packages"), |
| 3726 | - _("It was not possible to authenticate some " |
| 3727 | - "packages. This may be a transient network problem. " |
| 3728 | - "You may want to try again later. See below for a " |
| 3729 | - "list of unauthenticated packages."), |
| 3730 | - "\n".join(untrusted)) |
| 3731 | - # start the resolver log again because this is run with |
| 3732 | - # the withResolverLog decorator |
| 3733 | - self._startAptResolverLog() |
| 3734 | - return False |
| 3735 | - return True |
| 3736 | - |
| 3737 | - def _verifyChanges(self): |
| 3738 | - """ this function tests if the current changes don't violate |
| 3739 | - our constrains (blacklisted removals etc) |
| 3740 | - """ |
| 3741 | - removeEssentialOk = self.config.getlist("Distro","RemoveEssentialOk") |
| 3742 | - # check changes |
| 3743 | - for pkg in self.get_changes(): |
| 3744 | - if pkg.marked_delete and self._inRemovalBlacklist(pkg.name): |
| 3745 | - logging.debug("The package '%s' is marked for removal but it's in the removal blacklist", pkg.name) |
| 3746 | - raise SystemError(_("The package '%s' is marked for removal but it is in the removal blacklist.") % pkg.name) |
| 3747 | - if pkg.marked_delete and (pkg._pkg.essential == True and |
| 3748 | - not pkg.name in removeEssentialOk): |
| 3749 | - logging.debug("The package '%s' is marked for removal but it's an ESSENTIAL package", pkg.name) |
| 3750 | - raise SystemError(_("The essential package '%s' is marked for removal.") % pkg.name) |
| 3751 | - # check bad-versions blacklist |
| 3752 | - badVersions = self.config.getlist("Distro","BadVersions") |
| 3753 | - for bv in badVersions: |
| 3754 | - (pkgname, ver) = bv.split("_") |
| 3755 | - if (pkgname in self and self[pkgname].candidate and |
| 3756 | - self[pkgname].candidate.version == ver and |
| 3757 | - (self[pkgname].marked_install or |
| 3758 | - self[pkgname].marked_upgrade)): |
| 3759 | - raise SystemError(_("Trying to install blacklisted version '%s'") % bv) |
| 3760 | - return True |
| 3761 | - |
| 3762 | - def _lookupPkgRecord(self, pkg): |
| 3763 | - """ |
| 3764 | - helper to make sure that the pkg._records is pointing to the right |
| 3765 | - location - needed because python-apt 0.7.9 dropped the python-apt |
| 3766 | - version but we can not yet use the new version because on upgrade |
| 3767 | - the old version is still installed |
| 3768 | - """ |
| 3769 | - ver = pkg._pcache._depcache.get_candidate_ver(pkg._pkg) |
| 3770 | - if ver is None: |
| 3771 | - print("No candidate ver: ", pkg.name) |
| 3772 | - return False |
| 3773 | - if ver.file_list is None: |
| 3774 | - print("No file_list for: %s " % self._pkg.name()) |
| 3775 | - return False |
| 3776 | - f, index = ver.file_list.pop(0) |
| 3777 | - pkg._pcache._records.lookup((f, index)) |
| 3778 | - return True |
| 3779 | - |
| 3780 | - @property |
| 3781 | - def installedTasks(self): |
| 3782 | - tasks = {} |
| 3783 | - installed_tasks = set() |
| 3784 | - for pkg in self: |
| 3785 | - if not self._lookupPkgRecord(pkg): |
| 3786 | - logging.debug("no PkgRecord found for '%s', skipping " % pkg.name) |
| 3787 | - continue |
| 3788 | - for line in pkg._pcache._records.record.split("\n"): |
| 3789 | - if line.startswith("Task:"): |
| 3790 | - for task in (line[len("Task:"):]).split(","): |
| 3791 | - task = task.strip() |
| 3792 | - if task not in tasks: |
| 3793 | - tasks[task] = set() |
| 3794 | - tasks[task].add(pkg.name) |
| 3795 | - for task in tasks: |
| 3796 | - installed = True |
| 3797 | - for pkgname in tasks[task]: |
| 3798 | - if not self[pkgname].is_installed: |
| 3799 | - installed = False |
| 3800 | - break |
| 3801 | - if installed: |
| 3802 | - installed_tasks.add(task) |
| 3803 | - return installed_tasks |
| 3804 | - |
| 3805 | - def installTasks(self, tasks): |
| 3806 | - logging.debug("running installTasks") |
| 3807 | - for pkg in self: |
| 3808 | - if pkg.marked_install or pkg.is_installed: |
| 3809 | - continue |
| 3810 | - self._lookupPkgRecord(pkg) |
| 3811 | - if not (hasattr(pkg._pcache._records,"record") and pkg._pcache._records.record): |
| 3812 | - logging.warning("can not find Record for '%s'" % pkg.name) |
| 3813 | - continue |
| 3814 | - for line in pkg._pcache._records.record.split("\n"): |
| 3815 | - if line.startswith("Task:"): |
| 3816 | - for task in (line[len("Task:"):]).split(","): |
| 3817 | - task = task.strip() |
| 3818 | - if task in tasks: |
| 3819 | - pkg.mark_install() |
| 3820 | - return True |
| 3821 | - |
| 3822 | - def _keepBaseMetaPkgsInstalled(self, view): |
| 3823 | - for pkg in self.config.getlist("Distro","BaseMetaPkgs"): |
| 3824 | - self._keep_installed(pkg, "base meta package keep installed rule") |
| 3825 | - |
| 3826 | - def _installMetaPkgs(self, view): |
| 3827 | - |
| 3828 | - def metaPkgInstalled(): |
| 3829 | - """ |
| 3830 | - internal helper that checks if at least one meta-pkg is |
| 3831 | - installed or marked install |
| 3832 | - """ |
| 3833 | - for key in metapkgs: |
| 3834 | - if key in self: |
| 3835 | - pkg = self[key] |
| 3836 | - if pkg.is_installed and pkg.marked_delete: |
| 3837 | - logging.debug("metapkg '%s' installed but marked_delete" % pkg.name) |
| 3838 | - if ((pkg.is_installed and not pkg.marked_delete) |
| 3839 | - or self[key].marked_install): |
| 3840 | - return True |
| 3841 | - return False |
| 3842 | - |
| 3843 | - # now check for ubuntu-desktop, kubuntu-desktop, edubuntu-desktop |
| 3844 | - metapkgs = self.config.getlist("Distro","MetaPkgs") |
| 3845 | - |
| 3846 | - # we never go without ubuntu-base |
| 3847 | - for pkg in self.config.getlist("Distro","BaseMetaPkgs"): |
| 3848 | - self[pkg].mark_install() |
| 3849 | - |
| 3850 | - # every meta-pkg that is installed currently, will be marked |
| 3851 | - # install (that result in a upgrade and removes a mark_delete) |
| 3852 | - for key in metapkgs: |
| 3853 | - try: |
| 3854 | - if (key in self and |
| 3855 | - self[key].is_installed and |
| 3856 | - self[key].is_upgradable): |
| 3857 | - logging.debug("Marking '%s' for upgrade" % key) |
| 3858 | - self[key].mark_upgrade() |
| 3859 | - except SystemError as e: |
| 3860 | - # warn here, but don't fail, its possible that meta-packages |
| 3861 | - # conflict (like ubuntu-desktop vs xubuntu-desktop) LP: #775411 |
| 3862 | - logging.warn("Can't mark '%s' for upgrade (%s)" % (key,e)) |
| 3863 | - |
| 3864 | - # check if we have a meta-pkg, if not, try to guess which one to pick |
| 3865 | - if not metaPkgInstalled(): |
| 3866 | - logging.debug("none of the '%s' meta-pkgs installed" % metapkgs) |
| 3867 | - for key in metapkgs: |
| 3868 | - deps_found = True |
| 3869 | - for pkg in self.config.getlist(key,"KeyDependencies"): |
| 3870 | - deps_found &= pkg in self and self[pkg].is_installed |
| 3871 | - if deps_found: |
| 3872 | - logging.debug("guessing '%s' as missing meta-pkg" % key) |
| 3873 | - try: |
| 3874 | - self[key].mark_install() |
| 3875 | - except (SystemError, KeyError) as e: |
| 3876 | - logging.error("failed to mark '%s' for install (%s)" % (key,e)) |
| 3877 | - view.error(_("Can't install '%s'") % key, |
| 3878 | - _("It was impossible to install a " |
| 3879 | - "required package. Please report " |
| 3880 | - "this as a bug using " |
| 3881 | - "'ubuntu-bug update-manager' in " |
| 3882 | - "a terminal.")) |
| 3883 | - return False |
| 3884 | - logging.debug("marked_install: '%s' -> '%s'" % (key, self[key].marked_install)) |
| 3885 | - break |
| 3886 | - # check if we actually found one |
| 3887 | - if not metaPkgInstalled(): |
| 3888 | - # FIXME: provide a list |
| 3889 | - view.error(_("Can't guess meta-package"), |
| 3890 | - _("Your system does not contain a " |
| 3891 | - "ubuntu-desktop, kubuntu-desktop, xubuntu-desktop or " |
| 3892 | - "edubuntu-desktop package and it was not " |
| 3893 | - "possible to detect which version of " |
| 3894 | - "Ubuntu you are running.\n " |
| 3895 | - "Please install one of the packages " |
| 3896 | - "above first using synaptic or " |
| 3897 | - "apt-get before proceeding.")) |
| 3898 | - return False |
| 3899 | - return True |
| 3900 | - |
| 3901 | - def _inRemovalBlacklist(self, pkgname): |
| 3902 | - for expr in self.removal_blacklist: |
| 3903 | - if re.compile(expr).match(pkgname): |
| 3904 | - logging.debug("blacklist expr '%s' matches '%s'" % (expr, pkgname)) |
| 3905 | - return True |
| 3906 | - return False |
| 3907 | - |
| 3908 | - @withResolverLog |
| 3909 | - def tryMarkObsoleteForRemoval(self, pkgname, remove_candidates, foreign_pkgs): |
| 3910 | - #logging.debug("tryMarkObsoleteForRemoval(): %s" % pkgname) |
| 3911 | - # sanity check, first see if it looks like a running kernel pkg |
| 3912 | - if pkgname.endswith(self.uname): |
| 3913 | - logging.debug("skipping running kernel pkg '%s'" % pkgname) |
| 3914 | - return False |
| 3915 | - if self._inRemovalBlacklist(pkgname): |
| 3916 | - logging.debug("skipping '%s' (in removalBlacklist)" % pkgname) |
| 3917 | - return False |
| 3918 | - # ensure we honor KeepInstalledSection here as well |
| 3919 | - for section in self.config.getlist("Distro","KeepInstalledSection"): |
| 3920 | - if pkgname in self and self[pkgname].section == section: |
| 3921 | - logging.debug("skipping '%s' (in KeepInstalledSection)" % pkgname) |
| 3922 | - return False |
| 3923 | - # if we don't have the package anyway, we are fine (this can |
| 3924 | - # happen when forced_obsoletes are specified in the config file) |
| 3925 | - if pkgname not in self: |
| 3926 | - #logging.debug("package '%s' not in cache" % pkgname) |
| 3927 | - return True |
| 3928 | - # check if we want to purge |
| 3929 | - try: |
| 3930 | - purge = self.config.getboolean("Distro","PurgeObsoletes") |
| 3931 | - except configparser.NoOptionError as e: |
| 3932 | - purge = False |
| 3933 | - |
| 3934 | - # this is a delete candidate, only actually delete, |
| 3935 | - # if it dosn't remove other packages depending on it |
| 3936 | - # that are not obsolete as well |
| 3937 | - actiongroup = apt_pkg.ActionGroup(self._depcache) |
| 3938 | - # just make pyflakes shut up, later we should use |
| 3939 | - # with self.actiongroup(): |
| 3940 | - actiongroup |
| 3941 | - self.create_snapshot() |
| 3942 | - try: |
| 3943 | - self[pkgname].mark_delete(purge=purge) |
| 3944 | - self.view.processEvents() |
| 3945 | - #logging.debug("marking '%s' for removal" % pkgname) |
| 3946 | - for pkg in self.get_changes(): |
| 3947 | - if (pkg.name not in remove_candidates or |
| 3948 | - pkg.name in foreign_pkgs or |
| 3949 | - self._inRemovalBlacklist(pkg.name)): |
| 3950 | - logging.debug("package '%s' has unwanted removals, skipping" % pkgname) |
| 3951 | - self.restore_snapshot() |
| 3952 | - return False |
| 3953 | - except (SystemError, KeyError) as e: |
| 3954 | - logging.warning("_tryMarkObsoleteForRemoval failed for '%s' (%s: %s)" % (pkgname, repr(e), e)) |
| 3955 | - self.restore_snapshot() |
| 3956 | - return False |
| 3957 | - return True |
| 3958 | - |
| 3959 | - def _getObsoletesPkgs(self): |
| 3960 | - " get all package names that are not downloadable " |
| 3961 | - obsolete_pkgs =set() |
| 3962 | - for pkg in self: |
| 3963 | - if pkg.is_installed: |
| 3964 | - # check if any version is downloadable. we need to check |
| 3965 | - # for older ones too, because there might be |
| 3966 | - # cases where e.g. firefox in gutsy-updates is newer |
| 3967 | - # than hardy |
| 3968 | - if not self.anyVersionDownloadable(pkg): |
| 3969 | - obsolete_pkgs.add(pkg.name) |
| 3970 | - return obsolete_pkgs |
| 3971 | - |
| 3972 | - def anyVersionDownloadable(self, pkg): |
| 3973 | - " helper that checks if any of the version of pkg is downloadable " |
| 3974 | - for ver in pkg._pkg.version_list: |
| 3975 | - if ver.downloadable: |
| 3976 | - return True |
| 3977 | - return False |
| 3978 | - |
| 3979 | - def _getUnusedDependencies(self): |
| 3980 | - " get all package names that are not downloadable " |
| 3981 | - unused_dependencies =set() |
| 3982 | - for pkg in self: |
| 3983 | - if pkg.is_installed and self._depcache.is_garbage(pkg._pkg): |
| 3984 | - unused_dependencies.add(pkg.name) |
| 3985 | - return unused_dependencies |
| 3986 | - |
| 3987 | - def get_installed_demoted_packages(self): |
| 3988 | - """ return list of installed and demoted packages |
| 3989 | - |
| 3990 | - If a demoted package is a automatic install it will be skipped |
| 3991 | - """ |
| 3992 | - demotions = set() |
| 3993 | - demotions_file = self.config.get("Distro","Demotions") |
| 3994 | - if os.path.exists(demotions_file): |
| 3995 | - with open(demotions_file) as demotions_f: |
| 3996 | - for line in demotions_f: |
| 3997 | - if not line.startswith("#"): |
| 3998 | - demotions.add(line.strip()) |
| 3999 | - installed_demotions = set() |
| 4000 | - for demoted_pkgname in demotions: |
| 4001 | - if demoted_pkgname not in self: |
| 4002 | - continue |
| 4003 | - pkg = self[demoted_pkgname] |
| 4004 | - if (not pkg.is_installed or |
| 4005 | - self._depcache.is_auto_installed(pkg._pkg) or |
| 4006 | - pkg.marked_delete): |
| 4007 | - continue |
| 4008 | - installed_demotions.add(pkg) |
| 4009 | - return list(installed_demotions) |
| 4010 | - |
| 4011 | - def _getForeignPkgs(self, allowed_origin, fromDist, toDist): |
| 4012 | - """ get all packages that are installed from a foreign repo |
| 4013 | - (and are actually downloadable) |
| 4014 | - """ |
| 4015 | - foreign_pkgs=set() |
| 4016 | - for pkg in self: |
| 4017 | - if pkg.is_installed and self.downloadable(pkg): |
| 4018 | - if not pkg.candidate: |
| 4019 | - continue |
| 4020 | - # assume it is foreign and see if it is from the |
| 4021 | - # official archive |
| 4022 | - foreign=True |
| 4023 | - for origin in pkg.candidate.origins: |
| 4024 | - # FIXME: use some better metric here |
| 4025 | - if fromDist in origin.archive and \ |
| 4026 | - origin.origin == allowed_origin: |
| 4027 | - foreign = False |
| 4028 | - if toDist in origin.archive and \ |
| 4029 | - origin.origin == allowed_origin: |
| 4030 | - foreign = False |
| 4031 | - if foreign: |
| 4032 | - foreign_pkgs.add(pkg.name) |
| 4033 | - return foreign_pkgs |
| 4034 | - |
| 4035 | - def checkFreeSpace(self, snapshots_in_use=False): |
| 4036 | - """ |
| 4037 | - this checks if we have enough free space on /var, /boot and /usr |
| 4038 | - with the given cache |
| 4039 | - |
| 4040 | - Note: this can not be fully accurate if there are multiple |
| 4041 | - mountpoints for /usr, /var, /boot |
| 4042 | - """ |
| 4043 | - |
| 4044 | - class FreeSpace(object): |
| 4045 | - " helper class that represents the free space on each mounted fs " |
| 4046 | - def __init__(self, initialFree): |
| 4047 | - self.free = initialFree |
| 4048 | - self.need = 0 |
| 4049 | - |
| 4050 | - def make_fs_id(d): |
| 4051 | - """ return 'id' of a directory so that directories on the |
| 4052 | - same filesystem get the same id (simply the mount_point) |
| 4053 | - """ |
| 4054 | - for mount_point in mounted: |
| 4055 | - if d.startswith(mount_point): |
| 4056 | - return mount_point |
| 4057 | - return "/" |
| 4058 | - |
| 4059 | - # this is all a bit complicated |
| 4060 | - # 1) check what is mounted (in mounted) |
| 4061 | - # 2) create FreeSpace objects for the dirs we are interested in |
| 4062 | - # (mnt_map) |
| 4063 | - # 3) use the mnt_map to check if we have enough free space and |
| 4064 | - # if not tell the user how much is missing |
| 4065 | - mounted = [] |
| 4066 | - mnt_map = {} |
| 4067 | - fs_free = {} |
| 4068 | - with open("/proc/mounts") as mounts: |
| 4069 | - for line in mounts: |
| 4070 | - try: |
| 4071 | - (what, where, fs, options, a, b) = line.split() |
| 4072 | - except ValueError as e: |
| 4073 | - logging.debug("line '%s' in /proc/mounts not understood (%s)" % (line, e)) |
| 4074 | - continue |
| 4075 | - if not where in mounted: |
| 4076 | - mounted.append(where) |
| 4077 | - # make sure mounted is sorted by longest path |
| 4078 | - mounted.sort(key=len, reverse=True) |
| 4079 | - archivedir = apt_pkg.config.find_dir("Dir::Cache::archives") |
| 4080 | - aufs_rw_dir = "/tmp/" |
| 4081 | - if (hasattr(self, "config") and |
| 4082 | - self.config.getWithDefault("Aufs","Enabled", False)): |
| 4083 | - aufs_rw_dir = self.config.get("Aufs","RWDir") |
| 4084 | - if not os.path.exists(aufs_rw_dir): |
| 4085 | - os.makedirs(aufs_rw_dir) |
| 4086 | - logging.debug("cache aufs_rw_dir: %s" % aufs_rw_dir) |
| 4087 | - for d in ["/","/usr","/var","/boot", archivedir, aufs_rw_dir, "/home","/tmp/"]: |
| 4088 | - d = os.path.realpath(d) |
| 4089 | - fs_id = make_fs_id(d) |
| 4090 | - if os.path.exists(d): |
| 4091 | - st = os.statvfs(d) |
| 4092 | - free = st.f_bavail * st.f_frsize |
| 4093 | - else: |
| 4094 | - logging.warn("directory '%s' does not exists" % d) |
| 4095 | - free = 0 |
| 4096 | - if fs_id in mnt_map: |
| 4097 | - logging.debug("Dir %s mounted on %s" % (d,mnt_map[fs_id])) |
| 4098 | - fs_free[d] = fs_free[mnt_map[fs_id]] |
| 4099 | - else: |
| 4100 | - logging.debug("Free space on %s: %s" % (d,free)) |
| 4101 | - mnt_map[fs_id] = d |
| 4102 | - fs_free[d] = FreeSpace(free) |
| 4103 | - del mnt_map |
| 4104 | - logging.debug("fs_free contains: '%s'" % fs_free) |
| 4105 | - |
| 4106 | - # now calculate the space that is required on /boot |
| 4107 | - # we do this by checking how many linux-image-$ver packages |
| 4108 | - # are installed or going to be installed |
| 4109 | - space_in_boot = 0 |
| 4110 | - for pkg in self: |
| 4111 | - # we match against everything that looks like a kernel |
| 4112 | - # and add space check to filter out metapackages |
| 4113 | - if re.match("^linux-(image|image-debug)-[0-9.]*-.*", pkg.name): |
| 4114 | - if pkg.marked_install: |
| 4115 | - logging.debug("%s (new-install) added with %s to boot space" % (pkg.name, KERNEL_INITRD_SIZE)) |
| 4116 | - space_in_boot += KERNEL_INITRD_SIZE |
| 4117 | - # mvo: jaunty does not create .bak files anymore |
| 4118 | - #elif (pkg.marked_upgrade or pkg.is_installed): |
| 4119 | - # logging.debug("%s (upgrade|installed) added with %s to boot space" % (pkg.name, KERNEL_INITRD_SIZE)) |
| 4120 | - # space_in_boot += KERNEL_INITRD_SIZE # creates .bak |
| 4121 | - |
| 4122 | - # we check for various sizes: |
| 4123 | - # archivedir is were we download the debs |
| 4124 | - # /usr is assumed to get *all* of the install space (incorrect, |
| 4125 | - # but as good as we can do currently + safety buffer |
| 4126 | - # / has a small safety buffer as well |
| 4127 | - required_for_aufs = 0.0 |
| 4128 | - if (hasattr(self, "config") and |
| 4129 | - self.config.getWithDefault("Aufs","Enabled", False)): |
| 4130 | - logging.debug("taking aufs overlay into space calculation") |
| 4131 | - aufs_rw_dir = self.config.get("Aufs","RWDir") |
| 4132 | - # if we use the aufs rw overlay all the space is consumed |
| 4133 | - # the overlay dir |
| 4134 | - for pkg in self: |
| 4135 | - if pkg.marked_upgrade or pkg.marked_install: |
| 4136 | - required_for_aufs += pkg.candidate.installed_size |
| 4137 | - |
| 4138 | - # add old size of the package if we use snapshots |
| 4139 | - required_for_snapshots = 0.0 |
| 4140 | - if snapshots_in_use: |
| 4141 | - for pkg in self: |
| 4142 | - if (pkg.is_installed and |
| 4143 | - (pkg.marked_upgrade or pkg.marked_delete)): |
| 4144 | - required_for_snapshots += pkg.installed.installed_size |
| 4145 | - logging.debug("additional space for the snapshots: %s" % required_for_snapshots) |
| 4146 | - |
| 4147 | - # sum up space requirements |
| 4148 | - for (dir, size) in [(archivedir, self.required_download), |
| 4149 | - # plus 50M safety buffer in /usr |
| 4150 | - ("/usr", self.additional_required_space), |
| 4151 | - ("/usr", 50*1024*1024), |
| 4152 | - ("/boot", space_in_boot), |
| 4153 | - ("/tmp", 5*1024*1024), # /tmp for dkms LP: #427035 |
| 4154 | - ("/", 10*1024*1024), # small safety buffer / |
| 4155 | - (aufs_rw_dir, required_for_aufs), |
| 4156 | - # if snapshots are in use |
| 4157 | - ("/usr", required_for_snapshots), |
| 4158 | - ]: |
| 4159 | - dir = os.path.realpath(dir) |
| 4160 | - logging.debug("dir '%s' needs '%s' of '%s' (%f)" % (dir, size, fs_free[dir], fs_free[dir].free)) |
| 4161 | - fs_free[dir].free -= size |
| 4162 | - fs_free[dir].need += size |
| 4163 | - |
| 4164 | - |
| 4165 | - # check for space required violations |
| 4166 | - required_list = {} |
| 4167 | - for dir in fs_free: |
| 4168 | - if fs_free[dir].free < 0: |
| 4169 | - free_at_least = apt_pkg.size_to_str(float(abs(fs_free[dir].free)+1)) |
| 4170 | - # make_fs_id ensures we only get stuff on the same |
| 4171 | - # mountpoint, so we report the requirements only once |
| 4172 | - # per mountpoint |
| 4173 | - required_list[make_fs_id(dir)] = FreeSpaceRequired(apt_pkg.size_to_str(fs_free[dir].need), make_fs_id(dir), free_at_least) |
| 4174 | - # raise exception if free space check fails |
| 4175 | - if len(required_list) > 0: |
| 4176 | - logging.error("Not enough free space: %s" % [str(i) for i in required_list]) |
| 4177 | - raise NotEnoughFreeSpaceError(list(required_list.values())) |
| 4178 | - return True |
| 4179 | - |
| 4180 | - |
| 4181 | - |
| 4182 | -if __name__ == "__main__": |
| 4183 | - import sys |
| 4184 | - from .DistUpgradeConfigParser import DistUpgradeConfig |
| 4185 | - from .DistUpgradeView import DistUpgradeView |
| 4186 | - print("foo") |
| 4187 | - c = MyCache(DistUpgradeConfig("."), DistUpgradeView(), None) |
| 4188 | - #c.checkForNvidia() |
| 4189 | - #print(c._identifyObsoleteKernels()) |
| 4190 | - print(c.checkFreeSpace()) |
| 4191 | - sys.exit() |
| 4192 | - |
| 4193 | - c.clear() |
| 4194 | - c.create_snapshot() |
| 4195 | - c.installedTasks |
| 4196 | - c.installTasks(["ubuntu-desktop"]) |
| 4197 | - print(c.get_changes()) |
| 4198 | - c.restore_snapshot() |
| 4199 | |
| 4200 | === removed file 'DistUpgrade/DistUpgradeConfigParser.py' |
| 4201 | --- DistUpgrade/DistUpgradeConfigParser.py 2012-06-11 10:46:56 +0000 |
| 4202 | +++ DistUpgrade/DistUpgradeConfigParser.py 1970-01-01 00:00:00 +0000 |
| 4203 | @@ -1,85 +0,0 @@ |
| 4204 | -from __future__ import print_function |
| 4205 | - |
| 4206 | -import sys |
| 4207 | -try: |
| 4208 | - # >= 3.0 |
| 4209 | - from configparser import NoOptionError, NoSectionError |
| 4210 | - if sys.version >= '3.2': |
| 4211 | - from configparser import ConfigParser as SafeConfigParser |
| 4212 | - else: |
| 4213 | - from configparser import SafeConfigParser |
| 4214 | -except ImportError: |
| 4215 | - # < 3.0 |
| 4216 | - from ConfigParser import SafeConfigParser, NoOptionError, NoSectionError |
| 4217 | -import subprocess |
| 4218 | -import os.path |
| 4219 | -import logging |
| 4220 | -import glob |
| 4221 | - |
| 4222 | -CONFIG_OVERRIDE_DIR = "/etc/update-manager/release-upgrades.d" |
| 4223 | - |
| 4224 | -class DistUpgradeConfig(SafeConfigParser): |
| 4225 | - def __init__(self, datadir, name="DistUpgrade.cfg", |
| 4226 | - override_dir=None, defaults_dir=None): |
| 4227 | - SafeConfigParser.__init__(self) |
| 4228 | - # we support a config overwrite, if DistUpgrade.cfg.dapper exists |
| 4229 | - # and the user runs dapper, that one will be used |
| 4230 | - from_release = subprocess.Popen(["lsb_release","-c","-s"], |
| 4231 | - stdout=subprocess.PIPE, |
| 4232 | - universal_newlines=True).communicate()[0].strip() |
| 4233 | - self.datadir=datadir |
| 4234 | - if os.path.exists(name+"."+from_release): |
| 4235 | - name = name+"."+from_release |
| 4236 | - maincfg = os.path.join(datadir,name) |
| 4237 | - # defaults are read first |
| 4238 | - self.config_files = [] |
| 4239 | - if defaults_dir: |
| 4240 | - for cfg in glob.glob(defaults_dir+"/*.cfg"): |
| 4241 | - self.config_files.append(cfg) |
| 4242 | - # our config file |
| 4243 | - self.config_files += [maincfg] |
| 4244 | - # overrides are read later |
| 4245 | - if override_dir is None: |
| 4246 | - override_dir = CONFIG_OVERRIDE_DIR |
| 4247 | - if override_dir is not None: |
| 4248 | - for cfg in glob.glob(override_dir+"/*.cfg"): |
| 4249 | - self.config_files.append(cfg) |
| 4250 | - self.read(self.config_files) |
| 4251 | - def getWithDefault(self, section, option, default): |
| 4252 | - try: |
| 4253 | - if type(default) == bool: |
| 4254 | - return self.getboolean(section, option) |
| 4255 | - elif type(default) == float: |
| 4256 | - return self.getfloat(section, option) |
| 4257 | - elif type(default) == int: |
| 4258 | - return self.getint(section, option) |
| 4259 | - return self.get(section, option) |
| 4260 | - except (NoSectionError, NoOptionError): |
| 4261 | - return default |
| 4262 | - def getlist(self, section, option): |
| 4263 | - try: |
| 4264 | - tmp = self.get(section, option) |
| 4265 | - except (NoSectionError,NoOptionError): |
| 4266 | - return [] |
| 4267 | - items = [x.strip() for x in tmp.split(",")] |
| 4268 | - return items |
| 4269 | - def getListFromFile(self, section, option): |
| 4270 | - try: |
| 4271 | - filename = self.get(section, option) |
| 4272 | - except NoOptionError: |
| 4273 | - return [] |
| 4274 | - p = os.path.join(self.datadir,filename) |
| 4275 | - if not os.path.exists(p): |
| 4276 | - logging.error("getListFromFile: no '%s' found" % p) |
| 4277 | - items = [x.strip() for x in open(p)] |
| 4278 | - return [s for s in items if not s.startswith("#") and not s == ""] |
| 4279 | - |
| 4280 | - |
| 4281 | -if __name__ == "__main__": |
| 4282 | - c = DistUpgradeConfig(".") |
| 4283 | - print(c.getlist("Distro","MetaPkgs")) |
| 4284 | - print(c.getlist("Distro","ForcedPurges")) |
| 4285 | - print(c.getListFromFile("Sources","ValidMirrors")) |
| 4286 | - print(c.getWithDefault("Distro","EnableApport", True)) |
| 4287 | - print(c.set("Distro","Foo", "False")) |
| 4288 | - print(c.getWithDefault("Distro","Foo", True)) |
| 4289 | |
| 4290 | === removed file 'DistUpgrade/DistUpgradeController.py' |
| 4291 | --- DistUpgrade/DistUpgradeController.py 2012-06-11 12:09:52 +0000 |
| 4292 | +++ DistUpgrade/DistUpgradeController.py 1970-01-01 00:00:00 +0000 |
| 4293 | @@ -1,1793 +0,0 @@ |
| 4294 | -# DistUpgradeController.py |
| 4295 | -# |
| 4296 | -# Copyright (c) 2004-2008 Canonical |
| 4297 | -# |
| 4298 | -# Author: Michael Vogt <michael.vogt@ubuntu.com> |
| 4299 | -# |
| 4300 | -# This program is free software; you can redistribute it and/or |
| 4301 | -# modify it under the terms of the GNU General Public License as |
| 4302 | -# published by the Free Software Foundation; either version 2 of the |
| 4303 | -# License, or (at your option) any later version. |
| 4304 | -# |
| 4305 | -# This program is distributed in the hope that it will be useful, |
| 4306 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 4307 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 4308 | -# GNU General Public License for more details. |
| 4309 | -# |
| 4310 | -# You should have received a copy of the GNU General Public License |
| 4311 | -# along with this program; if not, write to the Free Software |
| 4312 | -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
| 4313 | -# USA |
| 4314 | - |
| 4315 | - |
| 4316 | -from __future__ import absolute_import, print_function |
| 4317 | - |
| 4318 | -import warnings |
| 4319 | -warnings.filterwarnings("ignore", "apt API not stable yet", FutureWarning) |
| 4320 | -import apt |
| 4321 | -import apt_pkg |
| 4322 | -import sys |
| 4323 | -import os |
| 4324 | -import subprocess |
| 4325 | -import locale |
| 4326 | -import logging |
| 4327 | -import shutil |
| 4328 | -import glob |
| 4329 | -import time |
| 4330 | -import copy |
| 4331 | -try: |
| 4332 | - # >= 3.0 |
| 4333 | - from configparser import NoOptionError |
| 4334 | - if sys.version >= '3.2': |
| 4335 | - from configparser import ConfigParser as SafeConfigParser |
| 4336 | - else: |
| 4337 | - from configparser import SafeConfigParser |
| 4338 | -except ImportError: |
| 4339 | - # < 3.0 |
| 4340 | - from ConfigParser import SafeConfigParser, NoOptionError |
| 4341 | -from .utils import (country_mirror, |
| 4342 | - url_downloadable, |
| 4343 | - check_and_fix_xbit, |
| 4344 | - get_arch, |
| 4345 | - iptables_active, |
| 4346 | - inside_chroot, |
| 4347 | - get_string_with_no_auth_from_source_entry, |
| 4348 | - is_child_of_process_name) |
| 4349 | -from string import Template |
| 4350 | -try: |
| 4351 | - from urllib.parse import urlsplit |
| 4352 | -except ImportError: |
| 4353 | - from urlparse import urlsplit |
| 4354 | - |
| 4355 | -from .DistUpgradeView import STEP_PREPARE, STEP_MODIFY_SOURCES, STEP_FETCH, STEP_INSTALL, STEP_CLEANUP, STEP_REBOOT |
| 4356 | -from .DistUpgradeCache import MyCache |
| 4357 | -from .DistUpgradeConfigParser import DistUpgradeConfig |
| 4358 | -from .DistUpgradeQuirks import DistUpgradeQuirks |
| 4359 | -from .DistUpgradeAptCdrom import AptCdrom |
| 4360 | -from .DistUpgradeAufs import setupAufs, aufsOptionsAndEnvironmentSetup |
| 4361 | - |
| 4362 | -# workaround broken relative import in python-apt (LP: #871007), we |
| 4363 | -# want the local version of distinfo.py from oneiric, but because of |
| 4364 | -# a bug in python-apt we will get the natty version that does not |
| 4365 | -# know about "Component.parent_component" leading to a crash |
| 4366 | -from . import distinfo |
| 4367 | -from . import sourceslist |
| 4368 | -sourceslist.DistInfo = distinfo.DistInfo |
| 4369 | - |
| 4370 | -from .sourceslist import SourcesList, is_mirror |
| 4371 | -from .distro import get_distro, NoDistroTemplateException |
| 4372 | - |
| 4373 | -from .DistUpgradeGettext import gettext as _ |
| 4374 | -from .DistUpgradeGettext import ngettext |
| 4375 | -import gettext |
| 4376 | - |
| 4377 | -from .DistUpgradeCache import (CacheExceptionDpkgInterrupted, |
| 4378 | - CacheExceptionLockingFailed, |
| 4379 | - NotEnoughFreeSpaceError) |
| 4380 | -from .DistUpgradeApport import run_apport |
| 4381 | - |
| 4382 | -REBOOT_REQUIRED_FILE = "/var/run/reboot-required" |
| 4383 | - |
| 4384 | -class NoBackportsFoundException(Exception): |
| 4385 | - pass |
| 4386 | - |
| 4387 | - |
| 4388 | -class DistUpgradeController(object): |
| 4389 | - """ this is the controller that does most of the work """ |
| 4390 | - |
| 4391 | - def __init__(self, distUpgradeView, options=None, datadir=None): |
| 4392 | - # setup the paths |
| 4393 | - localedir = "/usr/share/locale/" |
| 4394 | - if datadir == None: |
| 4395 | - datadir = os.getcwd() |
| 4396 | - localedir = os.path.join(datadir,"mo") |
| 4397 | - self.datadir = datadir |
| 4398 | - self.options = options |
| 4399 | - |
| 4400 | - # init gettext |
| 4401 | - gettext.bindtextdomain("update-manager",localedir) |
| 4402 | - gettext.textdomain("update-manager") |
| 4403 | - |
| 4404 | - # setup the view |
| 4405 | - logging.debug("Using '%s' view" % distUpgradeView.__class__.__name__) |
| 4406 | - self._view = distUpgradeView |
| 4407 | - self._view.updateStatus(_("Reading cache")) |
| 4408 | - self.cache = None |
| 4409 | - |
| 4410 | - if not self.options or self.options.withNetwork == None: |
| 4411 | - self.useNetwork = True |
| 4412 | - else: |
| 4413 | - self.useNetwork = self.options.withNetwork |
| 4414 | - if options: |
| 4415 | - cdrompath = options.cdromPath |
| 4416 | - else: |
| 4417 | - cdrompath = None |
| 4418 | - self.aptcdrom = AptCdrom(distUpgradeView, cdrompath) |
| 4419 | - |
| 4420 | - # the configuration |
| 4421 | - self.config = DistUpgradeConfig(datadir) |
| 4422 | - self.sources_backup_ext = "."+self.config.get("Files","BackupExt") |
| 4423 | - |
| 4424 | - # move some of the options stuff into the self.config, |
| 4425 | - # ConfigParser deals only with strings it seems *sigh* |
| 4426 | - self.config.add_section("Options") |
| 4427 | - self.config.set("Options","withNetwork", str(self.useNetwork)) |
| 4428 | - |
| 4429 | - # aufs stuff |
| 4430 | - aufsOptionsAndEnvironmentSetup(self.options, self.config) |
| 4431 | - |
| 4432 | - # some constants here |
| 4433 | - self.fromDist = self.config.get("Sources","From") |
| 4434 | - self.toDist = self.config.get("Sources","To") |
| 4435 | - self.origin = self.config.get("Sources","ValidOrigin") |
| 4436 | - self.arch = get_arch() |
| 4437 | - |
| 4438 | - # we run with --force-overwrite by default |
| 4439 | - if "RELEASE_UPGRADE_NO_FORCE_OVERWRITE" not in os.environ: |
| 4440 | - logging.debug("enable dpkg --force-overwrite") |
| 4441 | - apt_pkg.config.set("DPkg::Options::","--force-overwrite") |
| 4442 | - |
| 4443 | - # we run in full upgrade mode by default |
| 4444 | - self._partialUpgrade = False |
| 4445 | - |
| 4446 | - # install the quirks handler |
| 4447 | - self.quirks = DistUpgradeQuirks(self, self.config) |
| 4448 | - |
| 4449 | - # setup env var |
| 4450 | - os.environ["RELEASE_UPGRADE_IN_PROGRESS"] = "1" |
| 4451 | - os.environ["PYCENTRAL_FORCE_OVERWRITE"] = "1" |
| 4452 | - os.environ["PATH"] = "%s:%s" % (os.getcwd()+"/imported", |
| 4453 | - os.environ["PATH"]) |
| 4454 | - check_and_fix_xbit("./imported/invoke-rc.d") |
| 4455 | - |
| 4456 | - # set max retries |
| 4457 | - maxRetries = self.config.getint("Network","MaxRetries") |
| 4458 | - apt_pkg.config.set("Acquire::Retries", str(maxRetries)) |
| 4459 | - # max sizes for dpkgpm for large installs (see linux/limits.h and |
| 4460 | - # linux/binfmts.h) |
| 4461 | - apt_pkg.config.set("Dpkg::MaxArgs", str(64*1024)) |
| 4462 | - apt_pkg.config.set("Dpkg::MaxArgBytes", str(128*1024)) |
| 4463 | - |
| 4464 | - # smaller to avoid hangs |
| 4465 | - apt_pkg.config.set("Acquire::http::Timeout","20") |
| 4466 | - apt_pkg.config.set("Acquire::ftp::Timeout","20") |
| 4467 | - |
| 4468 | - # no list cleanup here otherwise a "cancel" in the upgrade |
| 4469 | - # will not restore the full state (lists will be missing) |
| 4470 | - apt_pkg.config.set("Apt::Get::List-Cleanup", "false") |
| 4471 | - |
| 4472 | - # forced obsoletes |
| 4473 | - self.forced_obsoletes = self.config.getlist("Distro","ForcedObsoletes") |
| 4474 | - # list of valid mirrors that we can add |
| 4475 | - self.valid_mirrors = self.config.getListFromFile("Sources","ValidMirrors") |
| 4476 | - # third party mirrors |
| 4477 | - self.valid_3p_mirrors = [] |
| 4478 | - if self.config.has_section('ThirdPartyMirrors'): |
| 4479 | - self.valid_3p_mirrors = [pair[1] for pair in |
| 4480 | - self.config.items('ThirdPartyMirrors')] |
| 4481 | - # debugging |
| 4482 | - #apt_pkg.config.set("DPkg::Options::","--debug=0077") |
| 4483 | - |
| 4484 | - # apt cron job |
| 4485 | - self._aptCronJobPerms = 0o755 |
| 4486 | - |
| 4487 | - def openCache(self, lock=True): |
| 4488 | - logging.debug("openCache()") |
| 4489 | - if self.cache is None: |
| 4490 | - self.quirks.run("PreCacheOpen") |
| 4491 | - else: |
| 4492 | - self.cache.release_lock() |
| 4493 | - self.cache.unlock_lists_dir() |
| 4494 | - try: |
| 4495 | - self.cache = MyCache(self.config, |
| 4496 | - self._view, |
| 4497 | - self.quirks, |
| 4498 | - self._view.getOpCacheProgress(), |
| 4499 | - lock) |
| 4500 | - # alias name for the plugin interface code |
| 4501 | - self.apt_cache = self.cache |
| 4502 | - # if we get a dpkg error that it was interrupted, just |
| 4503 | - # run dpkg --configure -a |
| 4504 | - except CacheExceptionDpkgInterrupted as e: |
| 4505 | - logging.warning("dpkg interrupted, calling dpkg --configure -a") |
| 4506 | - cmd = ["/usr/bin/dpkg","--configure","-a"] |
| 4507 | - if os.environ.get("DEBIAN_FRONTEND") == "noninteractive": |
| 4508 | - cmd.append("--force-confold") |
| 4509 | - self._view.getTerminal().call(cmd) |
| 4510 | - self.cache = MyCache(self.config, |
| 4511 | - self._view, |
| 4512 | - self.quirks, |
| 4513 | - self._view.getOpCacheProgress()) |
| 4514 | - except CacheExceptionLockingFailed as e: |
| 4515 | - logging.error("Cache can not be locked (%s)" % e) |
| 4516 | - self._view.error(_("Unable to get exclusive lock"), |
| 4517 | - _("This usually means that another " |
| 4518 | - "package management application " |
| 4519 | - "(like apt-get or aptitude) " |
| 4520 | - "already running. Please close that " |
| 4521 | - "application first.")); |
| 4522 | - sys.exit(1) |
| 4523 | - self.cache.partialUpgrade = self._partialUpgrade |
| 4524 | - logging.debug("/openCache(), new cache size %i" % len(self.cache)) |
| 4525 | - |
| 4526 | - def _viewSupportsSSH(self): |
| 4527 | - """ |
| 4528 | - Returns True if this view support upgrades over ssh. |
| 4529 | - In theory all views should support it, but for savety |
| 4530 | - we do only allow text ssh upgrades (see LP: #322482) |
| 4531 | - """ |
| 4532 | - supported = self.config.getlist("View","SupportSSH") |
| 4533 | - if self._view.__class__.__name__ in supported: |
| 4534 | - return True |
| 4535 | - return False |
| 4536 | - |
| 4537 | - def _sshMagic(self): |
| 4538 | - """ this will check for server mode and if we run over ssh. |
| 4539 | - if this is the case, we will ask and spawn a additional |
| 4540 | - daemon (to be sure we have a spare one around in case |
| 4541 | - of trouble) |
| 4542 | - """ |
| 4543 | - pidfile = os.path.join("/var/run/release-upgrader-sshd.pid") |
| 4544 | - if (not os.path.exists(pidfile) and |
| 4545 | - os.path.isdir("/proc") and |
| 4546 | - is_child_of_process_name("sshd")): |
| 4547 | - # check if the frontend supports ssh upgrades (see lp: #322482) |
| 4548 | - if not self._viewSupportsSSH(): |
| 4549 | - logging.error("upgrade over ssh not alllowed") |
| 4550 | - self._view.error(_("Upgrading over remote connection not supported"), |
| 4551 | - _("You are running the upgrade over a " |
| 4552 | - "remote ssh connection with a frontend " |
| 4553 | - "that does " |
| 4554 | - "not support this. Please try a text " |
| 4555 | - "mode upgrade with 'do-release-upgrade'." |
| 4556 | - "\n\n" |
| 4557 | - "The upgrade will " |
| 4558 | - "abort now. Please try without ssh.") |
| 4559 | - ) |
| 4560 | - sys.exit(1) |
| 4561 | - return False |
| 4562 | - # ask for a spare one to start (and below 1024) |
| 4563 | - port = 1022 |
| 4564 | - res = self._view.askYesNoQuestion( |
| 4565 | - _("Continue running under SSH?"), |
| 4566 | - _("This session appears to be running under ssh. " |
| 4567 | - "It is not recommended to perform a upgrade " |
| 4568 | - "over ssh currently because in case of failure " |
| 4569 | - "it is harder to recover.\n\n" |
| 4570 | - "If you continue, an additional ssh daemon will be " |
| 4571 | - "started at port '%s'.\n" |
| 4572 | - "Do you want to continue?") % port) |
| 4573 | - # abort |
| 4574 | - if res == False: |
| 4575 | - sys.exit(1) |
| 4576 | - res = subprocess.call(["/usr/sbin/sshd", |
| 4577 | - "-o", "PidFile=%s" % pidfile, |
| 4578 | - "-p",str(port)]) |
| 4579 | - if res == 0: |
| 4580 | - summary = _("Starting additional sshd") |
| 4581 | - descr = _("To make recovery in case of failure easier, an " |
| 4582 | - "additional sshd will be started on port '%s'. " |
| 4583 | - "If anything goes wrong with the running ssh " |
| 4584 | - "you can still connect to the additional one.\n" |
| 4585 | - ) % port |
| 4586 | - if iptables_active(): |
| 4587 | - cmd = "iptables -I INPUT -p tcp --dport %s -j ACCEPT" % port |
| 4588 | - descr += _( |
| 4589 | - "If you run a firewall, you may need to " |
| 4590 | - "temporarily open this port. As this is " |
| 4591 | - "potentially dangerous it's not done automatically. " |
| 4592 | - "You can open the port with e.g.:\n'%s'") % cmd |
| 4593 | - self._view.information(summary, descr) |
| 4594 | - return True |
| 4595 | - |
| 4596 | - def _tryUpdateSelf(self): |
| 4597 | - """ this is a helper that is run if we are started from a CD |
| 4598 | - and we have network - we will then try to fetch a update |
| 4599 | - of ourself |
| 4600 | - """ |
| 4601 | - from .MetaRelease import MetaReleaseCore |
| 4602 | - from .DistUpgradeFetcherSelf import DistUpgradeFetcherSelf |
| 4603 | - # check if we run from a LTS |
| 4604 | - forceLTS=False |
| 4605 | - if (self.release == "dapper" or |
| 4606 | - self.release == "hardy" or |
| 4607 | - self.release == "lucid" or |
| 4608 | - self.release == "precise"): |
| 4609 | - forceLTS=True |
| 4610 | - m = MetaReleaseCore(useDevelopmentRelease=False, |
| 4611 | - forceLTS=forceLTS) |
| 4612 | - # this will timeout eventually |
| 4613 | - while m.downloading: |
| 4614 | - self._view.processEvents() |
| 4615 | - time.sleep(0.1) |
| 4616 | - if m.new_dist is None: |
| 4617 | - logging.error("No new dist found") |
| 4618 | - return False |
| 4619 | - # we have a new dist |
| 4620 | - progress = self._view.getAcquireProgress() |
| 4621 | - fetcher = DistUpgradeFetcherSelf(new_dist=m.new_dist, |
| 4622 | - progress=progress, |
| 4623 | - options=self.options, |
| 4624 | - view=self._view) |
| 4625 | - fetcher.run() |
| 4626 | - |
| 4627 | - def _pythonSymlinkCheck(self): |
| 4628 | - """ sanity check that /usr/bin/python points to the default |
| 4629 | - python version. Users tend to modify this symlink, which |
| 4630 | - breaks stuff in obscure ways (Ubuntu #75557). |
| 4631 | - """ |
| 4632 | - logging.debug("_pythonSymlinkCheck run") |
| 4633 | - if os.path.exists('/usr/share/python/debian_defaults'): |
| 4634 | - config = SafeConfigParser() |
| 4635 | - config.readfp(open('/usr/share/python/debian_defaults')) |
| 4636 | - try: |
| 4637 | - expected_default = config.get('DEFAULT', 'default-version') |
| 4638 | - except NoOptionError: |
| 4639 | - logging.debug("no default version for python found in '%s'" % config) |
| 4640 | - return False |
| 4641 | - try: |
| 4642 | - fs_default_version = os.readlink('/usr/bin/python') |
| 4643 | - except OSError as e: |
| 4644 | - logging.error("os.readlink failed (%s)" % e) |
| 4645 | - return False |
| 4646 | - if not fs_default_version in (expected_default, os.path.join('/usr/bin', expected_default)): |
| 4647 | - logging.debug("python symlink points to: '%s', but expected is '%s' or '%s'" % (fs_default_version, expected_default, os.path.join('/usr/bin', expected_default))) |
| 4648 | - return False |
| 4649 | - return True |
| 4650 | - |
| 4651 | - |
| 4652 | - def prepare(self): |
| 4653 | - """ initial cache opening, sanity checking, network checking """ |
| 4654 | - # first check if that is a good upgrade |
| 4655 | - self.release = release = subprocess.Popen(["lsb_release","-c","-s"], |
| 4656 | - stdout=subprocess.PIPE, |
| 4657 | - universal_newlines=True).communicate()[0].strip() |
| 4658 | - logging.debug("lsb-release: '%s'" % release) |
| 4659 | - if not (release == self.fromDist or release == self.toDist): |
| 4660 | - logging.error("Bad upgrade: '%s' != '%s' " % (release, self.fromDist)) |
| 4661 | - self._view.error(_("Can not upgrade"), |
| 4662 | - _("An upgrade from '%s' to '%s' is not " |
| 4663 | - "supported with this tool." % (release, self.toDist))) |
| 4664 | - sys.exit(1) |
| 4665 | - |
| 4666 | - # setup aufs |
| 4667 | - if self.config.getWithDefault("Aufs", "EnableFullOverlay", False): |
| 4668 | - aufs_rw_dir = self.config.get("Aufs","RWDir") |
| 4669 | - if not setupAufs(aufs_rw_dir): |
| 4670 | - logging.error("aufs setup failed") |
| 4671 | - self._view.error(_("Sandbox setup failed"), |
| 4672 | - _("It was not possible to create the sandbox " |
| 4673 | - "environment.")) |
| 4674 | - return False |
| 4675 | - |
| 4676 | - # all good, tell the user about the sandbox mode |
| 4677 | - logging.info("running in aufs overlay mode") |
| 4678 | - self._view.information(_("Sandbox mode"), |
| 4679 | - _("This upgrade is running in sandbox " |
| 4680 | - "(test) mode. All changes are written " |
| 4681 | - "to '%s' and will be lost on the next " |
| 4682 | - "reboot.\n\n" |
| 4683 | - "*No* changes written to a system directory " |
| 4684 | - "from now until the next reboot are " |
| 4685 | - "permanent.") % aufs_rw_dir) |
| 4686 | - |
| 4687 | - # setup backports (if we have them) |
| 4688 | - if self.options and self.options.havePrerequists: |
| 4689 | - backportsdir = os.getcwd()+"/backports" |
| 4690 | - logging.info("using backports in '%s' " % backportsdir) |
| 4691 | - logging.debug("have: %s" % glob.glob(backportsdir+"/*.udeb")) |
| 4692 | - if os.path.exists(backportsdir+"/usr/bin/dpkg"): |
| 4693 | - apt_pkg.config.set("Dir::Bin::dpkg",backportsdir+"/usr/bin/dpkg"); |
| 4694 | - if os.path.exists(backportsdir+"/usr/lib/apt/methods"): |
| 4695 | - apt_pkg.config.set("Dir::Bin::methods",backportsdir+"/usr/lib/apt/methods") |
| 4696 | - conf = backportsdir+"/etc/apt/apt.conf.d/01ubuntu" |
| 4697 | - if os.path.exists(conf): |
| 4698 | - logging.debug("adding config '%s'" % conf) |
| 4699 | - apt_pkg.read_config_file(apt_pkg.config, conf) |
| 4700 | - |
| 4701 | - # do the ssh check and warn if we run under ssh |
| 4702 | - self._sshMagic() |
| 4703 | - # check python version |
| 4704 | - if not self._pythonSymlinkCheck(): |
| 4705 | - logging.error("pythonSymlinkCheck() failed, aborting") |
| 4706 | - self._view.error(_("Can not upgrade"), |
| 4707 | - _("Your python install is corrupted. " |
| 4708 | - "Please fix the '/usr/bin/python' symlink.")) |
| 4709 | - sys.exit(1) |
| 4710 | - # open cache |
| 4711 | - try: |
| 4712 | - self.openCache() |
| 4713 | - except SystemError as e: |
| 4714 | - logging.error("openCache() failed: '%s'" % e) |
| 4715 | - return False |
| 4716 | - if not self.cache.sanity_check(self._view): |
| 4717 | - return False |
| 4718 | - |
| 4719 | - # now figure out if we need to go into desktop or |
| 4720 | - # server mode - we use a heuristic for this |
| 4721 | - self.serverMode = self.cache.need_server_mode() |
| 4722 | - if self.serverMode: |
| 4723 | - os.environ["RELEASE_UPGRADE_MODE"] = "server" |
| 4724 | - else: |
| 4725 | - os.environ["RELEASE_UPGRADE_MODE"] = "desktop" |
| 4726 | - |
| 4727 | - if not self.checkViewDepends(): |
| 4728 | - logging.error("checkViewDepends() failed") |
| 4729 | - return False |
| 4730 | - |
| 4731 | - if os.path.exists("/usr/bin/debsig-verify"): |
| 4732 | - logging.error("debsig-verify is installed") |
| 4733 | - self._view.error(_("Package 'debsig-verify' is installed"), |
| 4734 | - _("The upgrade can not continue with that " |
| 4735 | - "package installed.\n" |
| 4736 | - "Please remove it with synaptic " |
| 4737 | - "or 'apt-get remove debsig-verify' first " |
| 4738 | - "and run the upgrade again.")) |
| 4739 | - self.abort() |
| 4740 | - |
| 4741 | - from .DistUpgradeMain import SYSTEM_DIRS |
| 4742 | - for systemdir in SYSTEM_DIRS: |
| 4743 | - if os.path.exists(systemdir) and not os.access(systemdir, os.W_OK): |
| 4744 | - logging.error("%s not writable" % systemdir) |
| 4745 | - self._view.error( |
| 4746 | - _("Can not write to '%s'") % systemdir, |
| 4747 | - _("Its not possible to write to the system directory " |
| 4748 | - "'%s' on your system. The upgrade can not " |
| 4749 | - "continue.\n" |
| 4750 | - "Please make sure that the system directory is " |
| 4751 | - "writable.") % systemdir) |
| 4752 | - self.abort() |
| 4753 | - |
| 4754 | - |
| 4755 | - # FIXME: we may try to find out a bit more about the network |
| 4756 | - # connection here and ask more intelligent questions |
| 4757 | - if self.aptcdrom and self.options and self.options.withNetwork == None: |
| 4758 | - res = self._view.askYesNoQuestion(_("Include latest updates from the Internet?"), |
| 4759 | - _("The upgrade system can use the internet to " |
| 4760 | - "automatically download " |
| 4761 | - "the latest updates and install them during the " |
| 4762 | - "upgrade. If you have a network connection this is " |
| 4763 | - "highly recommended.\n\n" |
| 4764 | - "The upgrade will take longer, but when " |
| 4765 | - "it is complete, your system will be fully up to " |
| 4766 | - "date. You can choose not to do this, but you " |
| 4767 | - "should install the latest updates soon after " |
| 4768 | - "upgrading.\n" |
| 4769 | - "If you answer 'no' here, the network is not " |
| 4770 | - "used at all."), |
| 4771 | - 'Yes') |
| 4772 | - self.useNetwork = res |
| 4773 | - self.config.set("Options","withNetwork", str(self.useNetwork)) |
| 4774 | - logging.debug("useNetwork: '%s' (selected by user)" % res) |
| 4775 | - if res: |
| 4776 | - self._tryUpdateSelf() |
| 4777 | - return True |
| 4778 | - |
| 4779 | - def _sourcesListEntryDownloadable(self, entry): |
| 4780 | - """ |
| 4781 | - helper that checks if a sources.list entry points to |
| 4782 | - something downloadable |
| 4783 | - """ |
| 4784 | - logging.debug("verifySourcesListEntry: %s" % entry) |
| 4785 | - # no way to verify without network |
| 4786 | - if not self.useNetwork: |
| 4787 | - logging.debug("skiping downloadable check (no network)") |
| 4788 | - return True |
| 4789 | - # check if the entry points to something we can download |
| 4790 | - uri = "%s/dists/%s/Release" % (entry.uri, entry.dist) |
| 4791 | - return url_downloadable(uri, logging.debug) |
| 4792 | - |
| 4793 | - def rewriteSourcesList(self, mirror_check=True): |
| 4794 | - logging.debug("rewriteSourcesList()") |
| 4795 | - |
| 4796 | - sync_components = self.config.getlist("Sources","Components") |
| 4797 | - |
| 4798 | - # skip mirror check if special environment is set |
| 4799 | - # (useful for server admins with internal repos) |
| 4800 | - if (self.config.getWithDefault("Sources","AllowThirdParty",False) or |
| 4801 | - "RELEASE_UPRADER_ALLOW_THIRD_PARTY" in os.environ): |
| 4802 | - logging.warning("mirror check skipped, *overriden* via config") |
| 4803 | - mirror_check=False |
| 4804 | - |
| 4805 | - # check if we need to enable main |
| 4806 | - if mirror_check == True and self.useNetwork: |
| 4807 | - # now check if the base-meta pkgs are available in |
| 4808 | - # the archive or only available as "now" |
| 4809 | - # -> if not that means that "main" is missing and we |
| 4810 | - # need to enable it |
| 4811 | - for pkgname in self.config.getlist("Distro","BaseMetaPkgs"): |
| 4812 | - if ((not pkgname in self.cache or |
| 4813 | - not self.cache[pkgname].candidate or |
| 4814 | - len(self.cache[pkgname].candidate.origins) == 0) |
| 4815 | - or |
| 4816 | - (self.cache[pkgname].candidate and |
| 4817 | - len(self.cache[pkgname].candidate.origins) == 1 and |
| 4818 | - self.cache[pkgname].candidate.origins[0].archive == "now") |
| 4819 | - ): |
| 4820 | - logging.debug("BaseMetaPkg '%s' has no candidate.origins" % pkgname) |
| 4821 | - try: |
| 4822 | - distro = get_distro() |
| 4823 | - distro.get_sources(self.sources) |
| 4824 | - distro.enable_component("main") |
| 4825 | - except NoDistroTemplateException: |
| 4826 | - # fallback if everything else does not work, |
| 4827 | - # we replace the sources.list with a single |
| 4828 | - # line to ubuntu-main |
| 4829 | - logging.warning('get_distro().enable_component("man") failed, overwriting sources.list instead as last resort') |
| 4830 | - s = "# auto generated by update-manager" |
| 4831 | - s += "deb http://archive.ubuntu.com/ubuntu %s main restricted" % self.toDist |
| 4832 | - s += "deb http://archive.ubuntu.com/ubuntu %s-updates main restricted" % self.toDist |
| 4833 | - s += "deb http://security.ubuntu.com/ubuntu %s-security main restricted" % self.toDist |
| 4834 | - open("/etc/apt/sources.list","w").write(s) |
| 4835 | - break |
| 4836 | - |
| 4837 | - # this must map, i.e. second in "from" must be the second in "to" |
| 4838 | - # (but they can be different, so in theory we could exchange |
| 4839 | - # component names here) |
| 4840 | - pockets = self.config.getlist("Sources","Pockets") |
| 4841 | - fromDists = [self.fromDist] + ["%s-%s" % (self.fromDist, x) |
| 4842 | - for x in pockets] |
| 4843 | - toDists = [self.toDist] + ["%s-%s" % (self.toDist,x) |
| 4844 | - for x in pockets] |
| 4845 | - self.sources_disabled = False |
| 4846 | - |
| 4847 | - # look over the stuff we have |
| 4848 | - foundToDist = False |
| 4849 | - # collect information on what components (main,universe) are enabled for what distro (sub)version |
| 4850 | - # e.g. found_components = { 'hardy':set("main","restricted"), 'hardy-updates':set("main") } |
| 4851 | - self.found_components = {} |
| 4852 | - for entry in self.sources.list[:]: |
| 4853 | - |
| 4854 | - # ignore invalid records or disabled ones |
| 4855 | - if entry.invalid or entry.disabled: |
| 4856 | - continue |
| 4857 | - |
| 4858 | - # we disable breezy cdrom sources to make sure that demoted |
| 4859 | - # packages are removed |
| 4860 | - if entry.uri.startswith("cdrom:") and entry.dist == self.fromDist: |
| 4861 | - logging.debug("disabled '%s' cdrom entry (dist == fromDist)" % entry) |
| 4862 | - entry.disabled = True |
| 4863 | - continue |
| 4864 | - # check if there is actually a lists file for them available |
| 4865 | - # and disable them if not |
| 4866 | - elif entry.uri.startswith("cdrom:"): |
| 4867 | - # |
| 4868 | - listdir = apt_pkg.config.find_dir("Dir::State::lists") |
| 4869 | - if not os.path.exists("%s/%s%s_%s_%s" % |
| 4870 | - (listdir, |
| 4871 | - apt_pkg.uri_to_filename(entry.uri), |
| 4872 | - "dists", |
| 4873 | - entry.dist, |
| 4874 | - "Release")): |
| 4875 | - logging.warning("disabling cdrom source '%s' because it has no Release file" % entry) |
| 4876 | - entry.disabled = True |
| 4877 | - continue |
| 4878 | - |
| 4879 | - # special case for archive.canonical.com that needs to |
| 4880 | - # be rewritten (for pre-gutsy upgrades) |
| 4881 | - cdist = "%s-commercial" % self.fromDist |
| 4882 | - if (not entry.disabled and |
| 4883 | - entry.uri.startswith("http://archive.canonical.com") and |
| 4884 | - entry.dist == cdist): |
| 4885 | - entry.dist = self.toDist |
| 4886 | - entry.comps = ["partner"] |
| 4887 | - logging.debug("transitioned commercial to '%s' " % entry) |
| 4888 | - continue |
| 4889 | - |
| 4890 | - # special case for landscape.canonical.com because they |
| 4891 | - # don't use a standard archive layout (gutsy->hardy) |
| 4892 | - if (not entry.disabled and |
| 4893 | - entry.uri.startswith("http://landscape.canonical.com/packages/%s" % self.fromDist)): |
| 4894 | - logging.debug("commenting landscape.canonical.com out") |
| 4895 | - entry.disabled = True |
| 4896 | - continue |
| 4897 | - |
| 4898 | - # handle upgrades from a EOL release and check if there |
| 4899 | - # is a supported release available |
| 4900 | - if (not entry.disabled and |
| 4901 | - "old-releases.ubuntu.com/" in entry.uri): |
| 4902 | - logging.debug("upgrade from old-releases.ubuntu.com detected") |
| 4903 | - # test country mirror first, then archive.u.c |
| 4904 | - for uri in ["http://%sarchive.ubuntu.com/ubuntu" % country_mirror(), |
| 4905 | - "http://archive.ubuntu.com/ubuntu"]: |
| 4906 | - test_entry = copy.copy(entry) |
| 4907 | - test_entry.uri = uri |
| 4908 | - test_entry.dist = self.toDist |
| 4909 | - if self._sourcesListEntryDownloadable(test_entry): |
| 4910 | - logging.info("transition from old-release.u.c to %s" % uri) |
| 4911 | - entry.uri = uri |
| 4912 | - break |
| 4913 | - |
| 4914 | - logging.debug("examining: '%s'" % get_string_with_no_auth_from_source_entry(entry)) |
| 4915 | - # check if it's a mirror (or official site) |
| 4916 | - validMirror = self.isMirror(entry.uri) |
| 4917 | - thirdPartyMirror = not mirror_check or self.isThirdPartyMirror(entry.uri) |
| 4918 | - if validMirror or thirdPartyMirror: |
| 4919 | - # disabled/security/commercial/extras are special cases |
| 4920 | - # we use validTo/foundToDist to figure out if we have a |
| 4921 | - # main archive mirror in the sources.list or if we |
| 4922 | - # need to add one |
| 4923 | - validTo = True |
| 4924 | - if (entry.disabled or |
| 4925 | - entry.type == "deb-src" or |
| 4926 | - "/security.ubuntu.com" in entry.uri or |
| 4927 | - "%s-security" % self.fromDist in entry.dist or |
| 4928 | - "/archive.canonical.com" in entry.uri or |
| 4929 | - "/extras.ubuntu.com" in entry.uri): |
| 4930 | - validTo = False |
| 4931 | - if entry.dist in toDists: |
| 4932 | - # so the self.sources.list is already set to the new |
| 4933 | - # distro |
| 4934 | - logging.debug("entry '%s' is already set to new dist" % get_string_with_no_auth_from_source_entry(entry)) |
| 4935 | - foundToDist |= validTo |
| 4936 | - elif entry.dist in fromDists: |
| 4937 | - foundToDist |= validTo |
| 4938 | - entry.dist = toDists[fromDists.index(entry.dist)] |
| 4939 | - logging.debug("entry '%s' updated to new dist" % get_string_with_no_auth_from_source_entry(entry)) |
| 4940 | - elif entry.type == 'deb-src': |
| 4941 | - continue |
| 4942 | - elif validMirror: |
| 4943 | - # disable all entries that are official but don't |
| 4944 | - # point to either "to" or "from" dist |
| 4945 | - entry.disabled = True |
| 4946 | - self.sources_disabled = True |
| 4947 | - logging.debug("entry '%s' was disabled (unknown dist)" % get_string_with_no_auth_from_source_entry(entry)) |
| 4948 | - |
| 4949 | - # if we make it to this point, we have a official or third-party mirror |
| 4950 | - |
| 4951 | - # check if the arch is powerpc or sparc and if so, transition |
| 4952 | - # to ports.ubuntu.com (powerpc got demoted in gutsy, sparc |
| 4953 | - # in hardy) |
| 4954 | - if (entry.type == "deb" and |
| 4955 | - not "ports.ubuntu.com" in entry.uri and |
| 4956 | - (self.arch == "powerpc" or self.arch == "sparc")): |
| 4957 | - logging.debug("moving %s source entry to 'ports.ubuntu.com' " % self.arch) |
| 4958 | - entry.uri = "http://ports.ubuntu.com/ubuntu-ports/" |
| 4959 | - |
| 4960 | - # gather what components are enabled and are inconsitent |
| 4961 | - for d in ["%s" % self.toDist, |
| 4962 | - "%s-updates" % self.toDist, |
| 4963 | - "%s-security" % self.toDist]: |
| 4964 | - # create entry if needed, ignore disabled |
| 4965 | - # entries and deb-src |
| 4966 | - self.found_components.setdefault(d,set()) |
| 4967 | - if (not entry.disabled and entry.dist == d and |
| 4968 | - entry.type == "deb"): |
| 4969 | - for comp in entry.comps: |
| 4970 | - # only sync components we know about |
| 4971 | - if not comp in sync_components: |
| 4972 | - continue |
| 4973 | - self.found_components[d].add(comp) |
| 4974 | - |
| 4975 | - else: |
| 4976 | - # disable anything that is not from a official mirror or a whitelisted third party |
| 4977 | - if entry.dist == self.fromDist: |
| 4978 | - entry.dist = self.toDist |
| 4979 | - entry.comment += " " + _("disabled on upgrade to %s") % self.toDist |
| 4980 | - entry.disabled = True |
| 4981 | - self.sources_disabled = True |
| 4982 | - logging.debug("entry '%s' was disabled (unknown mirror)" % get_string_with_no_auth_from_source_entry(entry)) |
| 4983 | - |
| 4984 | - # now go over the list again and check for missing components |
| 4985 | - # in $dist-updates and $dist-security and add them |
| 4986 | - for entry in self.sources.list[:]: |
| 4987 | - # skip all comps that are not relevant (including e.g. "hardy") |
| 4988 | - if (entry.invalid or entry.disabled or entry.type == "deb-src" or |
| 4989 | - entry.uri.startswith("cdrom:") or entry.dist == self.toDist): |
| 4990 | - continue |
| 4991 | - # now check for "$dist-updates" and "$dist-security" and add any inconsistencies |
| 4992 | - if entry.dist in self.found_components: |
| 4993 | - component_diff = self.found_components[self.toDist]-self.found_components[entry.dist] |
| 4994 | - if component_diff: |
| 4995 | - logging.info("fixing components inconsistency from '%s'" % get_string_with_no_auth_from_source_entry(entry)) |
| 4996 | - entry.comps.extend(list(component_diff)) |
| 4997 | - logging.info("to new entry '%s'" % get_string_with_no_auth_from_source_entry(entry)) |
| 4998 | - del self.found_components[entry.dist] |
| 4999 | - return foundToDist |
| 5000 | - |

The removal of the whole code seems fine to me and from my small testing, it seems you didn't forget to remove anything in the package.
I have a small dummy question though, debian/rules were already using dh --with python2 and you still use the same, even if you ship a python3 package? (python3- update- manager) . Do you know what's the plan for that?
Apart from that all, looks good. I'll let gary looking at the update- release- manager side :)