aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2007-01-24 23:52:46 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2007-01-24 23:52:46 +0000
commit38d7c18a8eebdf44b310a43bec0efb1df96d5040 (patch)
tree2b51bdff238ff165f11508ef263c0f4a3bfa54bb
parent4abe18bf219b542226a2d02186257e14ce861fbe (diff)
downloadpaludis-38d7c18a8eebdf44b310a43bec0efb1df96d5040.tar.gz
paludis-38d7c18a8eebdf44b310a43bec0efb1df96d5040.tar.xz
Recognise -darcs packages as SCM.
-rw-r--r--paludis/dep_list/dep_list.cc4
-rw-r--r--paludis/dep_list/dep_list_TEST.cc7
2 files changed, 9 insertions, 2 deletions
diff --git a/paludis/dep_list/dep_list.cc b/paludis/dep_list/dep_list.cc
index 1e8213b..956323c 100644
--- a/paludis/dep_list/dep_list.cc
+++ b/paludis/dep_list/dep_list.cc
@@ -1297,6 +1297,10 @@ namespace
return false;
default:
+ if (0 == pkg.compare(pkg.length() - 6, 6, "-darcs"))
+ return true;
+
+ case 5:
if (0 == pkg.compare(pkg.length() - 5, 5, "-live"))
return true;
diff --git a/paludis/dep_list/dep_list_TEST.cc b/paludis/dep_list/dep_list_TEST.cc
index 713af8d..76e954e 100644
--- a/paludis/dep_list/dep_list_TEST.cc
+++ b/paludis/dep_list/dep_list_TEST.cc
@@ -1480,12 +1480,13 @@ namespace test_cases
FakeRepository::Pointer repo(new FakeRepository(&env, RepositoryName("repo")));
env.package_database()->add_repository(repo);
repo->add_version("cat", "zero", "1")->deps.build_depend_string =
- "( cat/one cat/two cat/three-live cat/four-cvs cat/five-svn )";
+ "( cat/one cat/two cat/three-live cat/four-cvs cat/five-svn cat/six-darcs )";
repo->add_version("cat", "one", "scm");
repo->add_version("cat", "two", "2");
repo->add_version("cat", "three-live", "0");
repo->add_version("cat", "four-cvs", "0");
repo->add_version("cat", "five-svn", "0");
+ repo->add_version("cat", "six-darcs", "0");
FakeInstalledRepository::Pointer installed_repo(
new FakeInstalledRepository(&env, RepositoryName("installed_repo")));
@@ -1495,12 +1496,14 @@ namespace test_cases
installed_repo->add_version("cat", "three-live", "0");
installed_repo->add_version("cat", "four-cvs", "0");
installed_repo->add_version("cat", "five-svn", "0");
+ installed_repo->add_version("cat", "six-darcs", "0");
DepList d1(&env, DepListOptions());
d1.options()->reinstall_scm = dl_reinstall_scm_always;
d1.add(PortageDepParser::parse("cat/zero"));
TEST_CHECK_EQUAL(join(d1.begin(), d1.end(), " "), "cat/one-scm:0::repo cat/two-2:0::installed_repo "
- "cat/three-live-0:0::repo cat/four-cvs-0:0::repo cat/five-svn-0:0::repo cat/zero-1:0::repo");
+ "cat/three-live-0:0::repo cat/four-cvs-0:0::repo cat/five-svn-0:0::repo cat/six-darcs-0:0::repo "
+ "cat/zero-1:0::repo");
}
} test_dep_list_upgrade_reinstall_scm;
}