SBO::Lib::Info(3)

NAME
SBO::Lib::Info - Utilities to get data from SBo info files.

SYNOPSIS
  use SBO::Lib::Info qw/ get_reqs /;

  my @reqs = @{ get_requires($sbo) };

SUBROUTINES

  check_x32
  my $bool = check_x32($location);

check_x32() returns a true value if the SlackBuild in $location considers 64-bit builds "UNTESTED" or "UNSUPPORTED" and false otherwise.

  check_x64
  my $bool = check_x64($location);

check_x64() returns a true value if the SlackBuild in $location considers 32-bit builds "UNTESTED" or "UNSUPPORTED" and false otherwise.

  clear_info_store
  clear_info_store();

clear_info_store() clears the info store so that new values can be retrieved. Due to the potential performance impact, it should run only when operations must span changes to the local repository, which can happen in sbotool(1). There is no useful return value.

  fix_info
  my $fixed_string = fix_info($info_string);

fix_info() sanitizes the contents of info files, and should be run once when a parse_info() call fails. It attempts to repair trailing whitespace, blank lines, garbage lines and missing quotation marks and backslashes.

  get_download_info
  my $downloads = get_download_info(LOCATION => $location, X64 => $x64);
  my $downloads = get_download_info(LOCATION => $location);

get_download_info() reads in an info file from $location. The flag $x64 determines whether the 64-bit download files should be used or not. $x64 defaults to a true value if unspecified.

This subroutine returns a hashref where each key is a download link; the corresponding value is the expected md5sum.

  get_from_info
  my $data = get_from_info(LOCATION => $location, GET => $key);

get_from_info() retrieves the information under $key from the info file in $location. If the wanted information has already been found, it is returned immediately.

  get_orig_build_number
  my $build = get_orig_build_number($sbo);

get_orig_build_number() returns the build number in the SlackBuilds.org tree for the given $sbo, calling get_sbo_build_number().

  get_orig_version
  my $ver = get_orig_version($sbo);

get_orig_version() returns the version in the SlackBuilds.org tree for the given $sbo, calling get_sbo_version().

This subroutine is used only by sbocheck(1).

  get_requires
  my $reqs = get_requires($sbo);

get_requires() returns the requirements for a given $sbo.

  get_reverse_reqs
  my %required_by = get_reverse_reqs($slackbuilds);

get_reverse_reqs() takes a list of SlackBuilds and returns a hashref with reverse dependencies among them. $slackbuilds should ordinarily be a list of all installed scripts.

  get_sbo_build_number
  my $build = get_sbo_build_number($location);

get_sbo_build_number() returns the build number found in the SlackBuild in $location.

  get_sbo_version
  my $ver = get_sbo_version($location);

get_sbo_version() returns the version found in the info file in $location.

  is_orphaned
  my $bool = is_orphaned($sbo)

is_orphaned() checks whether the given $sbo (or, for "compat32", the base script) has been marked as an orphaned build upstream. The return value is true if it is, and false if it is not.

  ineligible_compat
  my $msg = ineligible_compat($location);

ineligible_compat() takes a script's location and returns a diagnostic message if it is ineligible for a "compat32" package. "noarch", Perl-based and one-architecture scripts are all ineligible.

  parse_info
  my %parse = parse_info($str);

parse_info() parses the contents of an info file from $str and returns a key-value list of all values present.

In case of failure, use fix_info() on the offending file and try again.

EXIT CODES
Info.pm subroutines can return the following exit codes:

  _ERR_USAGE         1   usage errors
  _ERR_SCRIPT        2   script or module bug
  _ERR_OPENFH        6   failure to open file handles

SEE ALSO
SBO::Lib(3), SBO::Lib::Build(3), SBO::Lib::Download(3), SBO::Lib::Pkgs(3), SBO::Lib::Readme(3), SBO::Lib::Repo(3), SBO::Lib::Solibs(3), SBO::Lib::Tree(3), SBO::Lib::Util(3)

AUTHORS
SBO::Lib was originally written by Jacob Pipkin <jacob.pipkin@icloud.com> with contributions from Luke Williams <xocel@iquidus.org> and Andreas Guldstrand <andreas.guldstrand@gmail.com>.

MAINTAINER
SBO::Lib is maintained by K. Eugene Carlson <kvngncrlsn@gmail.com>.

LICENSE
The sbotools are licensed under the MIT License.

Copyright (C) 2012-2017, Jacob Pipkin, Luke Williams, Andreas Guldstrand.

Copyright (C) 2024-2026, K. Eugene Carlson.

Copyright (C) 2026, K. Eugene Carlson, Jacob Pipkin.