Como posso fazer o APT “ignorar” um pacote?

1

Estou executando um VPS usando o Debian unstable com esta versão do kernel:

2.6.32-274.7.1.el5.028stab095.1

Acabei de atualizar meus pacotes e, por algum motivo estranho, o APT quer que eu instale linux-image-3.2.0-3-amd64 , o que é estranho, já que não posso modificar o kernel, pois é um VPS. Eu tentei instalá-lo de qualquer maneira, mas como eu suspeitava que não funcionou:

root@youmu:~# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? Y
Setting up linux-image-3.2.0-3-amd64 (3.2.23-1) ...
Running depmod.
vmlinuz(/boot/vmlinuz-3.2.0-3-amd64
) points to /boot/vmlinuz-3.2.0-3-amd64
 (/boot/vmlinuz-3.2.0-3-amd64) -- doing nothing at /var/lib/dpkg/info/linux-image-3.2.0-3-amd64.postinst line 268.
initrd.img(/boot/initrd.img-3.2.0-3-amd64
) points to /boot/initrd.img-3.2.0-3-amd64
 (/boot/initrd.img-3.2.0-3-amd64) -- doing nothing at /var/lib/dpkg/info/linux-image-3.2.0-3-amd64.postinst line 268.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-3-amd64 /boot/vmlinuz-3.2.0-3-amd64
update-initramfs: Generating /boot/initrd.img-3.2.0-3-amd64
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.2.0-3-amd64 /boot/vmlinuz-3.2.0-3-amd64
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... Generating /boot/grub/default file and setting the default boot entry to 0
entry not specified.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.2.0-3-amd64.postinst line 696.
dpkg: error processing linux-image-3.2.0-3-amd64 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 linux-image-3.2.0-3-amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@youmu:~# 

Então, tentei removê-lo, mas ele ainda falhou.

Eu estou querendo saber se existe uma maneira de fazer com que o APT ignore um pacote como se ele não existisse, assim ele não vai me incomodar toda vez que eu instalar um pacote. Eu tentei colocar o pacote em espera, mas ele ainda quer reconfigurá-lo.

Alguma sugestão?

Fim do arquivo postinst:

## Run user hook script here, if any
if ($postinst_hook) {
  &run_hook("postinst", $postinst_hook);
}

if (-d "/etc/kernel/postinst.d") {
  print STDERR "Examining /etc/kernel/postinst.d.\n";
  system ("run-parts --verbose --exit-on-error --arg=$version " .
          "--arg=$realimageloc$kimage-$version " .
          "/etc/kernel/postinst.d") &&
            die "Failed to process /etc/kernel/postinst.d";
}

if (-d "/etc/kernel/postinst.d/$version") {
  print STDERR "Examining /etc/kernel/postinst.d/$version.\n";
  system ("run-parts --verbose --exit-on-error --arg=$version " .
          "--arg=$realimageloc$kimage-$version " .
          "/etc/kernel/postinst.d/$version") &&
            die "Failed to process /etc/kernel/postinst.d/$version";
}

exit 0;

__END__
    
por Mark 07.09.2012 / 09:01

1 resposta

1

Como temporário, comente o exec update-grub no /etc/kernel/postinst.d/zz-update-grub executando:

$ sudo sed -i.bak '/exec update-grub/s/^/#/' /etc/kernel/postinst.d/zz-update-grub

execute o script de configuração:

$ sudo dpkg --configure -a

Se funcionar, você poderá restaurar o arquivo zz-update-grub para seu conteúdo original.

    
por 07.09.2012 / 13:23