diff options
author | B. Watson <urchlay@slackware.uk> | 2023-05-26 05:29:10 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2023-05-26 05:29:10 -0400 |
commit | 6b73a8f3ed73578260caf5aa05e381aa72709b4a (patch) | |
tree | 9869c8767346486e83e121e9499f558bb98af3a9 | |
parent | 021f7fca9d936870b20d648a1b6c0cf11ce2f709 (diff) | |
download | sbo-maintainer-tools-6b73a8f3ed73578260caf5aa05e381aa72709b4a.tar.gz |
sbolint: handle tarballs without dir name first.
-rwxr-xr-x | sbolint | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -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\//) { |