From be63c7bb20645c0e3ba0d3b3b0ac3ca8692fb237 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 25 Jan 2016 15:43:04 +0200 Subject: Don't enforce - form for user-supplied package directories --- bpkg/pkg-verify | 5 +++-- bpkg/pkg-verify.cxx | 24 +++++++++++++----------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/bpkg/pkg-verify b/bpkg/pkg-verify index 5e5527e..3eccf66 100644 --- a/bpkg/pkg-verify +++ b/bpkg/pkg-verify @@ -26,8 +26,9 @@ namespace bpkg bool ignore_unknown, bool diag = true); - // Similar to the above but verifies that a source directory is - // a valid package. + // Similar to the above but verifies that a source directory is a valid + // package. Note that it doesn't enforce the - form for the + // directory itself. // package_manifest pkg_verify (const dir_path& source, bool ignore_unknown, bool diag = true); diff --git a/bpkg/pkg-verify.cxx b/bpkg/pkg-verify.cxx index f2723a0..a76370d 100644 --- a/bpkg/pkg-verify.cxx +++ b/bpkg/pkg-verify.cxx @@ -177,18 +177,20 @@ namespace bpkg manifest_parser mp (ifs, mf.string ()); package_manifest m (mp, iu); - // Verify package directory is -. + // We used to verify package directory is - but it is + // not clear why we should enforce it in this case (i.e., the user + // provides us with a package directory). // - dir_path ed (m.name + "-" + m.version.string ()); - - if (d.leaf () != ed) - { - if (diag) - error << "invalid package directory name '" << d.leaf () << "'" << - info << "expected from manifest '" << ed << "'"; - - throw failed (); - } + // dir_path ed (m.name + "-" + m.version.string ()); + // + // if (d.leaf () != ed) + // { + // if (diag) + // error << "invalid package directory name '" << d.leaf () << "'" << + // info << "expected from manifest '" << ed << "'"; + // + // throw failed (); + // } return m; } -- cgit v1.1