forked from lix-project/lix
libcmd: Installable::toStorePaths -> Installable::toStorePathSet
This commit is contained in:
parent
8e64cd59b0
commit
5ed1884875
|
@ -715,7 +715,7 @@ BuiltPaths Installable::toBuiltPaths(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StorePathSet Installable::toStorePaths(
|
StorePathSet Installable::toStorePathSet(
|
||||||
ref<Store> evalStore,
|
ref<Store> evalStore,
|
||||||
ref<Store> store,
|
ref<Store> store,
|
||||||
Realise mode, OperateOn operateOn,
|
Realise mode, OperateOn operateOn,
|
||||||
|
@ -735,7 +735,7 @@ StorePath Installable::toStorePath(
|
||||||
Realise mode, OperateOn operateOn,
|
Realise mode, OperateOn operateOn,
|
||||||
ref<Installable> installable)
|
ref<Installable> installable)
|
||||||
{
|
{
|
||||||
auto paths = toStorePaths(evalStore, store, mode, operateOn, {installable});
|
auto paths = toStorePathSet(evalStore, store, mode, operateOn, {installable});
|
||||||
|
|
||||||
if (paths.size() != 1)
|
if (paths.size() != 1)
|
||||||
throw Error("argument '%s' should evaluate to one store path", installable->what());
|
throw Error("argument '%s' should evaluate to one store path", installable->what());
|
||||||
|
|
|
@ -165,7 +165,7 @@ struct Installable
|
||||||
const Installables & installables,
|
const Installables & installables,
|
||||||
BuildMode bMode = bmNormal);
|
BuildMode bMode = bmNormal);
|
||||||
|
|
||||||
static std::set<StorePath> toStorePaths(
|
static std::set<StorePath> toStorePathSet(
|
||||||
ref<Store> evalStore,
|
ref<Store> evalStore,
|
||||||
ref<Store> store,
|
ref<Store> store,
|
||||||
Realise mode,
|
Realise mode,
|
||||||
|
|
|
@ -376,7 +376,7 @@ struct Common : InstallableCommand, MixProfile
|
||||||
for (auto & [installable_, dir_] : redirects) {
|
for (auto & [installable_, dir_] : redirects) {
|
||||||
auto dir = absPath(dir_);
|
auto dir = absPath(dir_);
|
||||||
auto installable = parseInstallable(store, installable_);
|
auto installable = parseInstallable(store, installable_);
|
||||||
auto builtPaths = Installable::toStorePaths(
|
auto builtPaths = Installable::toStorePathSet(
|
||||||
getEvalStore(), store, Realise::Nothing, OperateOn::Output, {installable});
|
getEvalStore(), store, Realise::Nothing, OperateOn::Output, {installable});
|
||||||
for (auto & path: builtPaths) {
|
for (auto & path: builtPaths) {
|
||||||
auto from = store->printStorePath(path);
|
auto from = store->printStorePath(path);
|
||||||
|
@ -631,7 +631,7 @@ struct CmdDevelop : Common, MixEnvironment
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
for (auto & path : Installable::toStorePaths(getEvalStore(), store, Realise::Outputs, OperateOn::Output, {bashInstallable})) {
|
for (auto & path : Installable::toStorePathSet(getEvalStore(), store, Realise::Outputs, OperateOn::Output, {bashInstallable})) {
|
||||||
auto s = store->printStorePath(path) + "/bin/bash";
|
auto s = store->printStorePath(path) + "/bin/bash";
|
||||||
if (pathExists(s)) {
|
if (pathExists(s)) {
|
||||||
shell = s;
|
shell = s;
|
||||||
|
|
Loading…
Reference in a new issue