Xubuntu

Chapitre 10. Gestion des paquets hors ligne

Table des matières

Mise à jour des dépôts
Installation d'un paquet
Mise à niveau de votre système

L'outil apt-offline est disponible pour aider à garder votre ordinateur à jour même s'il ne peut pas rester connecté. Il existe de multiples étapes impliquées dans ce processus. Avec un lecteur flash USB à votre disposition, cela peut être géré.

Mise à jour des dépôts

Après avoir inséré un lecteur USB et ouvert un terminal, vous pouvez utiliser apt-offline pour générer une requête et mettre à jour la liste des dépôts. Cela permet de voir s'il y a des mises à jour pour corriger des bogues ou des mises à jour de sécurité disponibles et applicables pour votre ordinateur. Cela vous permet également de savoir si de nouveaux logiciels sont disponibles.

À partir de votre ordinateur déconnecté, saisissez ceci dans la ligne de commande : apt-offline set --update apt-offline.sig

After that command is done and the apt-offline.sig is created, copy that to your USB flash drive and take it to another computer. With apt-offline on that computer, you use that file to download what your disconnected computer needs to update itself. Assuming you are in the terminal and in the directory on the flash drive containing apt-offline.sig, you enter apt-offline get --bundle bundle.zip apt-offline.sig. Once that command is done, you can remove the USB flash drive and take it back to the disconnected computer. Some errors in red text may show up about being unable to download files relative to translations but these can be safely ignored.

De retour sur l'ordinateur déconnecté, insérez la clé USB. En supposant que vous ayez ouvert un terminal et que vous soyez dans le répertoire de la clé USB contenant les deux fichiers, vous pouvez saisir : sudo apt-offline install bundle.zip. Vous verrez défiler la sortie standard d'un programme, et une fois fini vos dépôts seront mis à jour.

Installation d'un paquet

Après avoir inséré une clé USB et ouvert un terminal, vous pouvez utiliser apt-offline pour récupérer un paquet à installer. Cette action peut également être combinée avec la mise à jour de la liste des dépôt logiciels de votre ordinateur. Dans un environnement déconnecté, la clé réside dans l'utilisation maximale des opportunités de connexion que vous avez.

In this example, assume you want to install a new program package. Throughout this we'll refer to this as $PACKAGENAME though in normal use you will want to enter just the package name you want without the dollar sign. Fairly frequently installing $PACKAGENAME will result in the need to also grab dependencies instead of just a single package file. apt-offline handles the dependencies resolution for you. To start this process you need to open a terminal window, plug in a USB flash drive, and navigate to a directory on the flash drive. From that directory you then enter at the command line to start the process: sudo apt-offline set --install-packages $PACKAGENAME --update apt-offline.sig

After that command is done and the apt-offline.sig is created, copy that to your USB flash drive and take it to another computer. With apt-offline on that computer, you use that file to download what your disconnected computer needs to update itself. Assuming you are in the terminal and in the directory on the flash drive containing apt-offline.sig, you enter sudo apt-offline get --bundle bundle.zip apt-offline.sig. The command's output will show an attempt to download updates as to what the repositories look like as well as $PACKAGENAME and the dependencies your system requires. Once that command is done, you can remove the USB flash drive and take it back to the disconnected computer. Some errors in red text may show up about being unable to download files relative to translations but these can be safely ignored.

De retour sur l'ordinateur déconnecté, insérez la clé USB. En supposant que vous ayez ouvert un terminal et que vous soyez dans le répertoire du lecteur USB contenant les deux fichiers, vous pouvez saisir : sudo apt-offline install bundle.zip. Vous verrez défiler la sortie standard du programme et une fois fini vos dépôts seront mis à jour. Une fois ceci complété, vous pourrez installer $PACKAGENAME en saisissant : sudo apt-get install $PACKAGENAME.

Mise à niveau de votre système

[Avertissement]

Quelques paquets spécifiques ne sont pas construits pour supporter l'environnement déconnecté. Cela est dû au fait qu'ils exécutent des scripts de téléchargement pendant l'installation ou le processus de la mise à jour. Certains paquets présentant régulièrement ce comportement sont flashplugin-installer, nautilus-dropbox, et ttf-mscorefonts-installer. Il n'y a pas d'alternative pour de tels paquets d'installation qui effectuent eux-mêmes des téléchargements.

An upgrade of packages is a two-round process for those using a disconnected computer. During the first round you need to update your computer's view of the repositories to know that something has an update available. Only during the second round can you download the upgrade packages.

Insérez d'abord un lecteur USB et ouvrez un terminal. Depuis votre ordinateur déconnecté, saisissez ceci sur la ligne de commande : apt-offline set --update apt-offline.sig

After that command is done and the apt-offline.sig is created, copy that to your USB flash drive and take it to another computer. With apt-offline on that computer, you use that file to download what your disconnected computer needs to update itself. Assuming you are in the terminal and in the directory on the flash drive containing apt-offline.sig, you enter apt-offline get --bundle bundle.zip apt-offline.sig. Once that command is done, you can remove the USB flash drive and take it back to the disconnected computer. Some errors in red text may show up about being unable to download files relative to translations but these can be safely ignored.

De retour sur l'ordinateur déconnecté, insérez la clé USB. En supposant que vous ayez ouvert un terminal et que vous soyez dans le répertoire de la clé USB contenant les deux fichiers, vous pouvez saisir : sudo apt-offline install bundle.zip. Vous verrez défiler la sortie standard d'un programme, et une fois fini vos dépôts seront mis à jour.

Cela complète la première partie du processus. Vous saurez maintenant si, oui ou non, des paquets sont à mettre à niveau. Si des paquets sont à mettre à niveau vous pouvez continuer plus avant, sinon vous pouvez arrêter.

Clear the USB flash drive that you have used previously. In a fresh terminal window, navigate to the directory on the USB flash drive you intend to work from. Since we never want to lose the opportunity to refresh the disconnected machine's view of the repositories, we build the command to not only look for upgrade packages but also to update repositories. You will want to enter: apt-offline set --update --upgrade apt-offline.sig

After that command is done and the apt-offline.sig is created, copy that to your USB flash drive and take it to another computer. With apt-offline on that computer, you use that file to download what your disconnected computer needs to update itself. Assuming you are in the terminal and in the directory on the flash drive containing apt-offline.sig, you enter sudo apt-offline get --bundle bundle.zip apt-offline.sig. The command's output will show an attempt to download updates as to what the repositories look like as well as the upgrades as well as their dependencies that may be required by your system. Once that command is done, you can remove the USB flash drive and take it back to the disconnected computer. Some errors in red text may show up about being unable to download files relative to translations but these can be safely ignored.

De retour sur l'ordinateur déconnecté, insérer la clé USB. En supposant que vous ayez ouvert un terminal et navigué jusqu'au répertoire du lecteur USB contenant les deux fichiers, saisissez : sudo apt-offline install bundle.zip. Vous verrez défiler la sortie standard du programme et une fois fini vos dépôts seront mis à jour. Une fois ceci complété, vous pourrez installer les mise à niveau en saisissant : sudo apt-get upgrade.

[Note]

You will want to avoid the use of the -y flag when upgrading so that you get a last chance to look through your upgrades to see if any problems mentioned earlier like flashplugin-installer or nautilus-dropbox show up. It takes just a moment but prevents some possible moments of grief later on.