aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-05-22 07:38:17 +0000
committerThierry Vignaud <tv@mageia.org>2013-05-22 07:38:17 +0000
commit02c3aea379f913d279ede829bfe5cdb23aa5605b (patch)
treec15e10c58da171e875ed3456c1ec28f541942dc5
parent3afc68e1bc9cdd740be5036dc83c1c1a18675b08 (diff)
downloadrelease-02c3aea379f913d279ede829bfe5cdb23aa5605b.tar
release-02c3aea379f913d279ede829bfe5cdb23aa5605b.tar.gz
release-02c3aea379f913d279ede829bfe5cdb23aa5605b.tar.bz2
release-02c3aea379f913d279ede829bfe5cdb23aa5605b.tar.xz
release-02c3aea379f913d279ede829bfe5cdb23aa5605b.zip
simplify, also slightly faster
-rwxr-xr-xrename-rpm-group4
1 files changed, 1 insertions, 3 deletions
diff --git a/rename-rpm-group b/rename-rpm-group
index b5ad8df..363bf88 100755
--- a/rename-rpm-group
+++ b/rename-rpm-group
@@ -33,8 +33,7 @@ sub get_packages_by_group {
}
my %res;
- $urpm->traverse(sub {
- if ($_[0]->group eq $groupname) {
+ $urpm->traverse_tag('group', [ $groupname ], sub {
my $name;
if ($_[0]->sourcerpm) {
$name = $_[0]->sourcerpm;
@@ -43,7 +42,6 @@ sub get_packages_by_group {
$name = $_[0]->name;
}
$res{$name} = 1;
- }
});
keys %res;