mirror of
https://github.com/NixOS/nix
synced 2025-07-07 22:33:57 +02:00
* Nix 0.8 maintenance branch.
This commit is contained in:
commit
20cb2d80c6
4 changed files with 10 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
||||||
AC_INIT(nix, "0.9")
|
AC_INIT(nix, "0.8")
|
||||||
AC_CONFIG_SRCDIR(README)
|
AC_CONFIG_SRCDIR(README)
|
||||||
AC_CONFIG_AUX_DIR(config)
|
AC_CONFIG_AUX_DIR(config)
|
||||||
AM_INIT_AUTOMAKE
|
AM_INIT_AUTOMAKE
|
||||||
|
|
|
@ -76,7 +76,7 @@ addToQueue $targetPath;
|
||||||
|
|
||||||
sub isValidPath {
|
sub isValidPath {
|
||||||
my $p = shift;
|
my $p = shift;
|
||||||
system "@bindir@/nix-store --check-validity '$p' 2> /dev/null";
|
system "@bindir@/nix-store --isvalid '$p' 2> /dev/null";
|
||||||
return $? == 0;
|
return $? == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -237,10 +237,10 @@ foreach my $p (keys %dstOutPaths) {
|
||||||
$ratio = 1 / $ratio if $ratio < 1;
|
$ratio = 1 / $ratio if $ratio < 1;
|
||||||
print " USE $srcUses $dstUses $ratio $q\n";
|
print " USE $srcUses $dstUses $ratio $q\n";
|
||||||
|
|
||||||
# if ($ratio >= 2) {
|
if ($ratio >= 2) {
|
||||||
# print " SKIPPING $q due to use ratio $ratio ($srcUses $dstUses)\n";
|
print " SKIPPING $q due to use ratio $ratio ($srcUses $dstUses)\n";
|
||||||
# next;
|
next;
|
||||||
# }
|
}
|
||||||
|
|
||||||
# If there are multiple matching names, include the ones
|
# If there are multiple matching names, include the ones
|
||||||
# with the closest version numbers.
|
# with the closest version numbers.
|
||||||
|
|
|
@ -737,10 +737,10 @@ void deleteFromStore(const Path & _path)
|
||||||
Transaction txn(nixDB);
|
Transaction txn(nixDB);
|
||||||
if (isValidPathTxn(txn, path)) {
|
if (isValidPathTxn(txn, path)) {
|
||||||
PathSet referers = getReferers(txn, path);
|
PathSet referers = getReferers(txn, path);
|
||||||
for (PathSet::iterator i = referers.begin();
|
if (referers.size() > 1 ||
|
||||||
i != referers.end(); ++i)
|
(referers.size() == 1 &&
|
||||||
if (*i != path && isValidPathTxn(txn, *i))
|
*referers.begin() != path))
|
||||||
throw Error(format("cannot delete path `%1%' because it is in use by path `%2%'") % path % *i);
|
throw Error(format("cannot delete path `%1%' because it is in use") % path);
|
||||||
invalidatePath(txn, path);
|
invalidatePath(txn, path);
|
||||||
}
|
}
|
||||||
txn.commit();
|
txn.commit();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue