Bug 3356

Summary: bogus check for detectloader
Product: Sisyphus Reporter: at <at>
Component: liloAssignee: placeholder <placeholder>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: normal    
Priority: P2 CC: glebfm, ldv, led, placeholder, rider
Version: unstable   
Hardware: all   
OS: Linux   

Description at@altlinux.org 2003-12-09 20:30:49 MSK
Two problems with lilo.spec:
1) bogus check for /usr/sbin/detectloader (actually the test is for the given
string, not for the given file);
2) missing deps on /usr/sbin/detectloader, so the post script may or may not
achieve the desired effect.

--- /home/at/RPM/SPECS/lilo.spec-       2003-08-20 21:50:52 +0400
+++ /home/at/RPM/SPECS/lilo.spec        2003-12-09 16:44:00 +0300
@@ -22,6 +22,7 @@

 ExclusiveArch: %ix86

+Requires: /usr/sbin/detectloader
 BuildPreReq: kernel-headers-std

 # Automatically added by buildreq on Fri May 30 2003
@@ -73,7 +74,7 @@
 bzip2 -9 $RPM_BUILD_ROOT%docdir/{README,CHANGES,*.ps}

 %post
-if [ -f /etc/%name.conf -a /usr/sbin/detectloader -a -f /proc/partitions ]; then
+if [ -f /etc/%name.conf -a -x /usr/sbin/detectloader -a -f /proc/partitions ];
then
        if [ "`/usr/sbin/detectloader`" = LILO ]; then
                /sbin/%name || echo "Please run %name manually." >&2
        fi
Comment 1 Dmitry V. Levin 2003-12-22 02:16:28 MSK
Thanks for the typo report. 
I think that detectloader dependency is not required though. 
Comment 2 Dmitry V. Levin 2004-06-25 19:53:17 MSD
Fixed the typo in lilo-22.4.1-alt5