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