View Full Version : apt-get update > apt-get upgrade again!
edge
6th January 2007, 23:46
Okay,
On one of my Denian Sarge servers I still have the "old" 2.4 kernel as backup.
I'm using the 2.6.8-3-686-smp kernal.
Now when I apt-get update and apt-get upgrade, I get the following:
host:/home/edge# apt-get upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be upgraded:
kernel-headers-2.4.27-3 kernel-headers-2.4.27-3-686-smp
kernel-image-2.4.27-3-686-smp
3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 14.8MB of archives.
After unpacking 12.3kB of additional disk space will be used.
Do you want to continue? [Y/n]
I do not want to upgrade the 2.4.27-3 stuff.
Is there a way to kill this message, so what it does not show anymore when I do a apt-get update > upgrade?
Hans
7th January 2007, 00:25
I think you can do that with:
apt-get hold <packagename>
To undo it again:
apt-get unhold <packagename>
To see what your packages on hold are, do an:
dpkg --get-selections | grep hold
I think it is possible that way, but maybe Falko has a better solution for you.
edge
7th January 2007, 00:40
Eej Hans,
No apt-get hold here :/
host:/home/edge# apt-get hold kernel-headers-2.4.27-3
E: Invalid operation hold
host:/home/edge# apt-get -h
apt 0.5.28.6 for linux i386 compiled on Mar 22 2005 07:17:03
Usage: apt-get [options] command
apt-get [options] install|remove pkg1 [pkg2 ...]
apt-get [options] source pkg1 [pkg2 ...]
apt-get is a simple command line interface for downloading and
installing packages. The most frequently used commands are update
and install.
Commands:
update - Retrieve new lists of packages
upgrade - Perform an upgrade
install - Install new packages (pkg is libc6 not libc6.deb)
remove - Remove packages
source - Download source archives
build-dep - Configure build-dependencies for source packages
dist-upgrade - Distribution upgrade, see apt-get(8)
dselect-upgrade - Follow dselect selections
clean - Erase downloaded archive files
autoclean - Erase old downloaded archive files
check - Verify that there are no broken dependencies
Options:
-h This help text.
-q Loggable output - no progress indicator
-qq No output except for errors
-d Download only - do NOT install or unpack archives
-s No-act. Perform ordering simulation
-y Assume Yes to all queries and do not prompt
-f Attempt to continue if the integrity check fails
-m Attempt to continue if archives are unlocatable
-u Show a list of upgraded packages as well
-b Build the source package after fetching it
-V Show verbose version numbers
-c=? Read this configuration file
-o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp
See the apt-get(8), sources.list(5) and apt.conf(5) manual
pages for more information and options.
This APT has Super Cow Powers.
I think I need to use the -d option (Download only - do NOT install or unpack archives)
iberry
7th January 2007, 00:50
Seems that what you want to do is pin to that version of the 2.4 kernel. Pinning is described in section 3.10 of the APT HOWTO (http://www.debian.org/doc/manuals/apt-howto/ch-apt-get.en.html).
For example, I have pinned to version 0.5.* of network-manager by creating and adding the following lines to /etc/apt/preferences:
Package: network-manager
Pin: version 0.5*
Pin-Priority: 1001
Hope that helps to point you in the right direction.
--Ian
apt-get moo
Hans
7th January 2007, 01:16
Maybe this:
To put a package to hold:
echo "package_name hold"|dpkg --set-selections
to 'unhold' it:
echo "package_name install"|dpkg --set-selecions
To see what your packages on hold are, do an:
dpkg --get-selections | grep hold
edge
7th January 2007, 01:23
Welcome to the helping team iberry!
pin does look like a nice option, and I'll give it a try on a test server later today.
Hans,
I'll give your option also a go.
edge
7th January 2007, 02:02
Looks like echo "package_name hold"|dpkg --set-selections did the trick for me
host:/home/edge# echo "kernel-headers-2.4.27-3 hold" | dpkg --set-selections
host:/home/edge# echo "kernel-headers-2.4.27-3-686-smp hold" | dpkg --set-selections
host:/home/edge# echo "kernel-image-2.4.27-3-686-smp hold" | dpkg--set-selections
and
host:/home/edge# dpkg --get-selections | grep hold
kernel-headers-2.4.27-3 hold
kernel-headers-2.4.27-3-686-smp hold
kernel-image-2.4.27-3-686-smp hold
and
host:/home/edge# apt-get upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages have been kept back:
kernel-headers-2.4.27-3 kernel-headers-2.4.27-3-686-smp kernel-image-2.4.27-3-686-smp
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
Hans
7th January 2007, 02:11
That's nice!
I've also read that if you use aptitute that you can put an "=" in front of the package name to set it on hold.
(i use apt myself not aptitute)
falko
7th January 2007, 20:38
pin does look like a nice option, and I'll give it a try on a test server later today.
Also take a look here: http://www.howtoforge.com/forums/showpost.php?p=17170&postcount=15
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.