From 6b73a8f3ed73578260caf5aa05e381aa72709b4a Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 26 May 2023 05:29:10 -0400 Subject: sbolint: handle tarballs without dir name first. --- sbolint | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/sbolint b/sbolint index 406dd1e..0ecb3a3 100755 --- a/sbolint +++ b/sbolint @@ -537,13 +537,20 @@ sub check_tarball { return 0; } - if($list[0] ne "$buildname/") { - log_error("$file not a SBo-compliant tarball, first element should be '$buildname/', not '$list[0]'"); - return 0; - } + ### Used to do this: +# if($list[0] ne "$buildname/") { +# log_error("$file not a SBo-compliant tarball, first element should be '$buildname/', not '$list[0]'"); +# return 0; +# } + ### ...but it turns out some tools (file-roller) put the directory *last* + ### in the tarball. And furthermore, you can easily create a tarball + ### without the directory at all (try "tar cvf dir/*", there will be no + ### separate entry for dir/). There's nothing wrong with such tarballs, + ### tar can extract them just fine, so we allow them here. my $foundsb = 0; - shift @list; # 1st element is dirname/, we already checked it + ### shift @list; # 1st element is dirname/, we already checked it + for(@list) { my $bn = quotemeta($buildname); # some builds have + in the name if(not /^$bn\//) { -- cgit v1.2.3