[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

How recover from aborted dist-upgrade Stable to Testing (due to apt-listbug bug 585448)



Hello, and a giant thank you to everyone working on the Debian system!
Seriously, Wikipedia shows Debian estimated to be worth about US$ 8 billion! :)
http://en.wikipedia.org/wiki/Debian

-++-----------------------------
-++ My conversation level.
I am fairly competent, with many things Linux-related.  I started with Slackware
way back in the early to mid 90's and worked my way through may different
distributions, custom kernel compiles, and custom program compiles.  My
Google-Fu is strong. :)

-++-----------------------------
-++ How stuff broke, background. (probably skippable)
I have been using Squeeze since shortly after it was released.  Occasionally, I
have pulled in a newer .deb from testing.  With fewer updates coming in
recently (stability, yay!), and me feeling the need to get more newer .debs for
various projects, I have been pondering moving to testing.  I recently acquired
a Wacom Bamboo CTH-460, which requires kernel drivers newer than those available
in Squeeze.  After considering a custom kernel compile, I decided to try to just
pull in a newer kernel from testing or unstable.  I could not find an official
2.6.38 or 2.6.39 kernel, so finally decided to go with 3.2.0.4 from backports.
The nvidia driver would not compile against it (stupidly whining that it
required at least a 2.6 kernel!).

-++-----------------------------
-++ How stuff actually broke.
After so much time wasted researching and feeling out different options, I
decided that it was finally time for me to switch to Wheezy (actually, testing).
I did aptitude update, aptitude upgrade, then converted my /etc/apt/sources.list
to use 'stable' instead of 'squeeze.'  Again aptitude update, aptitude upgrade.
I was clean.  I moved /etc/apt/preferences to preferences.bak.  Again, aptitude
update, aptitude upgrade shows clean.  I installed apt-listbugs SPECIFICALLY in
preparation for a cautious dist-upgrade.  I converted my /etc/apt/sources.list
to use 'testing' instead of 'stable,' and did aptitude update,
aptitude dist-upgrade.  (The following long lines are because I maximize my
terminal window to minimize scroll lines.  I have kept the entire text log, in
case it becomes useful.)

root@kiwi:/var/cache/apt$ aptitude dist-upgrade
The following NEW packages will be installed:
  accountsservice{a} acl{a} aisleriot{a} akonadi-backend-mysql{a} ant{a} ant-optional{a} aptitude-common{a} argyll{a} at-spi2-core{a} autopoint{a} browser-plugin-gnash{a} browser-plugin-vlc caribou{a} caribou-antler{a} chktex{a} chromium{a} chromium-inspector{a} chromium-l10n{a} 
[SNIP 71 lines]
  valgrind-dbg{a} vinagre{a} wavpack{a} wine-bin{a} wireless-regdb{a} xbrlapi{a} xfce4-notifyd{a} xfce4-volumed{a} xorg-sgml-doctools{a} xserver-xorg-video-dummy{a} xul-ext-adblock-plus{a} xulrunner-10.0{a} yelp-xsl{a} zeitgeist-core{a} zenity-common{a} 
The following packages will be REMOVED:
  alsa-oss{u} anthy-common{u} aptdaemon{u} aumix{u} aumix-common{u} bzrtools{u} capplets-data{u} chromium-browser-inspector{u} cl-asdf{u} common-lisp-controller{u} console-terminus{u} cpp-4.4-doc{u} deskbar-applet{u} dmz-cursor-theme{u} docbook-xsl-doc-html{u} ekiga{u} 
[SNIP 27 lines]
  texpower-manual{u} totem-coherence{u} totem-mozilla{u} ttf-lyx{u} ttf-malayalam-fonts{u} ttf-takao-gothic{u} ttf-takao-mincho{u} unattended-upgrades{u} update-manager-core{u} update-manager-gnome{u} update-notifier{u} x-ttcidfont-conf{u} xserver-xorg-video-nv{u} 
The following packages will be upgraded:
  3dchess ack-grep acpi acpi-support-base acpid adduser akonadi-server akregator alacarte alien alsa-base alsa-utils amor anacron analog anjuta anjuta-common antlr apache2 apache2-doc apache2-mpm-prefork apache2-threaded-dev apache2-utils apache2.2-bin apache2.2-common 
[SNIP 153 lines]
  xserver-xorg-video-tdfx xserver-xorg-video-trident xserver-xorg-video-tseng xserver-xorg-video-vesa xserver-xorg-video-vmware xserver-xorg-video-voodoo xsltproc xterm xtrans-dev xvfb xz-utils yelp zangband zangband-data zaz zaz-data zenity zip zlib1g zlib1g-dev zoo zsnes 
The following packages are RECOMMENDED but will NOT be installed:
  aptitude-doc-cs aptitude-doc-en aptitude-doc-es aptitude-doc-fi aptitude-doc-fr aptitude-doc-it aptitude-doc-ja gnupg-curl libatm1 python-pip uuid-runtime 
2821 packages upgraded, 1048 newly installed, 424 to remove and 1 not upgraded.
Need to get 4,742 MB of archives. After unpacking 2,330 MB will be used.
The following packages have unmet dependencies:
  libmetacity-private0a: Breaks: libmetacity-private0 but 1:2.30.1-3 is installed.
  libstdc++6: Breaks: gcc-4.3 (< 4.3.6-1) but 4.3.5-4 is installed.
  gstreamer0.10-plugins-ugly: Conflicts: gstreamer0.10-lame but 0.10.17-0.0 is installed.
  gcc-4.7-base: Breaks: gcj-4.4-base (< 4.4.6-9~) but 4.4.5-2 is installed.
  mysql-query-browser: Depends: libgtkhtml3.14-19 (< 3.31) but 3.32.2-2.1 is to be installed.
  libgfortran3: Breaks: gcc-4.3 (< 4.3.6-1) but 4.3.5-4 is installed.
  esound: Depends: esound-common (= 0.2.41-8) but 0.2.41-10 is to be installed.
  perl: Breaks: libio-compress-base-perl (< 2.033) but 2.024-1 is installed.
        Breaks: libio-compress-bzip2-perl (< 2.033) but 2.024-1 is installed.
        Breaks: libio-compress-zlib-perl (< 2.033) but 2.024-1 is installed.
  python-mlt2: Depends: python (< 2.7) but 2.7.3~rc2-1 is to be installed.
  phonon: Conflicts: phonon-backend-xine but 4:4.6.0really4.4.2-1 is installed.
  mysql-server-5.5: Breaks: mysql-client-5.1 but 5.1.66-0+squeeze1 is installed.
                    Breaks: mysql-server-5.1 but 5.1.66-0+squeeze1 is installed.
  perl-base: Conflicts: defoma (< 0.11.12) but 0.11.11 is installed.
  libgomp1: Breaks: gcc-4.3 (< 4.3.6-1) but 4.3.5-4 is installed.
  mysql-common: Breaks: mysql-client-5.1 (< 5.5) but 5.1.66-0+squeeze1 is installed.
                Breaks: mysql-server-5.1 (< 5.5) but 5.1.66-0+squeeze1 is installed.
                Breaks: mysql-server-core-5.1 (< 5.5) but 5.1.66-0+squeeze1 is installed.
  mysql-client-5.5: Breaks: mysql-client-5.1 but 5.1.66-0+squeeze1 is installed.
  pidgin-data: Breaks: pidgin-facebookchat (< 1.69-2) but 1.67.1-1 is installed.
  mysql-server-core-5.5: Breaks: mysql-client-5.1 but 5.1.66-0+squeeze1 is installed.
                         Breaks: mysql-server-5.0 which is a virtual package.
                         Breaks: mysql-server-5.1 but 5.1.66-0+squeeze1 is installed.
                         Breaks: mysql-server-core-5.1 but 5.1.66-0+squeeze1 is installed.
  libgcc1: Breaks: gcc-4.3 (< 4.3.6-1) but 4.3.5-4 is installed.
  python-compizconfig: Depends: python (< 2.7) but 2.7.3~rc2-1 is to be installed.
  libmoose-perl: Breaks: libclass-mop-perl but 1.04-1 is installed.
  libept1: Depends: libapt-pkg4.10 which is a virtual package.
  emacs23-common: Conflicts: eieio but 1:1.0pre4-3.1 is installed.
                  Conflicts: speedbar but 1:1.0pre4-3.1 is installed.
  gcc-4.4-base: Breaks: gcj-4.4-base (< 4.4.6-9~) but 4.4.5-2 is installed.
  wine: Conflicts: wine1.3 but 1.4-0ubuntu1~ppa1~lucid1 is installed.
  vlc-plugin-svgalib: Depends: vlc-nox (= 1.1.3-1squeeze6) but 2.0.3-4 is to be installed.
  glade-gnome: Depends: glade (= 3.6.7-1+b1) but 3.12.1-1 is to be installed.
  perl-modules: Conflicts: defoma (< 0.11.12) but 0.11.11 is installed.
                Breaks: libextutils-command-perl (< 1.17) but 1.16-1 is installed.
                Breaks: libextutils-install-perl (< 1.56) but 1.54-1 is installed.
                Breaks: libfile-path-perl (< 2.08.01) but 2.08-1 is installed.
  ure: Breaks: openoffice.org-core (< 1:3.3~) but 1:3.2.1-11+squeeze8 is installed.
  libatk-adaptor: Conflicts: at-spi but 1.32.0-2 is to be installed.
  phonon-backend-xine: Depends: libphonon4 (= 4:4.6.0really4.4.2-1) but 4:4.6.0.0-2 is to be installed.
  irssi-plugin-silc: Depends: perlapi-5.10.1 which is a virtual package.
  rpcbind: Conflicts: portmap but 6.0.0-2 is installed.
  libpackage-stash-perl: Breaks: libclass-mop-perl (< 1.09~) but 1.04-1 is installed.
  claws-mail-cache-saver: Depends: claws-mail (<= 3.7.7~) but 3.8.1-2 is to be installed.
  claws-mail-synce-plugin: Depends: claws-mail (<= 3.7.7~) but 3.8.1-2 is to be installed.
  libclass-mop-perl: Depends: perlapi-5.10.1 which is a virtual package.
  claws-mail-geolocation-plugin: Depends: claws-mail (<= 3.7.7~) but 3.8.1-2 is to be installed.
  gnome-panel: Breaks: libpanel-applet2-0 but 2.30.2-2 is installed.
  libvlccore4: Depends: vlc-data (= 1.1.3-1squeeze6) but 2.0.3-4 is to be installed.
  libmetacity-private0: Depends: metacity-common (< 1:2.31) but 1:2.34.3-3 is to be installed.
open: 899; closed: 2433; defer: 151; conflict: 200
The following actions will resolve these dependencies:

       Remove the following packages:                              
1)       akonadi-server                                            
2)       akregator                                                 
3)       amor                                                      
4)       apache2-threaded-dev                                      
5)       ark                                                       
[SNIP 184 lines]
190)     wine1.3                                                   

       Keep the following packages at their current version:       
191)     akonadi-backend-mysql [Not Installed]                     
192)     kajongg [Not Installed]                                   
193)     kde-baseapps [Not Installed]                              
194)     kde-baseapps-bin [Not Installed]                          
195)     kde-runtime [Not Installed]                               
196)     kde-style-oxygen [Not Installed]                          
197)     kde-workspace [Not Installed]                             
198)     kde-workspace-bin [Not Installed]                         
199)     klickety [Not Installed]                                  
200)     kmenuedit [Not Installed]                                 
201)     libkateinterfaces4 [Not Installed]                        
202)     libkonq-common [Not Installed]                            
203)     libkonq5abi1 [Not Installed]                              
204)     libmysqlclient18 [Not Installed]                          
205)     mysql-client-5.5 [Not Installed]                          
206)     mysql-server-5.5 [Not Installed]                          
207)     mysql-server-core-5.5 [Not Installed]                     
208)     ruby-kde4 [Not Installed]                                 
209)     ruby-phonon [Not Installed]                               
210)     ruby-plasma [Not Installed]                               

       Leave the following dependencies unresolved:                
211)     k3b recommends libk3b6-extracodecs                        
212)     konqueror recommends dolphin                              
213)     kdelibs5-plugins recommends kde-runtime                   
214)     kscreensaver-xsavers recommends kscreensaver (= 4:4.8.4-2)
215)     kdegames recommends kajongg (>= 4:4.8.4-3)                
216)     libkopete4 recommends kopete (= 4:4.8.4-1+b1)             
217)     plasma-widgets-addons recommends plasma-widget-lancelot   
218)     amor recommends kde-window-manager                        
219)     libmarblewidget13 recommends marble-plugins (= 4:4.8.4-3) 
220)     plasma-widget-networkmanagement recommends kwalletmanager 
221)     mysql-admin recommends mysql-query-browser                
222)     mysql-gui-tools-common recommends mysql-admin             
223)     e16 recommends esound                                     


Accept this solution? [Y/n/q/?] y  (Are you desperate enough to go this deep? y)
The following packages have unmet dependencies:
  libkonq5: Depends: phonon but it is not going to be installed.
The following actions will resolve these dependencies:

     Remove the following packages:              
1)     libkonq5                                  

     Leave the following dependencies unresolved:
2)     e16 recommends esound                     


Accept this solution? [Y/n/q/?] y
The following NEW packages will be installed:
  accountsservice{a} acl{a} aisleriot{a} ant{a} ant-optional{a} aptitude-common{a} argyll{a} at-spi2-core{a} autopoint{a} browser-plugin-gnash{a} browser-plugin-vlc caribou{a} caribou-antler{a} chktex{a} chromium{a} chromium-inspector{a} chromium-l10n{a} clamav{a} clamav-base{a} 
[SNIP 262 lines]
The following packages are RECOMMENDED but will NOT be installed:
  aptitude-doc-cs aptitude-doc-en aptitude-doc-es aptitude-doc-fi aptitude-doc-fr aptitude-doc-it aptitude-doc-ja gnupg-curl kde-runtime libatm1 python-pip uuid-runtime 
2566 packages upgraded, 954 newly installed, 760 to remove and 4 not upgraded.
Need to get 4,399 MB of archives. After unpacking 947 MB will be used.
Do you want to continue? [Y/n/?] y
Get:1 http://ftp.gtlib.gatech.edu/debian/ testing/main locales all 2.13-37 [5,713 kB]
[SNIP 3518 lines]
Get:3520 http://ftp.gtlib.gatech.edu/debian/ testing/main zaz i386 1.0.0~dfsg1-1 [258 kB]                                                                                                                                                                                                        
Fetched 4,399 MB in 58min 10s (1,260 kB/s)                                                                                                                                                                                                                                                       
Reading package fields... 28%/usr/lib/ruby/1.8/debian/utils.rb:47:in `pipe': Too many open files (Errno::EMFILE)
	from /usr/lib/ruby/1.8/debian/utils.rb:47:in `pipeline'
	from /usr/lib/ruby/1.8/debian/utils.rb:86:in `tar'
	from /usr/lib/ruby/1.8/debian.rb:142:in `load'
	from /usr/lib/ruby/1.8/debian/utils.rb:75:in `gunzip'
	from /usr/lib/ruby/1.8/debian/utils.rb:40:in `pipeline'
	from /usr/lib/ruby/1.8/debian/utils.rb:72:in `gunzip'
	from /usr/lib/ruby/1.8/debian.rb:141:in `load'
	from /usr/lib/ruby/1.8/debian/ar.rb:150:in `open'
	from /usr/lib/ruby/1.8/debian/ar.rb:147:in `each'
	from /usr/lib/ruby/1.8/debian/ar.rb:147:in `open'
	from /usr/lib/ruby/1.8/debian.rb:140:in `load'
	from /usr/lib/ruby/1.8/debian.rb:82:in `field'
	from /usr/share/apt-listbugs/apt-listbugs/logic.rb:733:in `field'
	from /usr/share/apt-listbugs/apt-listbugs/logic.rb:751:in `create'
	from /usr/share/apt-listbugs/apt-listbugs/logic.rb:743:in `each_index'
	from /usr/share/apt-listbugs/apt-listbugs/logic.rb:743:in `create'
	from /usr/sbin/apt-listbugs:323
/usr/lib/ruby/1.8/debian.rb:198:in `parseFields': E: required field Package not found in  (Debian::FieldError)
	from /usr/lib/ruby/1.8/debian.rb:196:in `each'
	from /usr/lib/ruby/1.8/debian.rb:196:in `parseFields'
	from /usr/lib/ruby/1.8/debian.rb:439:in `initialize'
	from /usr/lib/ruby/1.8/debian.rb:150:in `new'
	from /usr/lib/ruby/1.8/debian.rb:150:in `load'
	from /usr/lib/ruby/1.8/debian.rb:82:in `field'
	from /usr/share/apt-listbugs/apt-listbugs/logic.rb:733:in `field'
	from /usr/share/apt-listbugs/apt-listbugs/logic.rb:751:in `create'
	from /usr/share/apt-listbugs/apt-listbugs/logic.rb:743:in `each_index'
	from /usr/share/apt-listbugs/apt-listbugs/logic.rb:743:in `create'
	from /usr/sbin/apt-listbugs:323
E: Sub-process /usr/sbin/apt-listbugs apt || exit 10 returned an error code (10)
E: Failure running script /usr/sbin/apt-listbugs apt || exit 10
A package failed to install.  Trying to recover:

root@kiwi:/etc/apt$

-++-----------------------------
-++ Realization of true horror and cathartic mini-rant.
(ARGH!) *sigh*
So, googling reveals that this is an apt-listbugs bug which has been known about
since June 2010!!!!  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=585448
I applied the stupidly-simple patch succesfully to the appropriate Ruby script
and am left STUNNED and speechless that the version I had downloaded just today,
for just this very project, to be notified of possible system-breaking bugs ...
BROKE MY SYSTEM!
This bug will hit anyone who tries to dist-upgrade from Squeeze to Wheezy, so,
WHY!?, for the love of all that is sane in the Universe is some brain-dead
policy standing in the way of an intelligent human brain and sanity!?  All the
hours I (and others) have already wasted and will be wasting in the near-future
are NOT worth the Nazi-soldier-like I'm-just-following-orders adherence to a
"policy."  A "policy" is a tool, which should work in favor of efficiency.  How
is a bug which critically breaks my system not designated as a system critical
bug!?  My entire Debian Stable system BROKE its stability due to this patch not
being applied:
--- lib/debian.rb	2010-08-26 08:25:15.000000000 -0700
+++ /usr/lib/ruby/1.8/debian.rb	2011-09-04 01:48:49.000000000 -0700
@@ -115,7 +115,10 @@
 
     def deb?(debfile)
       begin
-	Debian::Ar.new(debfile).open("debian-binary").read == DEBFORMAT_VERSION
+        f = Debian::Ar.new(debfile)
+        res = (f.open("debian-binary").read == DEBFORMAT_VERSION)
+        f.close
+        return res
       rescue NameError, Debian::ArError
 	false
       end
@@ -568,6 +571,7 @@
 	  @data.push(line.chomp)
 	}
       }
+      @artab.close
       freeze
     end
     def control= (c); @control = c; end
<EOF>
Due to the lack of four tiny lines, I am forced into all of this frustration.
Please, please, someone with the authority, push through this patch!

-++-----------------------------
-++ My attempts to clean up.
From the log text above, it appears that all the newer files downloaded, but
hopefully, the actual install process never started.  Perhaps I can simply abort
the dist-upgrade?  Gingerly, I decided to restore my /etc/apt/sources.list to
use 'stable' instead of 'testing.' Doing aptitude update, aptitude upgrade shows
only some tiny (but now forgotton), inconsequential update available, which I
allow.  Could I possibly be (dare I think it) ... safe?  I change sources.list
from 'stable' to 'testing.'  From here on, anything I try results in:
root@kiwi:/etc/apt$ aptitude dist-upgrade
The following NEW packages will be installed:
[SNIP 287 lines]
3005 packages upgraded, 1068 newly installed, 5 to remove and 0 not upgraded.
Need to get 4,860 MB/4,861 MB of archives. After unpacking 3,188 MB will be used.
The following packages have unmet dependencies:
  gnome-keyring: Breaks: seahorse-plugins (< 3.0) but 2.30.1-3 is installed.
[SNIP 135lines]
  libmetacity-private0: Depends: metacity-common (< 1:2.31) but 1:2.34.3-3 is to be installed.
open: 4762; closed: 13822; defer: 36; conflict: 46
No solution found within the allotted time.  Try harder? [Y/n]^C

I have actually tried saying, 'Y,' to that question up to 20 desperate times, with
no solution found.  If I say 'n,' then I get:
Resolve these dependencies by hand? [N/+/-/_/:/?] 

This allows me to 'e' to enter the full visual interface.  Twice, I have tried
to manually sort through what I am willing to just 'delete' until later and what
are system-critical required packages.  Both times, I left aptitude at the ui
while I went afk for a bit.
(At the bottom, I see "Resolving dependencies      .oO" with the ".oO"
characters cycling in animation, so I suppose it just eventually choked.)
When I returned, aptitude had died:
"Ouch!  Got SIGABORT, dying.. Aborted"
I have gone into aptitude's Actions menu, to choose 'Cancel pending actions.'
This did not seem to have any effect as I tried my cleanup efforts again.

-++-----------------------------
-++ Help!
When reading about all the people who hit this bug, everyone stated that the
solution is to uninstall apt-listbugs or patch it before dist-upgrade.  But, I
found no one who described how to recover from the hit.

I suspect that I might be able to simply clear some flag to cleanly abort the
dist-upgrade, (which would, hopefully, clear out the conflicts) but do not know
where to look.  But, I am open to any ideas.  Hopefully, the power doesn't go
out, because I am not confident of a successful boot at this point. :>
Although, again, it seems that NOTHING was actually installed yet.  It is this
apparent fact which gives me great hope.

I am now reminded of http://dwarffortresswiki.org/images/4/40/FunComic.png :)


Reply to: