#1 Le 09/11/2008, à 21:21
- Rude Wolf
Script de mise à jour depuis alternate, « faute de frappe »
Bonsoir,
Concernant le mise à jour depuis l'alternate cd ubuntu-8.10-alternate-i386.iso, il me semble que le script de mise à niveau contient une malencontreuse faute de frappe.
Je rencontre l'erreur:
/media/cdrom$ ./cdromupgrade
tar: ./dists/stable/main/dist-upgrader/binary-all//intrepid.tar.gz : la fonction open a échoué: Aucun fichier ou dossier de ce type
tar: Erreur non récupérable : arrêt du traitement
tar: Child returned status 2
tar: Des erreurs ont provoqué l'arrêt du programme
Could not find the upgrade application in the archive, exiting
Le problème vient de la double barre oblique. Si l'on regarde le script
cat ./cdromupgrade
#!/bin/sh
#
# "cdromupgrade" is a shell script wrapper around the dist-upgrader
# to make it possible to put it onto the top-level dir of a CD and
# run it from there
#
# Not that useful unfortunately when the CD is mounted "noexec".
#
# WARNING: make sure to call it with a absolute path!
# (e.g. /cdrom/cdromugprade)
# the codename is AUTO-GENERATED from the build-host relase codename
CODENAME=intrepid
cddirname="${0%\/*}"
fullpath="$cddirname/$UPGRADER_DIR"
# extrace the tar to a TMPDIR and run it from there
if [ ! -f "$fullpath/$CODENAME.tar.gz" ]; then
echo "Could not find the upgrade application archive, exiting"
exit 1
fi
TMPDIR=$(mktemp -d)
cd $TMPDIR
tar xzf "$fullpath/$CODENAME.tar.gz"
if [ ! -x $TMPDIR/$CODENAME ]; then
echo "Could not find the upgrade application in the archive, exiting"
exit 1
fi
$TMPDIR/$CODENAME --cdrom "$cddirname" $@
et plus précisément
tar xzf "$fullpath/$CODENAME.tar.gz"
On voit d'où vient la double oblique en reconstituant le chemin: fullpath="$cddirname/$UPGRADER_DIR" et
UPGRADER_DIR=dists/stable/main/dist-upgrader/binary-all/ . L'oblique terminale fait double emploi avec tar xzf "$fullpath/$CODENAME.tar.gz"
Il faudrait donc enlever l'oblique terminale dans UPGRADER_DIR=dists/stable/main/dist-upgrader/binary-all/
Dernière modification par Rude Wolf (Le 09/11/2008, à 21:23)
Hors ligne
#2 Le 09/11/2008, à 21:24
- slasher_fun
Re : Script de mise à jour depuis alternate, « faute de frappe »
En effet, et le bug a été rapporté d'ailleurs
https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/277873
Hors ligne
#3 Le 09/11/2008, à 21:44
- Rude Wolf
Re : Script de mise à jour depuis alternate, « faute de frappe »
Merci pour le lien. Étrangement, ce bug a été rapporté il y a plus d'un mois déjà, alors que la bêta venait juste de sortir...
Hors ligne