# wajig hold linux-image-2.6.18-6-486 linux-source-2.6.18
The following packages are on hold:
linux-image-2.6.18-6-486
linux-source-2.6.18
これでこれら2つのパッケージはアップグレードされないと思うので再び以下のように確認してみる。
# apt-get upgrade -s
Reading package lists... Done
Building dependency tree... Done
The following packages have been kept back:
linux-image-2.6.18-6-486 linux-source-2.6.18
The following packages will be upgraded:
cupsys cupsys-bsd cupsys-client cupsys-common libcupsimage2 libcupsys2 libfreetype6 libfreetype6-dev libtiff4 libxml2
libxml2-utils libxslt1.1 openssh-client openssh-server python-libxml2 xsltproc
# dpkg --get-selections | grep hold
linux-image-2.6.18-6-486 hold
linux-source-2.6.18 hold
wajigでholdしたものは以下のようにして元に戻す。
# wajig unhold linux-image-2.6.18-6-486 linux-source-2.6.18
The following packages are still on hold:
/etc/apt/preferencesを使う方法
aptにはパッケージをpinする機能があるらしく、以下のような手順で実現した。
# dpkg-query --list|grep linux-image
ii linux-image-2.6-486 2.6.18+6etch3 Linux kernel 2.6 image on x86
ii linux-image-2.6.18-6-486 2.6.18.dfsg.1-22 Linux 2.6.18 image on x86
# dpkg-query --list|grep linux-source
ii linux-source-2.6.18 2.6.18.dfsg.1-22 Linux kernel source for version 2.6.18 with
# vi /etc/apt/preferences
C
1
2
3
4
5
6
7
Package:linux-image-2.6.18-6-486
Pin:version2.6.18.dfsg.1-22
Pin-Priority:1001
Package:linux-source-2.6.18
Pin:version2.6.18.dfsg.1-22
Pin-Priority:1001
# apt-get upgrade -s
Reading package lists... Done
Building dependency tree... Done
The following packages will be upgraded:
cupsys cupsys-bsd cupsys-client cupsys-common libcupsimage2 libcupsys2 libfreetype6 libfreetype6-dev libtiff4 libxml2
libxml2-utils libxslt1.1 openssh-client openssh-server python-libxml2 xsltproc