Bug 3356 - bogus check for detectloader
Summary: bogus check for detectloader
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: lilo (show other bugs)
Version: unstable
Hardware: all Linux
: P2 normal
Assignee: placeholder@altlinux.org
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-09 20:30 MSK by at@altlinux.org
Modified: 2005-07-13 15:45 MSD (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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