[paludis-commits] r4564 - in trunk: . doc/configuration paludis
dleverton at svn.pioto.org
dleverton at svn.pioto.org
Tue Apr 15 16:00:32 UTC 2008
Author: dleverton
Date: 2008-04-15 16:00:31 +0000 (Tue, 15 Apr 2008)
New Revision: 4564
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/doc/configuration/sets.html.part.in
trunk/paludis/set_file.cc
Log:
Support set names in .conf sets.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-04-13 17:57:41 UTC (rev 4563)
+++ trunk/ChangeLog 2008-04-15 16:00:31 UTC (rev 4564)
@@ -5,6 +5,10 @@
only listed in SVN log. For a summary of what has changed between releases,
see the NEWS file. This file is occasionally pruned to ChangeLog.old.bz2.
+2008-04-15 David Leverton
+
+ * paludis/, doc/configuration/: Support set names in .conf sets.
+
2008-04-13 David Leverton
* doc/overview/: Update manual configuration guide for new world
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2008-04-13 17:57:41 UTC (rev 4563)
+++ trunk/NEWS 2008-04-15 16:00:31 UTC (rev 4564)
@@ -10,6 +10,8 @@
works when the filesystem is mounted as a chroot as a seperate
directory.
+ * Set names can now be specified in .conf-style set files.
+
0.26.0_pre1:
* paludis now rebuilds the VDB names and provides caches
incrementally after each install and uninstall. This can give a
Modified: trunk/doc/configuration/sets.html.part.in
===================================================================
--- trunk/doc/configuration/sets.html.part.in 2008-04-13 17:57:41 UTC (rev 4563)
+++ trunk/doc/configuration/sets.html.part.in 2008-04-15 16:00:31 UTC (rev 4564)
@@ -42,14 +42,14 @@
</div>
<p>Each line in a user set file consists of an operator, followed by whitespace, followed by a package dependency
-specification. Permitted operators are:</p>
+specification or, for some operators, a set name. Permitted operators are:</p>
<dl>
<dt><code>*</code></dt>
- <dd>Indicates that the specification is part of the set.</dd>
+ <dd>Indicates that the specification or set name is part of the set.</dd>
<dt><code>?</code></dt>
<dd>Indicates that the specification is part of the set if and only if a package whose name is equal to the name
- part of the specification is installed.</dd>
+ part of the specification is installed. May not be used with a set name.</dd>
</dl>
Modified: trunk/paludis/set_file.cc
===================================================================
--- trunk/paludis/set_file.cc 2008-04-13 17:57:41 UTC (rev 4563)
+++ trunk/paludis/set_file.cc 2008-04-15 16:00:31 UTC (rev 4564)
@@ -185,23 +185,34 @@
{
Log::get_instance()->message(ll_warning, lc_context, "Line '" + stringify(line) +
"' should start with '?' or '*', assuming '*'");
+ tokens.insert(tokens.begin(), "*");
+ }
- tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(params.parser(tokens.at(0))));
- if (params.tag)
- spec->set_tag(params.tag);
- result->add(tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(
- new TreeLeaf<SetSpecTree, PackageDepSpec>(spec)));
- }
- else if ("*" == tokens.at(0))
+ if ("*" == tokens.at(0))
{
- tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(params.parser(tokens.at(1))));
- if (params.tag)
- spec->set_tag(params.tag);
- result->add(tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(
- new TreeLeaf<SetSpecTree, PackageDepSpec>(spec)));
+ if (std::string::npos == tokens.at(1).find('/'))
+ {
+ tr1::shared_ptr<NamedSetDepSpec> spec(new NamedSetDepSpec(SetName(tokens.at(1))));
+ result->add(tr1::shared_ptr<TreeLeaf<SetSpecTree, NamedSetDepSpec> >(
+ new TreeLeaf<SetSpecTree, NamedSetDepSpec>(spec)));
+ }
+ else
+ {
+ tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(params.parser(tokens.at(1))));
+ if (params.tag)
+ spec->set_tag(params.tag);
+ result->add(tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(
+ new TreeLeaf<SetSpecTree, PackageDepSpec>(spec)));
+ }
}
else if ("?" == tokens.at(0))
{
+ if (std::string::npos == tokens.at(1).find('/'))
+ {
+ Log::get_instance()->message(ll_warning, lc_context, "? operator may not be used with a set name");
+ return;
+ }
+
tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(params.parser(tokens.at(1))));
if (params.tag)
spec->set_tag(params.tag);
More information about the paludis-commits
mailing list