about summary refs log tree commit diff
path: root/src/normalise.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-08-01T15·06+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-08-01T15·06+0000
commitd99d04e6442dcc39a24cebac01af117ce00a5006 (patch)
treeb4282e68f6cca249791533306b93867f736df0d1 /src/normalise.cc
parent545145cd582cd80b857760ec11bb5a91b6271506 (diff)
* Defensive programming against POSIX locking idiocy.
* Simplified realiseSlice().

Diffstat (limited to 'src/normalise.cc')
-rw-r--r--src/normalise.cc25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/normalise.cc b/src/normalise.cc
index cc84b6541f39..2eb34d4ee2da 100644
--- a/src/normalise.cc
+++ b/src/normalise.cc
@@ -240,35 +240,10 @@ void realiseSlice(const FSId & id, FSIdSet pending)
     if (fs.type != FState::fsSlice)
         throw Error(format("expected slice in %1%") % (string) id);
     
-    /* Perhaps all paths already contain the right id? */
-
-    bool missing = false;
-    for (SliceElems::const_iterator i = fs.slice.elems.begin();
-         i != fs.slice.elems.end(); i++)
-    {
-        SliceElem elem = *i;
-        string id;
-        if (!nixDB.queryString(noTxn, dbPath2Id, elem.path, id)) {
-            if (pathExists(elem.path))
-                throw Error(format("path `%1%' obstructed") % elem.path);
-            missing = true;
-            break;
-        }
-        if (parseHash(id) != elem.id)
-            throw Error(format("path `%1%' obstructed") % elem.path);
-    }
-
-    if (!missing) {
-        debug(format("already installed"));
-        return;
-    }
-
-    /* For each element, expand its id at its path. */
     for (SliceElems::const_iterator i = fs.slice.elems.begin();
          i != fs.slice.elems.end(); i++)
     {
         SliceElem elem = *i;
-        debug(format("expanding %1% in `%2%'") % (string) elem.id % elem.path);
         expandId(elem.id, elem.path, "/", pending);
     }
 }