From 6d09e4400ce8a2f8ec24b0c934268c6fdb42d482 Mon Sep 17 00:00:00 2001 From: Matthew Justin Bauer Date: Thu, 14 Jun 2018 12:34:55 -0400 Subject: Fix optimise-store.cc to skip more paths on macOS I hate to make this such a large check but the lack of documentation means we really have no idea what's allowed. All of them reported so far have been within ".app/Contents" directories. That appears to be a safe starting point. However, I would not be surprised to also find more paths that are disallowed for instance in .framework or .bundle directories. Fixes #2031 Fixes #2229 --- src/libstore/optimise-store.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/libstore/optimise-store.cc b/src/libstore/optimise-store.cc index 7840167d7..991512f21 100644 --- a/src/libstore/optimise-store.cc +++ b/src/libstore/optimise-store.cc @@ -104,8 +104,7 @@ void LocalStore::optimisePath_(Activity * act, OptimiseStats & stats, *.app/Contents/Resources/\*.lproj seem to be the only paths affected. See https://github.com/NixOS/nix/issues/1443 for more discussion. */ - if (std::regex_search(path, std::regex("\\.app/Contents/PkgInfo$")) || - std::regex_search(path, std::regex("\\.app/Contents/Resources/.+\\.lproj$"))) + if (std::regex_search(path, std::regex("\\.app/Contents/.+$"))) { debug(format("'%1%' is not allowed to be linked in macOS") % path); return; -- cgit v1.2.3