Skip to content
Snippets Groups Projects
Commit ad9528db authored by Detlev Casanova's avatar Detlev Casanova
Browse files

tools: Add a script to switch between coreutils and rust-coreutils


These being essential packages, a script is needed to backup binaries
used to do the upgrade.

Signed-off-by: default avatarDetlev Casanova <detlev.casanova@collabora.com>
parent 3d7702e5
No related branches found
No related tags found
4 merge requests!37Merge changes from apertis/v2022-updates into apertis/v2022,!32[v2022 <- v2023dev3] Merge v2023dev3 in v2022,!24tools: Add a script to switch between coreutils and rust-coreutils,!23tools: Add a script to switch between coreutils and rust-coreutils
Pipeline #372321 passed
Pipeline: apertis-dev-tools

#372323

    Pipeline: apertis-dev-tools

    #372322

      apertis-dev-tools (0.2021.8) apertis; urgency=medium
      * Add a script to switch between coreutils and rust-coreutils
      -- Detlev Casanova <detlev.casanova@collabora.com> Mon, 21 Feb 2022 14:09:42 -0500
      apertis-dev-tools (0.2021.7) apertis; urgency=medium
      * pkg-merge-updatesi: Try to fast-forward before rebasing
      ......
      ......@@ -8,6 +8,7 @@ TOOLS = \
      devroot-enter \
      apertis-pkg-merge-updates \
      apertis-pkg-pull-updates \
      apertis-switch-coreutils-rust \
      import-debian-package
      all:
      ......
      #!/bin/sh
      # This script is used to switch from rust-coreutils to coreutils (and vice-versa)
      # without breaking the system.
      set -e
      case "$1" in
      coreutils|rust-coreutils)
      PACKAGE="${1}"
      ;;
      *)
      echo "A valid coreutils provider must be given on the command line"
      echo "Usage: $0 [coreutils|rust-coreutils]"
      exit 1
      ;;
      esac
      # Copy needed binary to /usr/local/bin
      cp /bin/rm /usr/local/bin
      DPKGPATH=/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
      # Install the new package
      apt-get -y -o Dpkg::Path="$DPKGPATH" --allow-remove-essential install ${PACKAGE}
      # Cleanup
      rm /usr/local/bin/rm
      0% Loading or .
      You are about to add 0 people to the discussion. Proceed with caution.
      Finish editing this message first!
      Please register or to comment