support package repair too

Bug #228200 reported by Michael Vogt
14
Affects Status Importance Assigned to Milestone
friendly-recovery (Ubuntu)
Fix Released
Undecided
Unassigned
Hardy
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: friendly-recovery

Friendly-recovery should support package repair.

TEST CASE:
1. install hardy
2. boot into recovery mode
3. verify that "Fix broken package" menu option is missing

4. install friendly-recovery from hardy-proposed
5. boot into recovery mode
6. verify that "Fix broken packages" mode is available

7. install a package (or run a dist-upgrade) and turn off the computer (or VM) while it is running
8. boot into recovery mode and verify that "Fix broken packages" fixes the broken install

Michael Vogt (mvo)
Changed in friendly-recovery:
status: New → Fix Released
Revision history for this message
Michael Vogt (mvo) wrote :

Here is the debdiff:

diff -Nru friendly-recovery-0.1.1/debian/changelog friendly-recovery-0.1.2/debian/changelog
--- friendly-recovery-0.1.1/debian/changelog 2008-05-08 11:40:13.000000000 +0200
+++ friendly-recovery-0.1.2/debian/changelog 2008-05-08 14:38:43.000000000 +0200
@@ -1,3 +1,10 @@
+friendly-recovery (0.1.2) hardy-proposed; urgency=low
+
+ * usr/share/recovery-mode/options/dpkg:
+ - add recovery mode for package failure (LP: #228200)
+
+ -- Michael Vogt <email address hidden> Thu, 08 May 2008 14:30:08 +0200
+
 friendly-recovery (0.1.1) hardy-proposed; urgency=low

   * usr/share/recovery-mode/options/root:
diff -Nru /tmp/qTNR68O5e4/friendly-recovery-0.1.1/usr/share/recovery-mode/options/dpkg /tmp/WWRkMKfQ4P/friendly-recovery-0.1.2/usr/share/recovery-mode/options/dpkg
--- friendly-recovery-0.1.1/usr/share/recovery-mode/options/dpkg 1970-01-01 01:00:00.000000000 +0100
+++ friendly-recovery-0.1.2/usr/share/recovery-mode/options/dpkg 2008-05-08 14:32:14.000000000 +0200
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+if [ "$1" = "test" ]; then
+ echo "Repair broken packages"
+ exit 0
+fi
+
+# do some cleanup
+rm /var/lib/apt/lists/partial/*
+
+# now run the apt foo
+dpkg --configure -a
+apt-get update
+apt-get install -f
+apt-get dist-upgrade
+
+echo ""
+echo "Finished, please press ENTER"
+read TMP
+
+exit 0

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into -proposed, please test and give feedback here

Changed in friendly-recovery:
status: New → Fix Committed
Michael Vogt (mvo)
description: updated
Revision history for this message
wvengen (wvengen) wrote :

Good enhancement, I was hit by it someday (see duplicate). I'm wondering about the apt-get commands though. dpkg recovery is essential, but would a dist-upgrade really fix stuff? I certainly wouldn't expect a complete upgrade when repairing packages. Maybe another option "Bring system up-to-date" would be useful for that;
By the way, aptitude may be a better option since it has a better conflict resolver.

Revision history for this message
Martin Pitt (pitti) wrote :

I interrupted dpkg during unpacking, and thus broke the package system. I then rebooted into the rescue mode, selected 'fix packages', which duly happened and brought back my system into working order.

Considering verified.

Revision history for this message
Martin Pitt (pitti) wrote :

Copied to hardy-updates.

Changed in friendly-recovery:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.