提交 ae1e354b 编写于 作者: M myeuler

add --nodeps to install & fix get_module_info ret info

上级 83cd3f67
...@@ -355,7 +355,13 @@ sub do_pkg_install($) { ...@@ -355,7 +355,13 @@ sub do_pkg_install($) {
my $bdir = catfile($_[0], $path); my $bdir = catfile($_[0], $path);
if (-e $bdir) { if (-e $bdir) {
$bdir = catfile($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($) { ...@@ -569,14 +575,14 @@ sub get_module_info($) {
$type=$1; $type=$1;
} else { } else {
warn "Failed to parse '$file', skipping...\n"; warn "Failed to parse '$file', skipping...\n";
next; return (1, $name, $version, $type, $file);
} }
} else { } else {
warn "Failed to parse '$file' or find a module by that name, skipping...\n"; warn "Failed to parse '$pkg' or find a module by that name, skipping...\n";
next; return (1, $name, $version, $type, $file);
} }
return ($name, $version, $type, $file); return (0, $name, $version, $type, $file);
} }
sub parse_archive_file($$) { sub parse_archive_file($$) {
...@@ -1027,8 +1033,14 @@ for my $pkg (@args) { ...@@ -1027,8 +1033,14 @@ for my $pkg (@args) {
# keep things happy if we get "Foo-Bar" instead of "Foo::Bar" # keep things happy if we get "Foo-Bar" instead of "Foo::Bar"
$pkg =~ s/-/::/g; $pkg =~ s/-/::/g;
my ($name,$version,$type, $file); my ($ret, $name,$version,$type, $file);
($name, $version, $type, $file) = get_module_info($pkg); ($ret, $name, $version, $type, $file) = get_module_info($pkg);
#
# ugly but easy&works
#
if ($ret == 1) {
next;
}
my $module=$name; my $module=$name;
$module=~s/-/::/g; $module=~s/-/::/g;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册