Setting Distribution Version Preferences
The configuration file that determines the priorities for which repositories dpkg will draw programs from is preferences in the apt directory.
The following is intended to tell the program to upgrade programs first drawing from stable repositories, then upgrade from testing. Open any text editor from root and copy/paste the following between start and end into it. In this example, I use the kwrite GUI text editor. Save it as /etc/apt/preferences.
# cd /etc/apt # mv preferences preferences-old # kwrite /etc/apt/preferences =========== start preference file Package: * Pin: release o=Debian Pin-Priority: 900 Package: * Pin: release a=testing Pin-Priority: 300 =========== end preference file
What If an Application Doesn’t Install Completely?
Open a terminal and as root:
# dpkg –configure –a
This tells dpkg to complete the configuration process for any program that is not completely configured.
How Do You Protect from Program Bugs?
Note that I spent a couple of years not knowing the following and only had serious trouble on a couple of occasions. But the best way to have a bug-free system is to make sure applications with bugs that affect you are never installed to begin with. The best way to do this is to install apt-listbugs:
# aptitude install apt-listbugs
While the great majority of bugs (especially on a system update) won’t apply to you, Debian recently distributed a copy of apt with a minor problem. It interacted with the grub bootloader in a way that would turn the user’s computer into an unbootable brick. I waited several days until the bug-fixed version made it into the distribution version I use.
With apt-listbugs installed, you can scan the list of bugs, decide which to ignore completely based on short bug descriptions and which to look up. Just put the bug number—i.e. #123456—into your favorite search engine; the first few hits will take you to a Debian bug forum or mailing list describing the bug in detail. This will work from any apt-derived command-line installer or any GUI installer that provides a mini-terminal window automatically or that can be activated by a user (usually "Details") to show the actual command-line terminal process.
If one is using a GUI installer/upgrade application and if there’s a bug, the program will usually hang after downloading the files waiting for you to input Y or N to the question "Do you want to install these programs despite the bugs?" If there isn’t a bug, the installer will simply install the program without further user interaction. You generally don’t run into bug announcements unless you're installing many packages at a time.
I tried apt-listbugs with Update Manager (Start > System > Update Manager), as shown in Figure 1.
Figure 1 apt-listbugs with Update Manager
Use the Details accessed by clicking the triangular icon during the installation process. This opens a mini-terminal window (see Figure 2). If you get an alert providing a brief description of the bug and a bug ID followed by an "input Y or N" prompt, look up the bug ID.
Figure 2 Accessing installer mini-terminal screen
For example, I found the bug listed in the terminal window image in Figure 2 via Google search using #457185 as a search term. I determined this was a big enough problem that I didn’t want hibernate upgraded. The liferea application bug wasn’t a problem; I haven’t gotten into RSS feeds yet. So I disabled hibernate from the update by unchecking the box next to the Hibernate entry on the list of applications to be updated, and I left the liferea entry alone.
If you get a NO PUBKEY error, highlight and copy the key ID (the 16-digit hex number after NO PUBKEY) to the clipboard and run APT Key Manager. (See steps 1 and 5 in "Importing Repository GPG Keys" next.)
So, I typed N, went back and unchecked the Hibernate Update, and pressed Apply. The terminal came up again. This time, the Hibernate alert disappeared.
With Synaptic, follow these steps:
- Click Apply on the main toolbar once you select the desired install/upgrade.
- Click Apply on Apply the Following Changes? window.
- In Installing Software, click on the triangular icon next to Details.
Note that applications marked for upgrade are marked with a yellow highlight. However, you’ll have an easier time using Update Manager for updates; the only files it lists are ones available for upgrading. I suggest using Synaptic only as an installer.