Weblog entry #3 for forrest

How to tell apt not to remove a package?
Posted by forrest on Fri 14 Oct 2005 at 05:05
Tags: none.
I use the mozilla-enigmail package, and although it's not critical for me, I'm still annoyed that it keeps getting removed when mozilla is upgraded. I have to keep remembering to run apt-get install mozilla-enigmail until it's finally upgraded and will install again.

Today I finally reinstalled enigmail after maybe a month of not having it. Then I ran apt-get -u dist-upgrade again and it wants to remove it again! No, no, bad apt!

I've tried playing around with pinning, but apparently that can't prevent removal, only up/downgrading. I saw the --no-remove switch in the man page, but I only want to prevent this one package from being removed.

It seems like there should be a way to do this ...

 

Comments on this Entry

Posted by Anonymous (213.164.xx.xx) on Fri 14 Oct 2005 at 14:18
Have you bug reported this?
http://www.debian.org/Bugs/

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Fri 14 Oct 2005 at 17:22
[ Send Message | View Steve's Scratchpad | View Weblogs ]

This works nicely for aptitude users:

aptitude hold package_name

Failing that see section 6.12 of the Debian FAQ which discusses using dpkg, or dselect, to do the job..

Beware that this will do two things:

  • Stop the package from being removed.
  • Stop the package from being upgraded - even if there is a newer version of the enigmail deb available.

I'd report it as a bug and hope for a real solution..

Steve
--

[ Parent | Reply to this comment ]

Posted by asg (24.74.xx.xx) on Fri 14 Oct 2005 at 18:21
[ Send Message ]
To put a package on hold
echo pkgname hold | dpkg --set-selections
To remove the hold
echo pkgname install | dpkg --set-selections
--asg

[ Parent | Reply to this comment ]

Posted by j_beijing (166.111.xx.xx) on Fri 28 Oct 2005 at 19:19
[ Send Message ]

This is intended as a comment to the previous post, except I can't add comments to that post.

To input chinese, I installed the package fcitx (along with xfonts-arphic-gbsn00lp), which I start up in ~/.xinitrc using:

LC_ALL=zh_CN LANG=zh_CN XIM=fcitx XIM_PROGRAM=fcitx XMODIFIERS=@im=fcitx fcitx

With that, I'm able to input chinese into gaim, firefox, and thunderbird by prepending LC_CTYPE=zh_CN to the command line, e.g.:

LC_CTYPE=zh_CN mozilla-thunderbird &

To switch between typing in chinese and english, use Ctrl-. To scroll through the list of words, use "=" and "-" keys.

Hope that helps!

[ Parent | Reply to this comment ]

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search