unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 08a9a15ddd3c3aecb213d26bc163887ecb67044b 719 bytes (raw)
name: patches/ceph-volume-respect-PATH.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
 
Look for required tools in $PATH instead of just a handful locations.

diff --git a/src/ceph-volume/ceph_volume/util/system.py b/src/ceph-volume/ceph_volume/util/system.py
index b637f023a4..14516e1c65 100644
--- a/src/ceph-volume/ceph_volume/util/system.py
+++ b/src/ceph-volume/ceph_volume/util/system.py
@@ -33,14 +33,7 @@ def generate_uuid():
 
 def which(executable):
     """find the location of an executable"""
-    locations = (
-        '/usr/local/bin',
-        '/bin',
-        '/usr/bin',
-        '/usr/local/sbin',
-        '/usr/sbin',
-        '/sbin',
-    )
+    locations = os.getenv('PATH').split(':')
 
     for location in locations:
         executable_path = os.path.join(location, executable)

debug log:

solving 08a9a15ddd3c3aecb213d26bc163887ecb67044b ...
found 08a9a15ddd3c3aecb213d26bc163887ecb67044b in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).