diff options
author | Eric Bavier <bavier@member.fsf.org> | 2020-10-21 18:33:52 -0500 |
---|---|---|
committer | Eric Bavier <bavier@member.fsf.org> | 2020-10-30 10:00:29 -0500 |
commit | a73896425e92e5162766afdf042748b18f2462af (patch) | |
tree | b62602861a5bdce8fda8899456f1536de3a1f48f /gnu/packages/aux-files | |
parent | eee35fe3b7cb21792b90ecbf5a834b5a3fdb6f04 (diff) | |
download | guix-a73896425e92e5162766afdf042748b18f2462af.tar.gz |
guix: pack: Fix offset calculation for store directory mount point.
Fixes wrapping of non-package things, where the target store directory may differ in length from the original. * guix/scripts/pack.scm (wrapped-package)<build-wrapper>: Define WRAPPER_PROGRAM macro with wrapper's file name. * gnu/packages/aux-files/run-in-namespace.c (main): Offset index by len of that file name.
Diffstat (limited to 'gnu/packages/aux-files')
-rw-r--r-- | gnu/packages/aux-files/run-in-namespace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/packages/aux-files/run-in-namespace.c b/gnu/packages/aux-files/run-in-namespace.c index 52a16a5362..947ff02dda 100644 --- a/gnu/packages/aux-files/run-in-namespace.c +++ b/gnu/packages/aux-files/run-in-namespace.c @@ -620,7 +620,7 @@ main (int argc, char *argv[]) /* SELF is something like "/home/ludo/.local/gnu/store/…-foo/bin/ls" and we want to extract "/home/ludo/.local/gnu/store". */ size_t index = strlen (self) - - strlen ("@WRAPPED_PROGRAM@") + strlen (original_store); + - strlen (WRAPPER_PROGRAM) + strlen (original_store); char *store = strdup (self); store[index] = '\0'; |