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