diff options
-rw-r--r-- | brep/mod-repository-root.cxx | 11 | ||||
-rw-r--r-- | loader/loader.cxx | 4 |
2 files changed, 11 insertions, 4 deletions
diff --git a/brep/mod-repository-root.cxx b/brep/mod-repository-root.cxx index 7a49e89..d3bc8f5 100644 --- a/brep/mod-repository-root.cxx +++ b/brep/mod-repository-root.cxx @@ -169,9 +169,16 @@ namespace brep const string& n (*i++); // Package name. // Check if this is a package name and not a brep static content files - // (CSS) directory name or a repository directory name. + // (CSS) directory name, a repository directory name, or a special file + // name (the one starting with '.'). // - if (n != "@" && n.find_first_not_of ("0123456789") != string::npos) + // @@ Shouldn't we validate that the package name is not "@", is not + // digit-only, does not start with '.' while parsing and serializing + // the package manifest ? Probably also need to mention these + // contraints in the manifest.txt file. + // + if (n != "@" && n.find_first_not_of ("0123456789") != string::npos && + n[0] != '.') { if (i == lpath.end ()) { diff --git a/loader/loader.cxx b/loader/loader.cxx index 591660c..b1b7706 100644 --- a/loader/loader.cxx +++ b/loader/loader.cxx @@ -413,10 +413,10 @@ load_repositories (const shared_ptr<repository>& rp, database& db) { assert (rp->location.remote () && !rp->url); - rp->url = rm.effective_url (rp->location); - // Update the base repository with manifest values. // + rp->url = rm.effective_url (rp->location); + // @@ Should we throw if url is not available for external repository ? // Can, basically, repository be available on the web but have no web // interface associated ? |