SBO::Lib::Pkgs(3)

NAME
SBO::Lib::Pkgs - Routines for interacting with the Slackware package database.

SYNOPSIS
  use SBO::Lib::Pkgs qw/ get_installed_packages /;

  my @installed_sbos = get_installed_packages('SBO');

VARIABLES

  $perl_pkg
The file name of the installed "perl" package.

  $ruby_pkg
The file name of the installed "ruby" package.

SUBROUTINES

  get_available_updates
  my @updates = @{ get_available_updates($label) };

get_available_updates() compares version and build number information for packages installed with the _SBo tag with the local repository. It takes a label: "VERS" for versions, "BUILD" for build numbers or "BOTH" for both. It returns an array reference to an array of hash references specifying package names, installed versions and available versions.

  get_inst_names
  my @names = get_inst_names(get_available_updates());

get_inst_names() returns a list of package names from an array reference, such as one returned by get_available_updates().

  get_installed_cpans
  my (@mods, @defective) = @{ get_installed_cpans() };

get_installed_cpans() returns an array reference to a list of Perl modules installed from the CPAN and a second array with installed modules that have missing files. Modules are only fully recognized as installed if all files in ".packlist" exist. This is used in sboinstall(1) and sboupgrade(1) to prevent conflicting installations from the CPAN and SlackBuilds; if the setting "CPAN_IGNORE" is "TRUE", users are updated but building may proceed.

  get_installed_packages
  my @packages = @{ get_installed_packages($type, $clear) };

get_installed_packages() returns an array reference to a list of installed packages matching the specified $type. The available types are "STD" for non-SBo packages, "SBO" for in-tree _SBo and _SBocompat32 packages, "DIRTY" for out-of-tree _SBo packages and "ALL" for all.

The returned array reference holds a list of hash references representing the names, versions, full installed package names and creation times of the returned packages.

The default behavior is to retain the package lists for future calls; add a true value to the arguments to clear them instead. This is irrelevant when running "sbotest".

The "perl" and "ruby" package file names are found at this time.

  get_local_outdated_versions
  my @outdated = get_local_outdated_versions($filter);

get_local_outdated_versions() checks installed SBo packages from "LOCAL_OVERRIDES". It returns an array with information about those that have version or build numbers differing from the local repository or the SlackBuild in "LOCAL_OVERRIDES".

This subroutine is used only by sbocheck(1).

  get_removed_builds
  my @removed = get_removed_builds();

get_removed_builds() returns an array of SlackBuild names and versions of all out-of-tree installed packages marked "_SBo".

This subroutine is used only by sbocheck(1).

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

  _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::Info(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.