Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / patches / ceph-volume-respect-PATH.patch
1 Look for required tools in $PATH instead of just a handful locations.
2
3 diff --git a/src/ceph-volume/ceph_volume/util/system.py b/src/ceph-volume/ceph_volume/util/system.py
4 index b637f023a4..14516e1c65 100644
5 --- a/src/ceph-volume/ceph_volume/util/system.py
6 +++ b/src/ceph-volume/ceph_volume/util/system.py
7 @@ -33,14 +33,7 @@ def generate_uuid():
8
9 def which(executable):
10 """find the location of an executable"""
11 - locations = (
12 - '/usr/local/bin',
13 - '/bin',
14 - '/usr/bin',
15 - '/usr/local/sbin',
16 - '/usr/sbin',
17 - '/sbin',
18 - )
19 + locations = os.getenv('PATH').split(':')
20
21 for location in locations:
22 executable_path = os.path.join(location, executable)