diff options
author | Florian Pritz <bluewind@xinu.at> | 2018-11-18 23:33:14 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2018-11-18 23:33:14 +0100 |
commit | e93e80dede905b653e35b8bb4e8f31f0c58719bd (patch) | |
tree | 75bf928f77b16b20722c35cf0418286c2c23269e /script | |
parent | fd9ce6c0c8b3d7b8816e80bffee436c50eb7cbb9 (diff) | |
download | App-ArchLinux-PackagerTools-e93e80dede905b653e35b8bb4e8f31f0c58719bd.tar.gz App-ArchLinux-PackagerTools-e93e80dede905b653e35b8bb4e8f31f0c58719bd.tar.xz |
Implement basic check for upgradable packages
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'script')
-rwxr-xr-x | script/perlpkg.pl | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/script/perlpkg.pl b/script/perlpkg.pl new file mode 100755 index 0000000..7bfff3a --- /dev/null +++ b/script/perlpkg.pl @@ -0,0 +1,65 @@ +#!/usr/bin/env perl + +use v5.24; + +use warnings; +use strict; + +use Function::Parameters; +use Log::Any::Adapter; +use Log::Log4perl qw(:easy); +use Path::Tiny; +use TOML qw(from_toml); + +use App::ArchLinux::PackagerTools; + +=head1 NAME + +perlpkg.pl - Script to support perl packaging on Arch Linux + +=head1 SYNOPSIS + + perlpkg.pl [options] + + Options: + --debug + +=head1 DESCRIPTION + +TODO + +=head1 CONFIGURATION + +To configure the script create a file called $XDG_CONFIG_HOME/perlpkg/config.toml. + +The configuration file is not yet used/read. + +TODO + +=head1 SEE ALSO + +L<App::ArchLinux::PackagerTools> + +=cut + +#my $config = from_toml(path(($ENV{XDG_CONFIG_HOME} // $ENV{HOME}."/.config")."/perlpkg/config.toml")->slurp); + +Log::Log4perl->easy_init($ERROR); +if ($ARGV[0] // "" eq "--debug") { + Log::Log4perl->easy_init($TRACE); +} else { + Log::Log4perl->easy_init($INFO); +} +Log::Any::Adapter->set('Log4perl'); + +my $app = App::ArchLinux::PackagerTools->new(); + +use Data::Dumper; +my $dists = $app->get_distributions_in_repo(); +my $dist_names = [map {$_->{dist_name}} $dists->@*]; +print Dumper($app->get_updateable_packages($dist_names)); + +# TODO fetch maintainer from archweb +# TODO generate new pacakge pkgbuild +# TODO build +# TODO release |