[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] Trivial cleanup in generate_di_list



Here's a trivial cleanup I came across while playing in the tools/* directory... Seems to make the code every so slightly more readable, in my opinion...

Index: debian-cd/tools/generate_di_list
===================================================================
--- debian-cd/tools/generate_di_list    (revision 7422)
+++ debian-cd/tools/generate_di_list    (working copy)
@@ -36,13 +36,8 @@
       my @exclude = @common_excludes;
       push @exclude, read_exclude("exclude-udebs-$arch")
               if -e exclude_path("exclude-udebs-$arch");
-UDEB: foreach my $udeb (map { chomp; $_ } `zcat $packagefile | awk '/^Package:/ {print \$2}'`) {
-               foreach my $pattern (@exclude) {
-                       if ($udeb =~ /^$pattern$/) {
-                               next UDEB;
-                       }
-               }
-               print OUT "$udeb\n";
+ foreach my $udeb (map { chomp; $_ } `zcat $packagefile | awk '/^Package:/ {print \$2}'`) { + print OUT "$udeb\n" unless grep { $udeb =~ /^$_$/ } @exclude;
       }
       print OUT "#endif /* ARCH_$cpparch */\n";
}


--
Inbound and outbound email scanned for spam and viruses by the

DoubleCheck Email Manager: http://www.doublecheckemail.com


Reply to: