Version 1.1.0
This commit is contained in:
parent
e3115ec498
commit
5bfd739b70
5 changed files with 16 additions and 3 deletions
2
.github/workflows/perltest.yml
vendored
2
.github/workflows/perltest.yml
vendored
|
@ -21,7 +21,7 @@ jobs:
|
||||||
perl: [ 'latest' ]
|
perl: [ 'latest' ]
|
||||||
name: Perl ${{ matrix.perl }} on ${{ matrix.os }}
|
name: Perl ${{ matrix.perl }} on ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Set up perl
|
- name: Set up perl
|
||||||
uses: shogo82148/actions-setup-perl@v1
|
uses: shogo82148/actions-setup-perl@v1
|
||||||
with:
|
with:
|
||||||
|
|
4
Changes
4
Changes
|
@ -1,3 +1,7 @@
|
||||||
|
2022-12-09 Dave Cross <dave@perlhacks.com>
|
||||||
|
|
||||||
|
* Support ExcludeArch, ExclusiveArch, ExcluseOS, ExclusiveOS
|
||||||
|
|
||||||
2021-01-23 Dave Cross <dave@perlhacks.com>
|
2021-01-23 Dave Cross <dave@perlhacks.com>
|
||||||
|
|
||||||
* Version 1.0.3
|
* Version 1.0.3
|
||||||
|
|
|
@ -7,7 +7,7 @@ use warnings;
|
||||||
use Carp;
|
use Carp;
|
||||||
use Moose;
|
use Moose;
|
||||||
|
|
||||||
our $VERSION = 'v1.0.3';
|
our $VERSION = 'v1.1.0';
|
||||||
|
|
||||||
has file => ( is => 'ro', isa => 'Str', required => 1 );
|
has file => ( is => 'ro', isa => 'Str', required => 1 );
|
||||||
has name => ( is => 'rw', isa => 'Str' );
|
has name => ( is => 'rw', isa => 'Str' );
|
||||||
|
@ -23,6 +23,8 @@ has buildroot => ( is => 'rw', isa => 'Str' );
|
||||||
has buildarch => ( is => 'rw', isa => 'Str' );
|
has buildarch => ( is => 'rw', isa => 'Str' );
|
||||||
has buildrequires => ( is => 'rw', isa => 'ArrayRef[Str]', default => sub { [] } );
|
has buildrequires => ( is => 'rw', isa => 'ArrayRef[Str]', default => sub { [] } );
|
||||||
has requires => ( is => 'rw', isa => 'ArrayRef[Str]', default => sub { [] } );
|
has requires => ( is => 'rw', isa => 'ArrayRef[Str]', default => sub { [] } );
|
||||||
|
has [ qw( excluderach exclusivearch excludeos exclusiveos ) ]
|
||||||
|
=> ( is => 'rw', isa => 'Str' );
|
||||||
|
|
||||||
has parse_spec => (
|
has parse_spec => (
|
||||||
is => 'ro',
|
is => 'ro',
|
||||||
|
@ -43,6 +45,10 @@ sub _build_parse_spec {
|
||||||
url => qr[^URL:\s*(\S+)],
|
url => qr[^URL:\s*(\S+)],
|
||||||
buildroot => qr[^BuildRoot:\s*(\S+)],
|
buildroot => qr[^BuildRoot:\s*(\S+)],
|
||||||
buildarch => qr[^BuildArch:\s*(\S+)],
|
buildarch => qr[^BuildArch:\s*(\S+)],
|
||||||
|
excludearch => qr[^ExcludeArch:\s*(\S+)],
|
||||||
|
exclusivearch => qr[^ExclusiveArch:\s*(\S+)],
|
||||||
|
excludeos => qr[^ExcludeOS:\s*(\S+)],
|
||||||
|
exclusiveos => qr[^ExclusiveOS:\s*(\S+)],
|
||||||
},
|
},
|
||||||
arrays => {
|
arrays => {
|
||||||
source => qr[^Source\d*:\s*(\S+)],
|
source => qr[^Source\d*:\s*(\S+)],
|
||||||
|
|
|
@ -12,6 +12,7 @@ BuildArch: noarch
|
||||||
BuildRequires: perl >= 1:5.6.0
|
BuildRequires: perl >= 1:5.6.0
|
||||||
BuildRequires: perl(Module::Build)
|
BuildRequires: perl(Module::Build)
|
||||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||||
|
ExclusiveArch: megaCPU
|
||||||
|
|
||||||
%description
|
%description
|
||||||
If you have two arrays and you want to know if they are the same or
|
If you have two arrays and you want to know if they are the same or
|
||||||
|
|
|
@ -17,11 +17,13 @@ is($spec->epoch, 1, 'Correct epoch');
|
||||||
is($spec->version, '1.16', 'Correct version');
|
is($spec->version, '1.16', 'Correct version');
|
||||||
$spec->version('1.17');
|
$spec->version('1.17');
|
||||||
is($spec->version, '1.17', 'Changed version correctly');
|
is($spec->version, '1.17', 'Changed version correctly');
|
||||||
is($spec->buildarch, 'noarch', 'Correct build arrchitecture');
|
is($spec->buildarch, 'noarch', 'Correct build architecture');
|
||||||
is(@{$spec->buildrequires}, 2, 'Correct number of build requirements');
|
is(@{$spec->buildrequires}, 2, 'Correct number of build requirements');
|
||||||
is($spec->buildrequires->[0], 'perl >= 1:5.6.0',
|
is($spec->buildrequires->[0], 'perl >= 1:5.6.0',
|
||||||
'First build requirement is correct');
|
'First build requirement is correct');
|
||||||
|
|
||||||
|
is($spec->exclusivearch, 'megaCPU', 'Correct exclusive architecture');
|
||||||
|
|
||||||
dies_ok { Parse::RPM::Spec->new }
|
dies_ok { Parse::RPM::Spec->new }
|
||||||
'No spec file given';
|
'No spec file given';
|
||||||
dies_ok { Parse::RPM::Spec->new( file => 'not-there') }
|
dies_ok { Parse::RPM::Spec->new( file => 'not-there') }
|
||||||
|
|
Loading…
Add table
Reference in a new issue