Compare commits

...

10 Commits

Author SHA1 Message Date
Eelco Dolstra
e044ccb67c Merge pull request #6112 from NixOS/backport-6110-to-2.6-maintenance
[Backport 2.6-maintenance] Create daemon-socket folder during install
2022-02-17 13:07:37 +01:00
Guillaume Maudoux
d0632f4c48 Create to daemon-socket folder during install
(cherry picked from commit 1bec333788)
2022-02-17 12:00:38 +00:00
Eelco Dolstra
573b3aab66 Bump version 2022-02-15 11:31:58 +01:00
pennae
5d00dc9d67 fix nix repl not overriding existing bindings in :a
previously :a would override old bindings of a name with new values if the added
set contained names that were already bound. in nix 2.6 this doesn't happen any
more, which is potentially confusing.

fixes #6041

(cherry picked from commit 1daf1babf9)
2022-02-07 10:58:10 +01:00
Eelco Dolstra
bda64b4b65 Fix 'basic_string::_M_construct null not valid' in interrupted download
Fixes #5985.

(cherry picked from commit 97e02c23bd)
2022-02-07 10:55:04 +01:00
Eelco Dolstra
a07ecbc548 Merge pull request #6039 from andersk/2.6-slash
[2.6] canonPath: fix missing slash when resolving links
2022-02-06 13:18:12 +01:00
Will Dietz
32a7724c22 canonPath: fix missing slash when resolving links
Fixes #6017

(cherry picked from commit a0357abda7)
2022-02-03 17:10:04 -08:00
Eelco Dolstra
45ed4e6178 Merge pull request #5986 from NixOS/backport-5984-to-2.6-maintenance
[Backport 2.6-maintenance] Fix parsing of variable names that are a suffix of '__curPos'
2022-01-25 11:59:12 +01:00
regnat
21c23031c1 Fix parsing of variable names that are a suffix of '__curPos'
Follow-up from #5969
Fix #5982

(cherry picked from commit f113ea6c73)
2022-01-25 10:54:24 +00:00
Eelco Dolstra
a1cd7e5860 Mark official release 2022-01-25 00:13:54 +01:00
11 changed files with 41 additions and 12 deletions

View File

@@ -1 +1 @@
2.6.0
2.6.1

View File

@@ -71,7 +71,6 @@
- [Hacking](contributing/hacking.md)
- [CLI guideline](contributing/cli-guideline.md)
- [Release Notes](release-notes/release-notes.md)
- [Release X.Y (202?-??-??)](release-notes/rl-next.md)
- [Release 2.6 (2022-01-24)](release-notes/rl-2.6.md)
- [Release 2.5 (2021-12-13)](release-notes/rl-2.5.md)
- [Release 2.4 (2021-11-01)](release-notes/rl-2.4.md)

View File

@@ -15,7 +15,7 @@
then ""
else "pre${builtins.substring 0 8 (self.lastModifiedDate or self.lastModified or "19700101")}_${self.shortRev or "dirty"}";
officialRelease = false;
officialRelease = true;
linux64BitSystems = [ "x86_64-linux" "aarch64-linux" ];
linuxSystems = linux64BitSystems ++ [ "i686-linux" ];

View File

@@ -590,7 +590,7 @@ create_directories() {
"$get_chr_own" -R "root:$NIX_BUILD_GROUP_NAME" "$NIX_ROOT" || true
fi
_sudo "to make the basic directory structure of Nix (part 1)" \
install -dv -m 0755 /nix /nix/var /nix/var/log /nix/var/log/nix /nix/var/log/nix/drvs /nix/var/nix{,/db,/gcroots,/profiles,/temproots,/userpool} /nix/var/nix/{gcroots,profiles}/per-user
install -dv -m 0755 /nix /nix/var /nix/var/log /nix/var/log/nix /nix/var/log/nix/drvs /nix/var/nix{,/db,/gcroots,/profiles,/temproots,/userpool,/daemon-socket} /nix/var/nix/{gcroots,profiles}/per-user
_sudo "to make the basic directory structure of Nix (part 2)" \
install -dv -g "$NIX_BUILD_GROUP_NAME" -m 1775 /nix/store

View File

@@ -364,15 +364,19 @@ struct StaticEnv
void sort()
{
std::sort(vars.begin(), vars.end(),
std::stable_sort(vars.begin(), vars.end(),
[](const Vars::value_type & a, const Vars::value_type & b) { return a.first < b.first; });
}
void deduplicate()
{
const auto last = std::unique(vars.begin(), vars.end(),
[] (const Vars::value_type & a, const Vars::value_type & b) { return a.first == b.first; });
vars.erase(last, vars.end());
auto it = vars.begin(), jt = it, end = vars.end();
while (jt != end) {
*it = *jt++;
while (jt != end && it->first == jt->first) *it = *jt++;
it++;
}
vars.erase(it, end);
}
Vars::const_iterator find(const Symbol & name) const

View File

@@ -405,7 +405,7 @@ expr_select
expr_simple
: ID {
std::string_view s = "__curPos";
if (strncmp($1.p, s.data(), s.size()) == 0)
if ($1.l == s.size() && strncmp($1.p, s.data(), s.size()) == 0)
$$ = new ExprPos(CUR_POS);
else
$$ = new ExprVar(CUR_POS, data->symbols.create($1));

View File

@@ -128,7 +128,7 @@ struct curlFileTransfer : public FileTransfer
if (requestHeaders) curl_slist_free_all(requestHeaders);
try {
if (!done)
fail(FileTransferError(Interrupted, nullptr, "download of '%s' was interrupted", request.uri));
fail(FileTransferError(Interrupted, {}, "download of '%s' was interrupted", request.uri));
} catch (...) {
ignoreException();
}
@@ -704,7 +704,7 @@ struct curlFileTransfer : public FileTransfer
auto s3Res = s3Helper.getObject(bucketName, key);
FileTransferResult res;
if (!s3Res.data)
throw FileTransferError(NotFound, nullptr, "S3 object '%s' does not exist", request.uri);
throw FileTransferError(NotFound, {}, "S3 object '%s' does not exist", request.uri);
res.data = std::move(*s3Res.data);
callback(std::move(res));
#else

View File

@@ -147,7 +147,7 @@ Path canonPath(PathView path, bool resolveSymlinks)
path = {};
} else {
s += path.substr(0, slash);
path = path.substr(slash + 1);
path = path.substr(slash);
}
/* If s points to a symlink, resolve it and continue from there */

View File

@@ -0,0 +1 @@
3

View File

@@ -0,0 +1,2 @@
((__curPosFoo: __curPosFoo) 1) + ((__curPosBar: __curPosBar) 2)

View File

@@ -40,3 +40,26 @@ testRepl () {
testRepl
# Same thing (kind-of), but with a remote store.
testRepl --store "$TEST_ROOT/store?real=$NIX_STORE_DIR"
testReplResponse () {
local response="$(nix repl <<< "$1")"
echo "$response" | grep -qs "$2" \
|| fail "repl command set:
$1
does not respond with:
$2
but with:
$response"
}
# :a uses the newest version of a symbol
testReplResponse '
:a { a = "1"; }
:a { a = "2"; }
"result: ${a}"
' "result: 2"