aboutsummaryrefslogtreecommitdiff
path: root/utils/get-developers
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2020-11-19 15:53:54 +0100
committerGravatar Peter Korsgaard <peter@korsgaard.com>2021-01-19 15:23:01 +0100
commit8e5eebd53042cfa4ca4769c1b396c13ae9779028 (patch)
treef34035c4fcc54ae5de7c43c18155b9abb90931eb /utils/get-developers
parent3bdae5980c9841ff2b3976fa379aa76921daacb1 (diff)
downloadbuildroot-8e5eebd53042cfa4ca4769c1b396c13ae9779028.tar.gz
buildroot-8e5eebd53042cfa4ca4769c1b396c13ae9779028.tar.bz2
utils/getdeveloperlib.py: use relative paths for files
Using absolute paths within getdeveloperlib isn't very sensible, it makes a lot more sense to handle everything as relative paths from the top-level Buildroot source directory. parse_developers() is changed to no longer take the base path as argument: it is automatically calculated based on the location of utils/getdeveloperlib.py. Then, the rest of the logic is adjusted to use relative paths, and prepend them with the base "brpath" when needed. This commit allows pkg-stats to report correct developers information even when executed from an out of tree directory. Before this patch: $ ~/buildroot/support/scripts/pkg-stats -p ipmitool --json out.json $ cat out.json | jq '.packages.ipmitool.developers' [] $ cat out.json | jq '.defconfigs.stm32f469_disco' { "name": "stm32f469_disco", "path": "configs/stm32f469_disco_defconfig", "developers": [] } After this patch: $ ~/buildroot/support/scripts/pkg-stats -p ipmitool --json out.json $ cat out.json | jq '.packages.ipmitool.developers' [ "Floris Bos <bos@je-eigen-domein.nl>", "Heiko Thiery <heiko.thiery@gmail.com>" ] $ cat out.json | jq '.defconfigs.stm32f469_disco' { "name": "stm32f469_disco", "path": "configs/stm32f469_disco_defconfig", "developers": [ "Christophe Priouzeau <christophe.priouzeau@st.com>" ] } Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Tested-by: Heiko Thiery <heiko.thiery@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> (cherry picked from commit 40bb37bd70d46822e803aaa5169dee8ff8b51093) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'utils/get-developers')
-rwxr-xr-xutils/get-developers5
1 files changed, 0 insertions, 5 deletions
diff --git a/utils/get-developers b/utils/get-developers
index 20272ed60b..e027c26562 100755
--- a/utils/get-developers
+++ b/utils/get-developers
@@ -45,10 +45,6 @@ def __main__():
print("No action specified")
return
- # getdeveloperlib expects to be executed from the toplevel buildroot
- # directory, which is one level up from this script
- os.chdir(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..'))
-
devs = getdeveloperlib.parse_developers()
if devs is None:
sys.exit(1)
@@ -75,7 +71,6 @@ def __main__():
# Handle the files action
if args.files is not None:
- args.files = [os.path.abspath(f) for f in args.files]
for dev in devs:
for f in args.files:
if dev.hasfile(f):