Request: allow project names and repo links not match
Closed this issue · 4 comments
Hi there - I was working on packing my netstring implementation for opm.
My repository is named 'netstring.lua', here: https://github.com/jprjr/netstring.lua, and here's my dist.ini:
name = netstring
version = 1.0.2
abstract = Implementation of DJB's netstring for lua
author = John Regan
is_original = yes
license = mit
repo_link = https://github.com/jprjr/netstring.lua.git
main_module = src/netstring.lua
requires = luajit
opm gives me an error because the repo_link doesn't match the name of the package.
I'd prefer not to rename my repository, is there some way to let opm allow mis-matched project/repo names?
@jprjr Will you please try out the following one-line patch for the opm script on your side?
diff --git a/bin/opm b/bin/opm
index 6345c0f..a03a29e 100755
--- a/bin/opm
+++ b/bin/opm
@@ -279,7 +279,7 @@ sub do_build ($) {
my $user = $1;
my $proj = $2;
- if ($proj ne $dist_name) {
+ if ($proj !~ /\Q$dist_name\E/i && $dist_name !~ /\Q$proj\E/i) {
err "$dist_file: project \"$proj\" in repo_link ",
"\"$repo_link\" does not match name \"$dist_name\".\n";
}
Please let me know if it works for you. Thanks!
@agentzh It works great, I was able to build the project without any problems.
I'm not able to upload (I get a 500 error), not sure if that's related.
@jprjr The patch was not applied on the server side, obviously :)
Thanks for the feedback! I've committed the patch above to the git repository and also applied to the opm server. Please try again.
Looks like it worked - thanks!!