aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-11-24 14:47:32 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-11-24 14:47:32 +0000
commit4473da308dcc3e6d69420eda86d07fb7b23b18e6 (patch)
treedfb929543fb635f2e3a872a59df9d27bbaeda506
parent98b8136f9e9374dac4cf860c0a1e504c6ec7ff3e (diff)
downloadpaludis-4473da308dcc3e6d69420eda86d07fb7b23b18e6.tar.gz
paludis-4473da308dcc3e6d69420eda86d07fb7b23b18e6.tar.xz
{keywords,use,licenses}.conf can now contain single- or double- quoted tokens.
-rw-r--r--NEWS3
-rw-r--r--doc/configuration/keywords.html.part.in2
-rw-r--r--doc/configuration/licenses.html.part.in3
-rw-r--r--doc/configuration/use.html.part.in2
-rw-r--r--paludis/environments/paludis/keywords_conf.cc2
-rw-r--r--paludis/environments/paludis/licenses_conf.cc2
-rw-r--r--paludis/environments/paludis/mirrors_conf.cc2
-rw-r--r--paludis/environments/paludis/paludis_environment_TEST.cc1
-rwxr-xr-xpaludis/environments/paludis/paludis_environment_TEST_setup.sh10
-rw-r--r--paludis/environments/paludis/use_conf.cc2
10 files changed, 20 insertions, 9 deletions
diff --git a/NEWS b/NEWS
index 178424b..3040abf 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,9 @@ trunk/:
* paludis, inquisitio --show-authors.
+ * {keywords,licenses,use}.conf can now contain single- or double- quoted
+ tokens.
+
0.26.0_alpha4:
* STILL BROKEN, wait for 0.26.0 if you use these: CRAN, Ruby bindings for
dep specs.
diff --git a/doc/configuration/keywords.html.part.in b/doc/configuration/keywords.html.part.in
index f729671..cf4a7bc 100644
--- a/doc/configuration/keywords.html.part.in
+++ b/doc/configuration/keywords.html.part.in
@@ -18,6 +18,8 @@ any of:</p>
<li>A complex dependency specification.</li>
</ul>
+<p>Any token may be quoted using either single or double quotes.</p>
+
<p>Accepted keywords are one of:</p>
<ul>
diff --git a/doc/configuration/licenses.html.part.in b/doc/configuration/licenses.html.part.in
index 4a2e332..b161fc7 100644
--- a/doc/configuration/licenses.html.part.in
+++ b/doc/configuration/licenses.html.part.in
@@ -32,6 +32,9 @@ any of:</p>
<li><code>*</code>, which accepts all licenses.</li>
</ul>
+<p>Any token may be quoted using either single or double quotes. Note that CRAN repository entries can use spaces in
+license names, so quoting would be required to explicitly accept those licenses.</p>
+
<p>License settings are cumulative. To <em>only</em> accept listed licenses for a given spec, include <code>-*</code> in
the symbols list.</p>
diff --git a/doc/configuration/use.html.part.in b/doc/configuration/use.html.part.in
index 5e009ab..3e7e907 100644
--- a/doc/configuration/use.html.part.in
+++ b/doc/configuration/use.html.part.in
@@ -18,6 +18,8 @@ any of:</p>
<li>A complex dependency specification.</li>
</ul>
+<p>Any token may be quoted using either single or double quotes.</p>
+
<p>A use flag or label can be:</p>
<ul>
diff --git a/paludis/environments/paludis/keywords_conf.cc b/paludis/environments/paludis/keywords_conf.cc
index d0b33cc..b3c399f 100644
--- a/paludis/environments/paludis/keywords_conf.cc
+++ b/paludis/environments/paludis/keywords_conf.cc
@@ -90,7 +90,7 @@ KeywordsConf::add(const FSEntry & filename)
line != line_end ; ++line)
{
std::vector<std::string> tokens;
- tokenise_whitespace(*line, std::back_inserter(tokens));
+ tokenise_whitespace_quoted(*line, std::back_inserter(tokens));
if (tokens.size() < 2)
continue;
diff --git a/paludis/environments/paludis/licenses_conf.cc b/paludis/environments/paludis/licenses_conf.cc
index 14a61f6..111a995 100644
--- a/paludis/environments/paludis/licenses_conf.cc
+++ b/paludis/environments/paludis/licenses_conf.cc
@@ -89,7 +89,7 @@ LicensesConf::add(const FSEntry & filename)
line != line_end ; ++line)
{
std::vector<std::string> tokens;
- tokenise_whitespace(*line, std::back_inserter(tokens));
+ tokenise_whitespace_quoted(*line, std::back_inserter(tokens));
if (tokens.size() < 2)
continue;
diff --git a/paludis/environments/paludis/mirrors_conf.cc b/paludis/environments/paludis/mirrors_conf.cc
index 1ab8a27..c141f8f 100644
--- a/paludis/environments/paludis/mirrors_conf.cc
+++ b/paludis/environments/paludis/mirrors_conf.cc
@@ -75,7 +75,7 @@ MirrorsConf::add(const FSEntry & filename)
line != line_end ; ++line)
{
std::vector<std::string> tokens;
- tokenise_whitespace(*line, std::back_inserter(tokens));
+ tokenise_whitespace_quoted(*line, std::back_inserter(tokens));
if (tokens.size() < 2)
continue;
diff --git a/paludis/environments/paludis/paludis_environment_TEST.cc b/paludis/environments/paludis/paludis_environment_TEST.cc
index 92d7c4c..a1b01ab 100644
--- a/paludis/environments/paludis/paludis_environment_TEST.cc
+++ b/paludis/environments/paludis/paludis_environment_TEST.cc
@@ -52,6 +52,7 @@ namespace test_cases
TEST_CHECK(env->query_use(UseFlagName("foo"), *one));
TEST_CHECK(! env->query_use(UseFlagName("foofoo"), *one));
TEST_CHECK(env->query_use(UseFlagName("moo"), *one));
+ TEST_CHECK(env->query_use(UseFlagName("quoted-name"), *one));
TEST_CHECK(env->query_use(UseFlagName("more_exp_one"), *one));
TEST_CHECK(env->query_use(UseFlagName("exp_two"), *one));
diff --git a/paludis/environments/paludis/paludis_environment_TEST_setup.sh b/paludis/environments/paludis/paludis_environment_TEST_setup.sh
index 7c39a64..0a2fd1b 100755
--- a/paludis/environments/paludis/paludis_environment_TEST_setup.sh
+++ b/paludis/environments/paludis/paludis_environment_TEST_setup.sh
@@ -60,15 +60,15 @@ touch sixthrepo/cat-one/pkg-one/pkg-one-1.ebuild || exit 4
mkdir -p home1/.paludis/repositories
cat <<END > home1/.paludis/use.conf
-*/* foo bar baz -fnord
+*/* foo bar baz -fnord "quoted-name"
*/* EXP: two
>=cat-one/pkg-two-2 THIRD_EXP: two
END
cat <<END > home1/.paludis/keywords.conf
-*/* keyword
+*/* keyword "quoted-keyword"
END
cat <<END > home1/.paludis/licenses.conf
-*/* keyword
+*/* keyword "quoted keyword"
END
cat <<END > home1/.paludis/repositories/foo.conf
format = ebuild
@@ -80,7 +80,7 @@ END
mkdir -p home2/.paludis/repositories
cat <<END > home2/.paludis/use.conf
-*/* -* foo bar baz -fnord
+*/* -* foo bar baz -fnord "quoted-name"
*/* EXP: -* two
>=cat-one/pkg-two-2 THIRD_EXP: -* two
END
@@ -100,7 +100,7 @@ END
mkdir -p home3/.paludis/repositories
cat <<END > home3/.paludis/use.conf
-*/* foo bar baz -fnord
+*/* foo bar baz -fnord "-quoted-name"
*/* EXP: -* two
>=cat-one/pkg-two-2 THIRD_EXP: -* two
END
diff --git a/paludis/environments/paludis/use_conf.cc b/paludis/environments/paludis/use_conf.cc
index 6a5f270..7d0d1cc 100644
--- a/paludis/environments/paludis/use_conf.cc
+++ b/paludis/environments/paludis/use_conf.cc
@@ -91,7 +91,7 @@ UseConf::add(const FSEntry & filename)
line != line_end ; ++line)
{
std::vector<std::string> tokens;
- tokenise_whitespace(*line, std::back_inserter(tokens));
+ tokenise_whitespace_quoted(*line, std::back_inserter(tokens));
if (tokens.size() < 2)
continue;