diff options
-rwxr-xr-x | sbosrcarch | 25 |
1 files changed, 14 insertions, 11 deletions
@@ -148,10 +148,14 @@ Checks the integrity and coverage of the archive. Reports at least these conditi - files present in only one of by-name or by-md5 but not the other - extraneous files in the tree - generates a status report, giving the total size and coverage. + - lists all SlackBuilds not covered by the archive. Will not modify the archive in any way, but might recommend fixes. -With -v, lists all SlackBuilds not covered by the archive. +With -v, lists all extraneous files: those that are present in the +archive, but not mentioned in any .info files. These are usually older +versions of the source, left over when the build was updated and the +new sources added to the archive. <check> is quite I/O and CPU intensive, as it must read and md5sum every file in the archive. @@ -393,6 +397,7 @@ our (%whitehash, %blackhash, $use_bwlist); our @whitelist = (); our @blacklist = (); our $quickcheck; # used by check_mode() and its *wanted helpers +our $verbosecheck; our %infofilecount; our %parsedinfo; @@ -1565,7 +1570,7 @@ sub check_byname_wanted { my $info = join("/", $sbogitdir, $category, $prgnam, $prgnam . ".info"); if(!-f $info) { - print "$shortname extraneous: no info file for $category/$prgnam\n"; + print "$shortname extraneous: no info file for $category/$prgnam\n" if $verbosecheck; $filecount--; return; } @@ -1598,7 +1603,7 @@ sub check_byname_wanted { if($foundfile) { $infofilecount{"$category/$prgnam"}--; } else { - print "$shortname extraneous: not mentioned in $info (sbosrcarch purge)\n"; + print "$shortname extraneous: not mentioned in $info (sbosrcarch purge)\n" if $verbosecheck; $filecount--; } @@ -1679,7 +1684,7 @@ sub check_info_wanted { sub check_mode { $quickcheck = shift; # 1 = don't md5sum stuff shift @ARGV; - my $verbose = ($ARGV[0] && $ARGV[0] =~ /^-*v(?:erbose)?$/); + $verbosecheck = ($ARGV[0] && $ARGV[0] =~ /^-*v(?:erbose)?$/); $use_bwlist = 1; init_git(); @@ -1703,13 +1708,11 @@ sub check_mode { push @missingfilebuilds, $_ if $count; } - if($verbose) { - if(@missingfilebuilds) { - print "Following SlackBuilds are missing files:\n"; - print " $_\n" for sort { $a cmp $b } @missingfilebuilds; - } else { - print "All SlackBuild download files present\n"; - } + if(@missingfilebuilds) { + print "Following SlackBuilds are missing files:\n"; + print " $_\n" for sort { $a cmp $b } @missingfilebuilds; + } else { + print "All SlackBuild download files present\n"; } if($symlinkcount && $hardlinkcount) { |