aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-10-21 08:03:09 -0400
committerB. Watson <urchlay@slackware.uk>2026-10-21 08:03:09 -0400
commit3c29a36d311d381eb67c02490d98c2f564e75b33 (patch)
tree7981356678d9a9b30061df77bd42bc949ece7a40
parenta0d0014b7b39b89de96c82d360dcf488f59d949e (diff)
downloadgreypool-3c29a36d311d381eb67c02490d98c2f564e75b33.tar.gz
Tweak docs, show better module load failed messages.
-rwxr-xr-xgreypool63
1 files changed, 40 insertions, 23 deletions
diff --git a/greypool b/greypool
index 8a2b458..631305d 100755
--- a/greypool
+++ b/greypool
@@ -17,13 +17,26 @@ BEGIN {
eval { require JSON::PP; JSON::PP->import(); };
if($@) {
# should never happen on Slackware:
- die "$SELF: couldn't load either JSON::XS or JSON::PP\n";
+ warn "$SELF: couldn't load either JSON::XS or JSON::PP\n";
+ $modules_failed++;
}
}
+ eval { require Getopt::Long; Getopt::Long->import(); };
+ if($@) {
+ warn "$SELF: couldn't load Getopt::Long perl module\n";
+ $modules_failed++;
+ }
+ eval { require POSIX; POSIX->import('strftime') };
+ if($@) {
+ warn "$SELF: couldn't load POSIX perl module\n";
+ $modules_failed++;
+ }
+
+ if($modules_failed) {
+ die "$SELF: Failed to load required perl module(s)\n";
+ }
}
-use Getopt::Long;
-use POSIX 'strftime';
use feature 'unicode_strings';
$VERSION = "0.0.0";
@@ -795,8 +808,9 @@ tty device (e.g. not redirected to a file).
=item B<-m>, B<--mono> B<--no-color>, B<--no-colour>
-Do no colorize the output, even if stdout is a terminal. This also
-produces monochrome (unstyled) HTML pages, with the B<-h> / B<--html> option.
+Do not colorize the plain text output, even if stdout is a terminal.
+This also produces monochrome (unstyled) HTML pages, with the
+B<-h> / B<--html> option.
=item B<-C>, B<--config-dir> I<directory>
@@ -880,10 +894,10 @@ with spaces.
=over 4
-=item B<repo>
+=item B<repo> I<repository>
-Limit the search to one specific repository. This key is required,
-and there's no command-line option to override it.
+The repository this config file is for. This key is required, and
+there's no command-line option to override it.
This key can only have one value, and can only occur once in the
config file.
@@ -892,7 +906,7 @@ If you maintain packages for more than one distribution, you'll
have to create separate config directories for each one, and call
B<greypool> with the B<--config-dir> or B<-C> option.
-=item B<email>
+=item B<email> I<email-address>
The default email address to use, if one isn't provided on the
command line. This key can only have one value, and can only
@@ -906,7 +920,7 @@ Example:
email urchlay@slackware.uk
-=item B<ignore>
+=item B<ignore> I<package ...>
This key can have multiple values, and can occur multiple times. Use
it to list packages whose status you don't want to check. Examples would
@@ -927,7 +941,7 @@ Note that the above could also be written as:
ignore evince gst-plugins-bad-nonfree
-=item B<mask>
+=item B<mask> I<package> I<version ...>
This key can occur multiple times, and must have at least two values.
Use it to pretend a particular version of a project doesn't exist.
@@ -941,7 +955,7 @@ Multiple versions can be listed on one mask line:
mask somepackage 1.2 1.3 1.4
-=item B<transform>
+=item B<transform> I<package> I<substitution>
Sometimes, repology's version number for a project doesn't quite
match the version number you used for your package, even though
@@ -961,7 +975,7 @@ could insert any code you wanted to, which can cause all kinds of
problems. So don't do that unless you I<really> know what you're doing
and have a I<very> good reason for it.
-=item B<pkgurl>
+=item B<pkgurl> I<URL>
Optional. When generating HTML output, if this is set, the distro
package names in the HTML will be clickable links that go to the
@@ -973,7 +987,7 @@ Example:
pkgurl https://slackbuilds.org/repository/15.0/$NAME/
-=item B<include>
+=item B<include> I<file>
Include a config file, which will be parsed as though it occurred
inline in the current file. This can be useful for e.g. ignoring
@@ -987,21 +1001,24 @@ else it will be treated as relative to the config directory.
=head2 Required Perl Modules
+B<greypool> requires the B<POSIX>, B<Getopt::Long>, and either the
+B<JSON::PP> or B<JSON::XS> modules.
+
+B<JSON::XS> is highly recommended. It runs about 20 times as fast as
+B<JSON::PP>. However, either will work.
+
If you get this error message on startup:
- greypool: couldn't load either JSON::XS or JSON::PP
+ greypool: Failed to load required perl module(s)
-...then you should install your OS's package for the JSON::XS perl module.
-On Slackware, this is B<perl-JSON-XS> from SlackBuilds.org. For other
-distributions, repology.org will tell you:
+...you'll have to install the missing modules. Depending on your
+distribution, some or all of the modules may be bundled with the main
+perl package, or you may have to install them separately. B<POSIX>
+usually is bundled. For the others, see:
https://repology.org/project/perl%3Ajson-xs/versions
-You will also need the B<POSIX> perl module, which is usually bundled
-with the main perl package, and the B<Getopt::Long> module which
-is bundled on some distributions. See:
-
- https://repology.org/projects/?search=perl%3Agetopt-long
+ https://repology.org/project/perl%3Agetopt-long/versions
=head2 External Binaries