libqof variables in configure.in (Fwd: gentoo ebuild)

Neil Williams linux at codehelp.co.uk
Tue Jan 10 17:01:57 EST 2006


On Tuesday 10 January 2006 9:06 pm, Derek Atkins wrote:
> >> 3. In *addition* to the "make DISTDIR..." solution I would like to
> >> enable Martin's/gentoo's original approach "make prefix=/my/sandbox
> >> install" as well. This would be an *additional* way for those
> >> sandbox-packaging, and that way is supported by automake in principle as
> >> well.
> >
> > If this is additional and keeps the other methods working, I'm more than
> > happy to use it. I'll test with it - I suspect OSX is the one platform
> > most likely to show any problems, it does do some very strange automake
> > things.
> >
> >> My proposed patch for configure.in IMHO would achieve #3 while keeping
> >> #1 working. At least that's what my local test confirms. Proposed patch:
> >>  >         QOF_VERSION="internal"
> >>  >         QOF_PREFIX="internal"
> >>  > -       QOF_XML_DIR=`eval echo ${datadir}/xml/qsf`
> >>  > +       QOF_XML_DIR="\${datadir}/xml/qsf"
> >
> > OK, I'll test with OSX and go from there.
> > (I really thought I'd tried this before going for the eval echo method,
> > but I'll check it again.)

Christian: I'm re-thinking this patch. Can you get back to your gentoo 
enquirer and ask for a specific and authoritative reference for his 
objections to DESTDIR please? I want to know who and why. "X told me so" or 
other vague mumblings are insufficient.

Without a reasonable objection to DESTDIR, I am unlikely to take this further, 
especially as the original problem has been resolved. I don't mind tinkering 
and testing but sometimes there comes a point when it's just wasting time.

I remain concerned that allowing this change could cause unpredicted 
behaviour, even if tests on OSX complete. 

> I'm concerned that:
>
>   make install prefix=/tmp/dir/usr
>
> .. will cause the program to rewrite the configuration file to look in
> /tmp/dir/usr/bin when really /tmp/dir is just a temporary location for
> the package management system to put the files until it can get
> packaged and then installed into /usr/bin..
>
> This would be BAD!

I fully agree! This is what I find so hard to accept with the request from the 
gentoo maintainer. I'll test Christian's patch but I am still concerned that 
it should never be possible to give one value to ./configure or make, then a 
different value to make install. The one thing with DESTDIR=%d is that it 
reliably carries forward the setting given to configure. That is absolutely 
essential to any operation of the QSF backend. It simply cannot operate 
without being able to find the schema at runtime - it's fundamental to how 
QOF objects will be mapped between applications. There must be a lot of other 
packages that have files in /mumble/share/mumble/ that are essential to 
runtime operation. Others have essential files in /etc/mumble/ - these also 
need DESTDIR. I know I need DESTDIR for the manpages in pilot-qof on OSX and 
Fedora.

> The real question is:  why is the 'user' installing using 'prefix='
> instead of DESTDIR?

He commented DESTDIR was deprecated or out-of-date. No reference given.

I don't see the problem with DESTDIR but I don't mind testing the proposal.

Debian uses 'sandbox' installations to build (all) packages and has no 
problems like this. I remain unconvinced but willing to test it.

> Not that it matters to us,

(As mentioned before, this is really just a packaging issue. It should not 
concern upstream - us. In fact, I was wondering if this ought not be a 
gentoo-only patch if they really want to use it. It would appear, at the 
moment, to be specific to gentoo and yet the recommended method - external 
QOF - works fine.)

Until I hear back about the precise problem with DESTDIR, I'll leave the code 
as now.

> but we should  
> make sure that we don't re-write anything during 'make install'

My concern at the moment is that the requested method will not be able to 
ensure that the same path is used in each case. i.e. that it will be too easy 
to rewrite the QOF_XML_DIR macro in the source during the make and end up 
with a different value. If I can even do that once with the proposed patch, I 
will not commit it. Changing the header file would cause make install to 
rebuild the entire QSF backend library at the make install stage.

I don't mind creating QOF_XML_DIR during the initial make rather than 
configure but I have grave doubts about changing that value between make and 
make install. Temporary directories have NO place in QOF_XML_DIR - whether in 
the Makefile or the header file.

As I said:
"Providing the same value is written into the C code as is used for the actual 
installation, yes." Otherwise, I'm sticking to DESTDIR.


-- 

Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20060110/7ffa306b/attachment.bin


More information about the gnucash-devel mailing list