[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

Re: [XaraXtreme-dev] 0.7 debian packages - please test

Gerry Iles wrote:
Yes, the mechanism you proposed should handle this.  However, I was
hoping that this would be possible in some simpler way.  If the local
install directory is added to the start of the path before running the
local XaraLX then it should find the locally installed filters.  Could
we perhaps do this automatically in XaraLX, e.g. by XaraLX modifying the
PATH so that the directory it is located in gets added to the front of
the path?  It might need to only do it for local installs, e.g. it might
be bad if a program changes the order of the system directories.  This
should allow a locally installed version to find its filters and also
ensure that they are found in preference to the globally installed ones.

I don't see the advantage in doing that. By changing the path, you
are really saying "search here first". That means that if you don't
find the filter described in in that filter's XML file, you risk
running a different version, possibly incompatible with the XML
description - surely better to error in that case.

Also, it means you have to alter the path for local installs. That
shouldn't be necessary. IE if I untar the tarball and execute Xtreme
it should just work out the box - no reason for it not to. Unless
you mean LX at runtime alters the path to stick its own directory
in there. That could be dangerous. What happens if the user happens
to have an executable file called "lpr" in his home directory too,
having copied lx in there? When LX runs "lpr" to print, it will run
the wrong one. It also potentially leaves the user vulnerable to
symlink attack - it's only a matter of time before someone tries
running it from /tmp.

If we really want to search a specific path, we should not alter the
system path, but just try the local directory first (i.e. the binreloc'd
version), and THEN fall back to the normal (unaltered) system path.
But I think doing the fallback causes more harm than good. If it's
found the XML file, it should find the filter. Filters shipped with
the Xtreme binary should have %BINDIR% in their path (so they
are always only looked for next to that binary, and we can guarantee
not to use any other version hanging around on the machine).
Filters shipped separately should not have %BINDIR% in their path,
so either they need to specify a full (absolute) path, or they need
to be installed on the system path. This seems a reasonable