[CBLX] script corrigé Was: Re: extrait Re: grep |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/carrefourblinux Archives
]
Voici le script qui datait et dont j'ignorais jusqu'à ce matin le "bug".
Le but est donc de mettre l'un ou l'autre paquet en mode "hold on".
Sous Debian ça marchait; là sous Ubuntu ça le fais aussi.
Aldo.
(holdpkg en pj)
#!/bin/bash
#
# HoldPkg - To Hold On some specific packages
#
# orig. recipe by Denis Barbier and now puted in this script by O. La Rosa
#
# orig. 17-02-2004 - brlspeak.net - Public
# latest 27-07-2009 - blinuxman.net - Public
#
# History:
# when using Debian backports, sometimes some applications may be
# +/- bugged and unstable, that's a good reason for prefering official
# packages...
# however, how can we continue to dist-upgrade the entire distro with
# backported packages while preventing to upgrade automatically some specific
# packages?
#
# D. Barbier, an old member of the (fr) CarrefourBLinux list suggested this:
#"You will � on hold � packages :"
#...
clear
echo "HoldPkg!"
read -p"Enter app-name1 app2 app3... to be hold: " Apps
test -z "$Apps" && pkg="$(dpkg -l >/tmp/hip)" && $pkg && /bin/grep -i ^hi /tmp/hip |more && exit
for p in $Apps
do
echo $p hold | dpkg --set-selections
done
#"The selected packages will no longer be installed with apt-get dist-upgrade,
# you can do an apt-get install when you want to upgrade them."
echo "The selected packages....."
echo "$Apps"
echo "will no longer be installed with apt-get dist-upgrade,"
echo "you can do an apt-get --reinstall install when you want to upgrade them."
pkg="$(dpkg -l >/tmp/hip)"
$pkg && /bin/grep -i ^hi /tmp/hip |more
# "Another interesting way to proceed, is by learning using the
# � pinning �", see:
# http://www.debian.org/doc/manuals/apt-howto/ch-apt-get.fr.html#s-pin
# or
# http://www.debian.org/doc/manuals/apt-howto/ch-apt-get.en.html#s-pin
exit
#
# End of script.