aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2014-09-17 20:20:58 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2014-09-17 20:20:58 +0100
commit26874646c0898d14d6b6e86b7e574c48b7895443 (patch)
tree8f166e6e1088af20d269d98dad21310acfb7269d
parente50565b501d2e1484a92b62c41ae9628d6a51b53 (diff)
downloadpaludis-26874646c0898d14d6b6e86b7e574c48b7895443.tar.gz
paludis-26874646c0898d14d6b6e86b7e574c48b7895443.tar.xz
Let installed-unpackaged repos override their names
-rw-r--r--doc/configuration/repositories/installed_unpackaged.html.part3
-rw-r--r--paludis/repositories/unpackaged/installed_repository.cc8
2 files changed, 9 insertions, 2 deletions
diff --git a/doc/configuration/repositories/installed_unpackaged.html.part b/doc/configuration/repositories/installed_unpackaged.html.part
index 8687e6e..a9d5a55 100644
--- a/doc/configuration/repositories/installed_unpackaged.html.part
+++ b/doc/configuration/repositories/installed_unpackaged.html.part
@@ -11,5 +11,8 @@ for <code>installed_unpackaged</code> format repositories:</p>
<dl>
<dt><code>location</code></dt>
<dd>The location of the repository. Mandatory.</dd>
+
+ <dt><code>name</code></dt>
+ <dd>Override the name of the repository.</dd>
</dl>
diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc
index 5ce7854..fb350bb 100644
--- a/paludis/repositories/unpackaged/installed_repository.cc
+++ b/paludis/repositories/unpackaged/installed_repository.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008, 2009, 2010, 2011, 2013 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009, 2010, 2011, 2013, 2014 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -435,7 +435,11 @@ InstalledUnpackagedRepository::repository_factory_create(
if (root.empty())
throw unpackaged_repositories::RepositoryConfigurationError("Key 'root' not specified or empty");
- return std::make_shared<InstalledUnpackagedRepository>(RepositoryName("installed-unpackaged"),
+ std::string name_str(f("name"));
+ if (name_str.empty())
+ name_str = "installed-unpackaged";
+
+ return std::make_shared<InstalledUnpackagedRepository>(RepositoryName(name_str),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
n::environment() = env,
n::location() = location,