Projet

Général

Profil

Development #56297

debian, remplacer l'utilisation de la commande "which"

Ajouté par Frédéric Péters il y a plus de 2 ans. Mis à jour il y a plus de 2 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
-
Début:
20 août 2021
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

  * The 'which' utility will be removed in the future.  Shell scripts
    often use it to check whether a command is available.  A more
    standard way to do this is with 'command -v'; for example:
      if command -v update-icon-caches >/dev/null; then
        update-icon-caches /usr/share/icons/...
      fi
    '2>/dev/null' is unnecessary when using 'command': POSIX says "no
    output shall be written" if the command isn't found.  It's also
    unnecessary for the debianutils version of 'which', and hides the
    deprecation warning.

which est utilisé dans debian/authentic2-manage et debian/multitenant/authentic2-multitenant-manage,

    if which sudo >/dev/null; then

et dans debian/authentic2.postrm,

        if which ucf >/dev/null 2>&1; then

Fichiers

Révisions associées

Révision db0e540c (diff)
Ajouté par Frédéric Péters il y a plus de 2 ans

debian: replace usage of deprecated which command (#56297)

Historique

#1

Mis à jour par Frédéric Péters il y a plus de 2 ans

#2

Mis à jour par Serghei Mihai il y a plus de 2 ans

  • Statut changé de Solution proposée à Solution validée
  • Assigné à mis à Frédéric Péters
#3

Mis à jour par Benjamin Dauvergne il y a plus de 2 ans

  • Statut changé de Solution validée à Résolu (à déployer)
commit db0e540c43d0b2a4df9ed30c97d79ba148a858d3
Author: Frédéric Péters <fpeters@entrouvert.com>
Date:   Mon Aug 23 19:48:05 2021 +0200

    debian: replace usage of deprecated which command (#56297)
#4

Mis à jour par Frédéric Péters il y a plus de 2 ans

  • Statut changé de Résolu (à déployer) à Solution déployée

Formats disponibles : Atom PDF