[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Is there any way to prevent a package from upgrading?



kmself@ix.netcom.com writes:
 
>    $ echo "<packagename> hold" | dpgk --set-selections

     If you don't want to remember the command sequence, Craig Sanders
<cas@taz.net.au> posted the following script on debian-devel some time
ago:

---cut here---
#! /bin/bash

# dpkg-hold  --  command line tool to flag package(s) as held.
#
# by Craig Sanders, 1998-10-26.  This script is hereby placed into the 
# public domain.
#
# BUGS: this script has absolutely no error checking.  this is not good.

if [ -z "$*" ] ; then
    echo "Usage:"
    echo "      dpkg-hold <package...>"
    exit 1
fi

for i in $@ ; do
    echo "$i    hold"
done | dpkg --set-selections
---cut here---

     Despite the disclaimer about error checking, I have had good
results with it.  I have also reversed it to make dpkg-unhold.

Bob
-- 
   _
  |_)  _  |_       Robert D. Hilliard      <hilliard@debian.org>
  |_) (_) |_)      1294 S.W. Seagull Way   <bob@bobhilliard.net>
                   Palm City, FL  USA      GPG Key ID: 390D6559 
                                           PGP Key ID: A8E40EB9
                                            



Reply to: