aboutsummaryrefslogtreecommitdiff
path: root/sbosrcarch
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2018-06-24 21:49:03 -0400
committerB. Watson <yalhcru@gmail.com>2018-06-24 21:49:03 -0400
commit3917f1b9d1601e80d047372eedc8a9ebe957dd5e (patch)
tree4ad3ab08dfb53d9eb4123c5b99ac92af80ac5abb /sbosrcarch
parent2f72e25c492be3c9c9fc5d6f099013e3a3ae1f7c (diff)
downloadsbostuff-3917f1b9d1601e80d047372eedc8a9ebe957dd5e.tar.gz
sbosrcarch: make the check/status -v flag more useful
Diffstat (limited to 'sbosrcarch')
-rwxr-xr-xsbosrcarch25
1 files changed, 14 insertions, 11 deletions
diff --git a/sbosrcarch b/sbosrcarch
index 4a2bd25..fe78d09 100755
--- a/sbosrcarch
+++ b/sbosrcarch
@@ -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) {