aboutsummaryrefslogtreecommitdiff
path: root/sbolint
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-05-26 05:29:10 -0400
committerB. Watson <urchlay@slackware.uk>2023-05-26 05:29:10 -0400
commit6b73a8f3ed73578260caf5aa05e381aa72709b4a (patch)
tree9869c8767346486e83e121e9499f558bb98af3a9 /sbolint
parent021f7fca9d936870b20d648a1b6c0cf11ce2f709 (diff)
downloadsbo-maintainer-tools-6b73a8f3ed73578260caf5aa05e381aa72709b4a.tar.gz
sbolint: handle tarballs without dir name first.
Diffstat (limited to 'sbolint')
-rwxr-xr-xsbolint17
1 files 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\//) {