diff options
author | Fabian Groffen <grobian@gentoo.org> | 2020-10-04 13:29:43 +0200 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2020-10-04 13:29:43 +0200 |
commit | 83325e68514d4d55554bff9439b61c03f12d4d8b (patch) | |
tree | 60db4c0017db937ef95f2fe1b608d02e49e697b6 /qlop.c | |
parent | qlop: ensure running merges are calculated of off package names #731122 (diff) | |
download | portage-utils-83325e68514d4d55554bff9439b61c03f12d4d8b.tar.gz portage-utils-83325e68514d4d55554bff9439b61c03f12d4d8b.tar.bz2 portage-utils-83325e68514d4d55554bff9439b61c03f12d4d8b.zip |
qlop: deal with optionally compressed buildlogs in probe_proc
Bug: https://bugs.gentoo.org/745798
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'qlop.c')
-rw-r--r-- | qlop.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1232,6 +1232,20 @@ static array_t *probe_proc(array_t *atoms) continue; rpath[rpathlen] = '\0'; + /* in bug #745798, it seems Portage optionally + * compresses the buildlog -- to make matching below + * here easier, strip such compression extension off + * first here, leaving .log */ + if ((size_t)rpathlen > sizeof(".log.gz") && + (p = strrchr(rpath, '.')) != NULL && + p - (sizeof(".log") - 1) > rpath && + strncmp(p - (sizeof(".log") - 1), ".log", + sizeof(".log") - 1) == 0) + { + *p = '\0'; + rpathlen -= rpath - p; + } + /* check if this points to a portage build: * <somepath>/portage/<cat>/<pf>/temp/build.log * <somepath>/<cat>:<pf>:YYYYMMDD-HHMMSS.log */ |