Summary: | JJ: magic python line too long | ||
---|---|---|---|
Product: | [Unmaintained] kdeprint | Reporter: | ccheney |
Component: | kdeprintfax | Assignee: | KDEPrint Devel Mailinglist <kde-print-devel> |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | normal | CC: | grundleborg, jlayt |
Priority: | NOR | Keywords: | junior-jobs |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
ccheney
2002-12-16 23:21:16 UTC
Subject: Re: New: magic python line too long
On Monday 16 December 2002 23:21, you wrote:
> The magic file has a line that is too long causing file to complain.
>
> The bad line is this:
>
> 0 string eval\ "exec\ /usr/local/bin/python application/x-python
>
> It causes file to output:
>
> String too long: eval\ "exec\ /usr/local/bin/python application/x-python
Which magic file? KIO's ? It doesn't have the same format as the one used
by the "file" command, since we added mimetypes to it.
Are you trying to get "file" to use KIO's magic file???
Subject: Re: magic python line too long
On Tue, Dec 17, 2002 at 02:49:16PM -0000, David Faure wrote:
> > String too long: eval\ "exec\ /usr/local/bin/python application/x-python
>
> Which magic file? KIO's ? It doesn't have the same format as the one used
> by the "file" command, since we added mimetypes to it.
> Are you trying to get "file" to use KIO's magic file???
Oh sorry I didn't fully explain where this warning is seen:
anytops in kdeprintfax has the following lines:
if [ -z "$MIMETYPE" ]; then
MAGIC=$KDEDIR
if [ -z "$MAGIC" ]; then
MAGIC=/usr
fi
MAGIC=$MAGIC/share/mimelnk/magic
if [ ! -f "$MAGIC" ]; then
echo "KDE magic file not found. Check your installation."
exit 1;
fi
MIMETYPE=`file -b -m $MAGIC "$INFILE" 2> /dev/null`
MIMETYPE=${MIMETYPE%%;*}
fi
Chris
That's broken IMHO. This magic file isn't mean to be used by "file". If I understand correctly, this is about finding out the mimetype of a file, from a shellscript. Michael: my suggestion would be a small binary that calls KMimeType::findByURL(). Take kdelibs/kio/tests/kmimefromext.cpp as starting point, and remove the ,0,true from the findByURL call - and change the binary name ;) I'm fine with this binary being installed by kdelibs, it can be useful to other scripts. UNCONFIRMED (batch reassigning messed this) Is this bug still there in a recent version of KDE, such as 3.5.8 or KDE4.0 RC2? KDEPrint is obsolete, unmaintained and will never be revived. Closing all open bugs. |