aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bpkg/pkg-verify5
-rw-r--r--bpkg/pkg-verify.cxx24
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 <name>-<version> 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 <name>-<version>.
+ // We used to verify package directory is <name>-<version> 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;
}