forked from lix-project/lix
refs/heads/sb/bb010g/libstore-mode
refs/heads/sb/bb010g/libstore-test-reproducibility
This commit is contained in:
commit
bd65dc4080
|
@ -691,13 +691,20 @@ static void canonicalisePathMetaData_(
|
|||
if ((eaSize = llistxattr(path.c_str(), eaBuf.data(), eaBuf.size())) < 0)
|
||||
throw SysError("querying extended attributes of '%s'", path);
|
||||
|
||||
if (S_ISREG(st.st_mode) || S_ISDIR(st.st_mode))
|
||||
bool resetMode = false;
|
||||
if ((S_ISREG(st.st_mode) || S_ISDIR(st.st_mode)) && !(st.st_mode & S_IWUSR)) {
|
||||
resetMode = true;
|
||||
chmod(path.c_str(), st.st_mode | S_IWUSR);
|
||||
}
|
||||
for (auto & eaName: tokenizeString<Strings>(std::string(eaBuf.data(), eaSize), std::string("\000", 1))) {
|
||||
if (settings.ignoredAcls.get().count(eaName)) continue;
|
||||
if (lremovexattr(path.c_str(), eaName.c_str()) == -1)
|
||||
throw SysError("removing extended attribute '%s' from '%s'", eaName, path);
|
||||
}
|
||||
if (resetMode) {
|
||||
chmod(path.c_str(), st.st_mode);
|
||||
resetMode = false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -285,11 +285,11 @@ nix build -o $TEST_ROOT/result $flake3Dir#sth --commit-lock-file
|
|||
|
||||
Flake lock file updates:
|
||||
|
||||
"?" Added input 'nonFlake':
|
||||
• Added input 'nonFlake':
|
||||
'git+file://"*"/flakes/flakes/nonFlake?ref=refs/heads/master&rev="*"' "*"
|
||||
"?" Added input 'nonFlakeFile':
|
||||
• Added input 'nonFlakeFile':
|
||||
'path:"*"/flakes/flakes/nonFlake/README.md?lastModified="*"&narHash=sha256-cPh6hp48IOdRxVV3xGd0PDgSxgzj5N/2cK0rMPNaR4o%3D' "*"
|
||||
"?" Added input 'nonFlakeFile2':
|
||||
• Added input 'nonFlakeFile2':
|
||||
'path:"*"/flakes/flakes/nonFlake/README.md?lastModified="*"&narHash=sha256-cPh6hp48IOdRxVV3xGd0PDgSxgzj5N/2cK0rMPNaR4o%3D' "* ]]
|
||||
|
||||
nix build -o $TEST_ROOT/result flake3#fnord
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <gtest/gtest.h>
|
||||
#include <gmock/gmock.h>
|
||||
|
||||
#include "globals.hh"
|
||||
#include "store-api.hh"
|
||||
|
||||
namespace nix {
|
||||
|
@ -11,6 +12,7 @@ namespace nix {
|
|||
class LibStoreTest : public ::testing::Test {
|
||||
public:
|
||||
static void SetUpTestSuite() {
|
||||
settings.nixConfDir = "/dev/null"; // intentionally invalid path
|
||||
initLibStore();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue