[ewg] [PATCH] Installer: fix build of rnfs-utils on ia64 and i386

Yossi Etigin yosefe at voltaire.com
Thu Apr 23 12:51:33 PDT 2009


  Make rnfs-utils on ia64 and i386 look for libblkid.so in /usr/lib instead 
of /usr/lib64. Also use some variables and make the script shorter.

Signed-off-by: Yosef Etigin <yosefe at voltaire.com>

---

diff --git a/install.pl b/install.pl
index 3bb7b33..f2b9542 100755
--- a/install.pl
+++ b/install.pl
@@ -2652,19 +2652,14 @@ sub check_linux_dependencies
                         $err++;
                     }
                 }
-                if ($arch =~ m/powerpc|ppc64/ and not -e "/usr/lib/libblkid.so") {
-                    if ($kernel =~ m/2.6.2[6-7]/ and $distro eq "SuSE") {
-                        print RED "libblkid-devel-32bit is required to build rnfs-utils.", RESET "\n";
-                    } else {
-                        print RED "e2fsprogs-devel-32bit is required to build rnfs-utils.", RESET "\n";
-                    }
-                    $err++;
-                } elsif (not -e "/usr/lib64/libblkid.so") {
-                    if ($kernel =~ m/2.6.2[6-7]/ and $distro eq "SuSE") {
-                        print RED "libblkid-devel is required to build rnfs-utils.", RESET "\n";
-                    } else {
-                        print RED "e2fsprogs-devel is required to build rnfs-utils.", RESET "\n";
-                    }
+
+                my $blkid_so = ($arch =~ m/x86_64/) ? "/usr/lib64/libblkid.so" : "/usr/lib/libblkid.so";
+                my $blkid_pkg = ($kernel =~ m/2.6.2[6-7]/ and $distro eq "SuSE") ? "libblkid-devel" : 
+                                "e2fsprogs-devel";
+                $blkid_pkg .= ($arch =~ m/powerpc|ppc64/) ? "-32bit" : "";
+
+                if (not -e $blkid_so) {
+                    print RED "$blkid_pkg is required to build rnfs-utils.", RESET "\n";
                     $err++;
                 }
             }



More information about the ewg mailing list