Merge pull request #8 from davorg/7-issue-with-method-name-excludearch

7 issue with method name excludearch
This commit is contained in:
Dave Cross 2023-01-13 10:49:22 +00:00 committed by GitHub
commit 623e7fc65c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View file

@ -23,7 +23,7 @@ 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 ) ] has [ qw( excludearch exclusivearch excludeos exclusiveos ) ]
=> ( is => 'rw', isa => 'Str' ); => ( is => 'rw', isa => 'Str' );
has parse_spec => ( has parse_spec => (

View file

@ -13,6 +13,7 @@ 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 ExclusiveArch: megaCPU
ExcludeArch: crapCPU
%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

View file

@ -23,6 +23,7 @@ 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'); is($spec->exclusivearch, 'megaCPU', 'Correct exclusive architecture');
is($spec->excludearch, 'crapCPU', 'Correct excluded architecture');
dies_ok { Parse::RPM::Spec->new } dies_ok { Parse::RPM::Spec->new }
'No spec file given'; 'No spec file given';