From ae1e354bf4e226eeb4be3f7b4292d9ad4cf4ae98 Mon Sep 17 00:00:00 2001 From: myeuler Date: Wed, 10 Jun 2020 09:10:30 +0000 Subject: [PATCH 1/2] add --nodeps to install & fix get_module_info ret info --- perlporter | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/perlporter b/perlporter index 92a62d7..c5a5e19 100755 --- a/perlporter +++ b/perlporter @@ -355,7 +355,13 @@ sub do_pkg_install($) { my $bdir = catfile($_[0], $path); if (-e $bdir) { $bdir = catfile($bdir, "*"); - system("rpm", "-ivh", $bdir); + # + # Try to install without deps, that can help system to avoid + # circle build + # + if (system("rpm", "-ivh", "--nodeps", $bdir) != 0) { + print "install $bdir package failed" + } } } } @@ -569,14 +575,14 @@ sub get_module_info($) { $type=$1; } else { warn "Failed to parse '$file', skipping...\n"; - next; + return (1, $name, $version, $type, $file); } } else { - warn "Failed to parse '$file' or find a module by that name, skipping...\n"; - next; + warn "Failed to parse '$pkg' or find a module by that name, skipping...\n"; + return (1, $name, $version, $type, $file); } - return ($name, $version, $type, $file); + return (0, $name, $version, $type, $file); } sub parse_archive_file($$) { @@ -1027,8 +1033,14 @@ for my $pkg (@args) { # keep things happy if we get "Foo-Bar" instead of "Foo::Bar" $pkg =~ s/-/::/g; - my ($name,$version,$type, $file); - ($name, $version, $type, $file) = get_module_info($pkg); + my ($ret, $name,$version,$type, $file); + ($ret, $name, $version, $type, $file) = get_module_info($pkg); + # + # ugly but easy&works + # + if ($ret == 1) { + next; + } my $module=$name; $module=~s/-/::/g; -- Gitee From 109335f9c1410bc9f36b1708955754b832552f3c Mon Sep 17 00:00:00 2001 From: myeuler Date: Thu, 11 Jun 2020 07:26:02 +0000 Subject: [PATCH 2/2] add usr/lib64 usr/lib into spec creation --- perlporter | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/perlporter b/perlporter index c5a5e19..a5f4091 100755 --- a/perlporter +++ b/perlporter @@ -926,6 +926,12 @@ fi if [ -d usr/sbin ];then find usr/bin -type f -printf "/\%h/\%f\\n" >> filelist.lst fi +if [ -d usr/lib64 ];then + find usr/lib64 -type f -printf "/\%h/\%f\\n" >> filelist.lst +fi +if [ -d usr/lib ];then + find usr/lib -type f -printf "/\%h/\%f\\n" >> filelist.lst +fi popd mv \%{buildroot}/filelist.lst . END -- Gitee