blob: d36d1c2d12bf1fa1cd150bfca71f484bf40cf3eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
# NAME
App::ArchLinux::PackagerTools - It's new $module
# SYNOPSIS
use App::ArchLinux::PackagerTools;
# DESCRIPTION
App::ArchLinux::PackagerTools is ...
# METHODS
## Constructors
### new
App::ArchLinux::PackagerTools->new();
Returns a new instance.
### get\_distributions\_in\_repo
my $dists = $app->get_distributions_in_repo();
Return an arrayref of hashrefs with CPAN distribution information. See
["get\_perl\_distributions" in App::ArchLinux::PackagerTools::Pacman](https://metacpan.org/pod/App::ArchLinux::PackagerTools::Pacman#get_perl_distributions).
### get\_updateable\_packages
my $distribution_names = ['App::ArchLinux::PackagerTools', 'DBI'];
my $packages = $app->get_updateable_packages($distribution_names);
print $packages->[0]->{dist_name};
print $packages->[0]->{pkgname};
print $packages->[0]->{repo_version};
print $packages->[0]->{cpan_version};
Accepts a list of package names and returns a list of packages that can be
updated. The returned packages contain the name of the distribution, the name
of the pacman package, and the versions of each, the pacman package (which is
older) and the CPAN distribution.
### get\_maintainers
my $maintainers = $app->get_maintainers($pkgname);
Accepts a package name and returns the maintainers of the package.
### add\_maintainers
my $packages = $app->get_updateable_packages($distribution_names);
my $packages_with_maintainer = $app->add_maintainers($packages);
print $packages_with_maintainer->[0]->{maintainers}->[0]->{name};
Accepts a list of packages (hashes with the pkgname key) and returns a list
with the maintainer key added to each package.
### filter\_by\_maintainer
my $filtered_packages = $app->filter_by_maintainer($packages);
Filter a list of packages to the maintainers whitelisted in the config file.
### get\_filtered\_updateable\_packages
my $pkgs = $app->get_filtered_updateable_packages();
High-level method that returns a list of packages from the repository that have
updates available. The list is filtered to only include packages of allowed
maintainers.
# LICENSE
Copyright (C) 2018 Florian Pritz <bluewind@xinu.at>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
# AUTHOR
Florian Pritz <bluewind@xinu.at>
|