diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2008-08-02 12:54:35 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2008-08-02 12:54:35 +0000 |
commit | 3c92ea399d717dc45b3fa91424c0dadc0239ebf2 (patch) | |
tree | 7cde9f533a6ee575615da5452e04c05dc0939f02 /src/libstore/store-api.hh | |
parent | fc691e1cbdcddb8c553cba06d4089bc1b60e3d98 (diff) |
* Make nix-env --dry-run print the paths to be substituted correctly
again. (After the previous substituter mechanism refactoring I
didn't update the code that obtains the references of substitutable
paths.) This required some refactoring: the substituter programs
are now kept running and receive/respond to info requests via
stdin/stdout.
Diffstat (limited to 'src/libstore/store-api.hh')
-rw-r--r-- | src/libstore/store-api.hh | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index b2a2dc7a5..9645237e0 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -88,6 +88,14 @@ struct GCResults }; +struct SubstitutablePathInfo +{ + Path deriver; + PathSet references; + unsigned long long downloadSize; /* 0 = unknown or inapplicable */ +}; + + class StoreAPI { public: @@ -117,12 +125,13 @@ public: no deriver has been set. */ virtual Path queryDeriver(const Path & path) = 0; - /* Query the set of substitutable paths. */ - virtual PathSet querySubstitutablePaths() = 0; + /* Query whether a path has substitutes. */ + virtual bool hasSubstitutes(const Path & path) = 0; - /* More efficient variant if we just want to know if a path has - substitutes. */ - virtual bool hasSubstitutes(const Path & path); + /* Query the references, deriver and download size of a + substitutable path. */ + virtual bool querySubstitutablePathInfo(const Path & path, + SubstitutablePathInfo & info) = 0; /* Copy the contents of a path to the store and register the validity the resulting path. The resulting path is returned. |