Jean-Marc Lasgouttes wrote:

>>>>>> "Georg" == Georg Baum
>>>>>> <[EMAIL PROTECTED]>
>>>>>> writes:
> 
> Georg> Jean-Marc Lasgouttes wrote:
>>> The current autogenerated lyx.spec for rpms suffers from an
>>> annoying bug: The dependency for Qt is hardcoded to 'qt >= 2.3.0'.
>>> However, the package is named 'qt' only on redhat/fedora. On SUSE
>>> it is 'qt3' and on mandrake it is 'libqt3'. This proves to be an
>>> annoyance for our user-contributed rpms (mandrake users forced to
>>> use --force) and this patch tries to address this.
> 
> Georg> This is indeed annoying. BTW, we have the same problem with the
> Georg> tetex-latex dependency, the package is called te_latex on SuSE.
> 
> We could do the same and ask which package provides `which latex`.

Clever! It even works. In fact, could the script below be modified so that
all continues to work if latex is found but is also found to not be a part
of an rpm?

#! /bin/sh

package=""
exe=""
for latex in "latex" "latex2e" "pplatex"
do
        search=`which $latex 2>/dev/null` || continue
        pkg=`rpm -q -f $search` || continue
        package=$pkg
        exe=$search
        break
done

test "$package" == "" && {
        echo "Unable to find package providing a latex executable" >&2
        exit 1
}

echo "package '$package' contains '$exe'"

-- 
Angus

Reply via email to