]> git.openfabrics.org - ~aditr/build.git/commitdiff
build.pl: Updated ofed_info
authorVladimir Sokolovsky <vlad@mellanox.com>
Sun, 2 Nov 2014 15:23:24 +0000 (17:23 +0200)
committerVladimir Sokolovsky <vlad@mellanox.com>
Sun, 2 Nov 2014 15:23:24 +0000 (17:23 +0200)
Make sure linux is not in the list of the installed packages printed by ofed_info

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
build.pl

index 6b80789a061a8fd2910ae9f2551ac98d8425cc9a..7090f5033b3c6054a518e0bd8e5be67a12d50ad3 100755 (executable)
--- a/build.pl
+++ b/build.pl
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# Copyright (c) 2012 Mellanox Technologies. All rights reserved.
+# Copyright (c) 2014 Mellanox Technologies. All rights reserved.
 #
 # This Software is licensed under one of the following licenses:
 #
@@ -262,7 +262,7 @@ sub get_from_git
                $ref = $packages{$name}{'linux_git_branch'};
                ex "$GIT checkout $ref";
                update_build_id($name, "linux:\n$packages{$name}{'linux_git_url'} $packages{$name}{'linux_git_branch'}\n" . `git log -1 | head -1`);
-               
+
                # Get compat sub-tree
                rmtree $tmpdir . '/' . "compat";
                mkpath $tmpdir . '/' . "compat";
@@ -384,7 +384,7 @@ 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';
+                               my $list_of_packages = 'compat-rdma';
                                open (OUT, "> ofed_info") or die "Can't open ofed_info file: $!\n";
                                print OUT "#!/bin/bash\n";
                                my $firstline = <@file>;
@@ -392,6 +392,7 @@ sub get_from_git
                                print OUT "cat << EOF\n";
                                foreach my $line (@file) {
                                        print OUT $line;
+                                       next if ($line =~ /compat|linux/);
                                        if ($line =~ /\:$/ and $line !~ /$distribution/) {
                                                $line =~ s/://g;
                                                chomp $line;
@@ -590,7 +591,7 @@ if (not -d "$CWD/$packages_dir") {
 }
 
 if ($build_release) {
-       $release = $distribution . 
+       $release = $distribution .
                                '.' . (split '-',$version)[0];
        if ((split '-',$version)[1]) {
                $release .= '.' . (split '-',$version)[1];
@@ -668,9 +669,9 @@ for my $conf (<$CWD/$packages_dir/*.conf>) {
 
        my $mypid = fork();
        die "Failed to fork: $!" if not defined $mypid;
-   
+
        $info{$package}{pid} = $mypid;
-   
+
        if ( not $mypid ) {
                if ($packages{$package}{'local_srpm'}) {
                        if (-d $packages{$package}{'local_srpm'}) {