aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/cmd-profiles.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcmd/cmd-profiles.hh')
-rw-r--r--src/libcmd/cmd-profiles.hh6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libcmd/cmd-profiles.hh b/src/libcmd/cmd-profiles.hh
index 7f2c8a76f..2185daa34 100644
--- a/src/libcmd/cmd-profiles.hh
+++ b/src/libcmd/cmd-profiles.hh
@@ -35,7 +35,6 @@ constexpr int DEFAULT_PRIORITY = 5;
struct ProfileElement
{
StorePathSet storePaths;
- std::string name;
std::optional<ProfileElementSource> source;
bool active = true;
int priority = DEFAULT_PRIORITY;
@@ -57,7 +56,7 @@ struct ProfileElement
struct ProfileManifest
{
- std::vector<ProfileElement> elements;
+ std::map<std::string, ProfileElement> elements;
ProfileManifest() { }
@@ -67,6 +66,9 @@ struct ProfileManifest
StorePath build(ref<Store> store);
+ void addElement(std::string_view nameCandidate, ProfileElement element);
+ void addElement(ProfileElement element);
+
static void printDiff(const ProfileManifest & prev, const ProfileManifest & cur, std::string_view indent);
};