1Fedora::Rebuild::ProvidUesresr(3C)ontributed Perl DocumeFnetdaotriao:n:Rebuild::Providers(3)
2
3
4

NAME

6       Fedora::Rebuild::Providers - Reverse cache for RPM provides
7

SYNOPSIS

9           # Prepare a package
10           use threads::shared;
11           use Fedora::Rebuild::Package;
12           my $package = Fedora::Rebuild::Package->new(...);
13           $package->provides(shared_clone(...));
14
15           # Create a cache
16           use Fedora::Rebuild::Providers;
17           my $providers = Fedora::Rebuild::Providers->new();
18
19           # Insert the package into the cache
20           $providers->insert($package);
21
22           # Query the cache for package providing 'x' of any version
23           use Fedora::Rebuild::RPM;
24           my @found = $providers->what_provides(
25               'x', Fedora::Rebuild::RPM::ANY, ''
26           );
27

DESCRIPTION

29       This is reverse cache for RPM package provides. You can instert many
30       packages with populated provides and then you can ask which packages
31       provide given RPM symbol.
32
33       Objects of this class are not threads-shared.
34

Constructor

36   new
37       There are no constructor arguments. New object has empty providers.
38

Read only accessors

40   providers
41       This is a mapping from RPM provides to binary packages providing them.
42       This is a reference to hash of binary package provides names.  Hash
43       format is:
44
45           { NAME1 => [
46                 [FLAG1, VERSION1, SOURCENAME1, BINARYRPM1],
47                 [FLAG1, VERSION1, SOURCENAME1, BINARYRPM2],
48                 [FLAG1, VERSION1, SOURCENAME2, BINARYRPM2],
49                 [FLAG2, VERSION2, SOURCENAME1, BINARYRPM1],
50             ],
51             NAME2 => [
52                 ...
53             ],
54             ...
55           }
56
57       Be ware the same provided symbol can be provided by more packages.
58

Methods

60   insert($package)
61       Copy all providers of a $package into the object. $package is
62       Fedora::Rebuild::Package object.
63
64   what_provides($name, $flag, $version)
65       Query the object which packages provide given ($name, $flag, $version)
66       triplet.
67
68       The $name is a string, the $flag is binary field of
69       Fedora::Rebuild::RPM version qualifiers (e.g.
70       "Fedora::Rebuild::RPM::EQUAL|Fedora::Rebuild::RPM::GREATER"), the
71       $version is a string.
72
73       The return value is an array of packages which satisfy the symbol. The
74       array is list of refences to pairs:
75
76           (
77               [ SOURCE_PACKAGE1, BINARY_PACKAGE1 ],
78               [ SOURCE_PACKAGE2, BINARY_PACKAGE2 ],
79               ...
80           )
81
82       Second element is the binary package name, first element is source
83       package of the binary package expressed as a Fedora::Rebuild::Package
84       object.
85
86
87
88perl v5.28.2                      2014-05-23     Fedora::Rebuild::Providers(3)
Impressum