]> git.openfabrics.org - ~aditr/build.git/commitdiff
ofed_info will print the list of the installed packages
authorVladimir Sokolovsky <vlad@mellanox.co.il>
Wed, 15 Sep 2010 11:23:55 +0000 (13:23 +0200)
committerVladimir Sokolovsky <vlad@mellanox.co.il>
Wed, 15 Sep 2010 11:25:38 +0000 (13:25 +0200)
Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.co.il>
build.pl

index d3cf07fca6ba9fcab60a7c0c5b184c70d5af960a..264165888f9082fcc0e735fb163a3e0691e6cea7 100755 (executable)
--- a/build.pl
+++ b/build.pl
@@ -297,13 +297,25 @@ sub get_from_git
                                open (IN, "$destdir/BUILD_ID") or die "Can't open $destdir/BUILD_ID file: $!\n";
                                seek IN,0,0;
                                my @file = <IN>;
+                               my $list_of_packages = 'kernel-ib';
                                open (OUT, "> ofed_info") or die "Can't open ofed_info file: $!\n";
                                print OUT "#!/bin/bash\n";
                                print OUT "cat << EOF\n";
                                foreach my $line (@file) {
                                        print OUT $line;
+                                       if ($line =~ /\:$/ and $line !~ /$distribution/) {
+                                               $line =~ s/://g;
+                                               chomp $line;
+                                               $list_of_packages .= " $line";
+                                       }
                                }
                                print OUT "EOF\n";
+                               print OUT "\necho\n";
+                               print OUT "echo Installed Packages:\n";
+                               print OUT "echo -------------------\n";
+                               $list_of_packages =~ s/\ /|/g;
+                               chomp $list_of_packages;
+                               print OUT "rpm -qa | grep -E \"$list_of_packages\"";
                                close OUT;
                                close IN;
                                chmod 0755, 'ofed_info';
@@ -583,6 +595,7 @@ for my $conf (<$CWD/$packages_dir/*.conf>) {
        }
 
        # Cleanup
+       chdir $tmpdir;
        for my $file (<$tmpdir/$package*>) {
                rmtree $file;
        }