summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pm/MGATools/rpmsrate.pm19
1 files changed, 12 insertions, 7 deletions
diff --git a/pm/MGATools/rpmsrate.pm b/pm/MGATools/rpmsrate.pm
index 0eee957..c325e5f 100644
--- a/pm/MGATools/rpmsrate.pm
+++ b/pm/MGATools/rpmsrate.pm
@@ -201,13 +201,18 @@ sub cleanrpmsrate {
my ($d) = /(.*)-[^-]+/;
my ($a, $b, $e, $do);
- if ((!member($flags[0], @plain_flags) && s/(-devel)// ? ($b = "-devel") : /^$kernel_like/) && (($rpms{$_}) || (defined $rpms{"lib$_"} and $a = "lib") || (defined $rpms{"lib64$_"} and $a = "lib64") || (s/^lib(.*?)[_-]*[\d._]*(-.*)?$/$1$2/g && defined $rpms{"lib64$_"} and $a = 'lib64'))) {
- $e = $rpms{"$a$_"}[1] . $rpms{"$a$_"}[0] . $rpms{"$a$_"}[2] . $b;
- $do = 1;
- } elsif ((!member($flags[0], @plain_flags) && /^$rpmsrate_dkms_like$/ && $rpms{"$1$2"})) {
- $e = "$1-" . $rpms{"$1$2"}[0] . $2;
- $do = 1;
- }
+ if (!member($flags[0], @plain_flags)) {
+ if ((s/(-devel)// ? ($b = "-devel") : /^$kernel_like/) &&
+ ($rpms{$_} || (defined $rpms{"lib$_"} and $a = "lib") || (defined $rpms{"lib64$_"} and $a = "lib64")
+ || (s/^lib(.*?)[_-]*[\d._]*(-.*)?$/$1$2/g && defined $rpms{"lib64$_"} and $a = 'lib64'))) {
+ $e = $rpms{"$a$_"}[1] . $rpms{"$a$_"}[0] . $rpms{"$a$_"}[2] . $b;
+ $do = 1;
+ } elsif (/^$rpmsrate_dkms_like$/ && $rpms{"$1$2"}) {
+ $e = "$1-" . $rpms{"$1$2"}[0] . $2;
+ $do = 1;
+ }
+
+ }
if ($do) {
$keyword{$c} = $e;