Le 27 sept. 2006 à 00:51, Daniel Macks a écrit :
On Wed, Sep 27, 2006 at 12:35:56AM +0200, Jean-David Maillefer wrote:If I run update-all with unstable enabled, all the stable packages having greater unstable version will upgrade to the unstable one. If I run update-all with unstable disable, only the stable packages are updated. How to update all stable to the latest stable version and all unstable to the latest unstable one ?1. Disable unstable and update-all. 2. 'fink list -Nt' (I think that's implemented but not documented:( but if not do 'fink list -it' and grep for '*i*') to determine what packages are installed that are beyond those present in stable. 3. Enable unstable. 4. 'fink update' those specific packages your learned in step 2.
Thanks for the howto.
To ease the update, I made the following bash script:
#!/bin/bash
# Jean-David Maillefer
fconf=/sw/etc/fink.conf
echo "Checking $fconf for unstable"
if { grep -E '^Trees:.*unstable/' $fconf; }
then
echo "Disabling unstable"
ext=$(date "+%s")
function clean() {
echo "Reactivating unstable."
mv -f "${fconf}"{"$ext",}
fink selfupdate; fink index; fink scanpackages
trap 0
}
mv "${fconf}"{,"$ext"}
trap clean 0
awk -F' ' '/^Trees:/ {res=$1; for (i=2; i <= NF; ++i) if ($i !~ /
^unstable\//) res=res" "$i; print res; next} {print}' "${fconf}$
{ext}" > "${fconf}"
#less "${fconf}"
echo " unstable tree(s) disabled."
echo "Reconfiguring database"
fink selfupdate; fink index; fink scanpackages
echo "Updating all stable packages"
fink update-all
# ? fink list -it | grep -E '^( i |\(i\))' | \
unstableToUpdate=$(
fink list -Nt | grep -E '^\*i\*' | \
awk -F '\t' '{print $2}')
# Reactivating unstable
clean
echo "Updating all unstable packages (but no stable to newer unstable)"
if [ -z "$unstableToUpdate" ]
then
echo "No unstable package to update."
else
cmd="fink update $unstableToUpdate"
echo $cmd
eval $cmd
fi
else
echo " no unstable tree enabled."
echo "Updating all stable packages"
fink update-all
fi
echo "Done."
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Fink-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fink-users
