Patchwork D6910: automation: use LSB_RELEASE instead of DEBIAN_VERSION

login
register
mail settings
Submitter phabricator
Date Sept. 29, 2019, 7:08 p.m.
Message ID <differential-rev-PHID-DREV-epupdu3vu7h6bn65qkcc-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/41833/
State Superseded
Headers show

Comments

phabricator - Sept. 29, 2019, 7:08 p.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This should be more robust since I believe the minor version can
  change mid release.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6910

AFFECTED FILES
  contrib/automation/hgautomation/linux.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/contrib/automation/hgautomation/linux.py b/contrib/automation/hgautomation/linux.py
--- a/contrib/automation/hgautomation/linux.py
+++ b/contrib/automation/hgautomation/linux.py
@@ -187,7 +187,7 @@ 
 
 sudo apt-key add docker-apt-key
 
-if [ "$DEBIAN_VERSION" = "9.8" ]; then
+if [ "$LSB_RELEASE" = "stretch" ]; then
 cat << EOF | sudo tee -a /etc/apt/sources.list
 # Need backports for clang-format-6.0
 deb http://deb.debian.org/debian stretch-backports main
@@ -271,7 +271,7 @@ 
     zip \
     zlib1g-dev"
 
-if [ "$DEBIAN_VERSION" = "9.8" ]; then
+if [ "LSB_RELEASE" = "stretch" ]; then
     PACKAGES="$PACKAGES linux-perf"
 elif [ "$DISTRO" = "Ubuntu" ]; then
     PACKAGES="$PACKAGES linux-tools-common"