Fedora:...oviders(3)
π NAME π
Fedora::Rebuild::Providers β it's a reverse cache for RPM provides, bestie. That's the whole vibe.
(this one lives in the Fedora section of the User Contributed Perl Documentation pages, and yeah the header squishes the name to Fedora:...oviders(3) because man pages are dramatic like that π
)
β¨ SYNOPSIS β¨
okay so here's how you actually use this thing, no cap:
# Prepare a package
use threads::shared;
use Fedora::Rebuild::Package;
my $package = Fedora::Rebuild::Package->new(...);
$package->provides(shared_clone(...));
# Create a cache
use Fedora::Rebuild::Providers;
my $providers = Fedora::Rebuild::Providers->new();
# Insert the package into the cache
$providers->insert($package);
# Query the cache for package providing 'x' of any version
use Fedora::Rebuild::RPM;
my @found = $providers->what_provides(
'x', Fedora::Rebuild::RPM::ANY, ''
);
periodt. that's the whole flow: build a package, make a cache, yeet the package in, ask who provides what. π«Ά
πΈ DESCRIPTION πΈ
This is a reverse cache for RPM package provides, fr fr. You insert a whole bunch of packages that have their provides all populated, and then later you can just ask it: okay but which packages provide this given RPM symbol? and it tells you. iconic behaviour honestly.
heads up bestie: objects of this class are not threads-shared. like, not at all. don't try it. π
π CONSTRUCTOR π
new
There are no constructor arguments at all, super low maintenance. A brand new object comes with an empty providers thing. it's giving blank slate, main character energy. β¨
π¦ READ ONLY ACCESSORS π¦
providers
This is a mapping from RPM provides β‘οΈ binary packages that provide them. Concretely, it's a reference to a hash of binary package provides names. The hash format is literally this, character for character:
{ NAME1 => [
[FLAG1, VERSION1, SOURCENAME1, BINARYRPM1],
[FLAG1, VERSION1, SOURCENAME1, BINARYRPM2],
[FLAG1, VERSION1, SOURCENAME2, BINARYRPM2],
[FLAG2, VERSION2, SOURCENAME1, BINARYRPM1],
],
NAME2 => [
...
],
...
}
be ware β the same provided symbol can be provided by more packages. so like, don't assume it's a one-to-one thing, because it absolutely is not. π
π METHODS π
insert($package)
Copies all the providers of $package into the object. And $package here is a Fedora::Rebuild::Package object, so bring the right type or it's not gonna slay. π
what_provides($name, $flag, $version)
Query the object: which packages provide the given ($name, $flag, $version) triplet? that's the question, and this is the answer. π₯
$nameis a string$flagis a binary field ofFedora::Rebuild::RPMversion qualifiers β like, for example,"Fedora::Rebuild::RPM::EQUAL|Fedora::Rebuild::RPM::GREATER"(yes, pipe them together, that's the move)$versionis a string
The return value is an array of packages that satisfy the symbol. That array is a list of refences to pairs, like so:
(
[ SOURCE_PACKAGE1, BINARY_PACKAGE1 ],
[ SOURCE_PACKAGE2, BINARY_PACKAGE2 ],
...
)
so real talk about the ordering, because this trips people up: the second element is the binary package name, and the first element is the source package of that binary package, expressed as a Fedora::Rebuild::Package object. first is source, second is binary. got it? got it. π
and that's the whole page, bestie!! π β π
this one came from perl v5.42.0 and it's dated 2025-07-25 β so go forth, cache your provides, and be the reverse-lookup icon you were always meant to be. π§ π π π«Ά
π¦ where this page comes from
- fedora 43: perl-Fedora-Rebuild 0.12.1-36.fc43 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms