Re: extension installation faillure using VPATH and MODULEDIR

Lists: pgsql-bugs
From: Cédric Villemain <cedric(at)2ndquadrant(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: extension installation faillure using VPATH and MODULEDIR
Date: 2012-12-01 14:13:49
Message-ID: 201212011513.53770.cedric@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

the attached patch fix the extension installation using a VPATH when a
MODULEDIR is defined in the extension Makefile.

The current issue is that the sharedir/extension directory is not created if
MODULEDIR != 'extension' i.e. MODULEDIR is defined in the Makefile. Thus 'make
install' fail to copy the control file in an nonexistent directory.

Tested with debian extension packages.
--
Cédric Villemain +33 (0)6 20 30 22 52
http://2ndQuadrant.fr/
PostgreSQL: Support 24x7 - Développement, Expertise et Formation

Attachment Content-Type Size
0001-Fix-extension-install.patch text/x-patch 1015 bytes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: cedric(at)2ndquadrant(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: extension installation faillure using VPATH and MODULEDIR
Date: 2012-12-01 17:44:12
Message-ID: 17097.1354383852@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

=?iso-8859-1?q?C=E9dric_Villemain?= <cedric(at)2ndquadrant(dot)com> writes:
> the attached patch fix the extension installation using a VPATH when a
> MODULEDIR is defined in the extension Makefile.

> The current issue is that the sharedir/extension directory is not created if
> MODULEDIR != 'extension' i.e. MODULEDIR is defined in the Makefile. Thus 'make
> install' fail to copy the control file in an nonexistent directory.

[ scratches head ... ] What's this have to do with VPATH?

I see the point that if EXTENSION is set, and a nondefault MODULEDIR is
selected, the "install" target puts the control file into the extension
subdirectory which hasn't been made by installdirs. But that seems not
connected to VPATH builds.

regards, tom lane


From: Cédric Villemain <cedric(at)2ndquadrant(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: extension installation faillure using VPATH and MODULEDIR
Date: 2012-12-01 19:33:38
Message-ID: 201212012033.44931.cedric@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Le samedi 1 décembre 2012 18:44:12, Tom Lane a écrit :
> =?iso-8859-1?q?C=E9dric_Villemain?= <cedric(at)2ndquadrant(dot)com> writes:
> > the attached patch fix the extension installation using a VPATH when a
> > MODULEDIR is defined in the extension Makefile.
> >
> > The current issue is that the sharedir/extension directory is not created
> > if MODULEDIR != 'extension' i.e. MODULEDIR is defined in the Makefile.
> > Thus 'make install' fail to copy the control file in an nonexistent
> > directory.
>
> [ scratches head ... ] What's this have to do with VPATH?
>
> I see the point that if EXTENSION is set, and a nondefault MODULEDIR is
> selected, the "install" target puts the control file into the extension
> subdirectory which hasn't been made by installdirs. But that seems not
> connected to VPATH builds.

I just hit the bug and though it was relative to VPATH because it was the main
difference in my build. Obviously in my others scenariii the extension/
directory was pre-existent and I didn't notice the problem.

--
Cédric Villemain +33 (0)6 20 30 22 52
http://2ndQuadrant.fr/
PostgreSQL: Support 24x7 - Développement, Expertise et Formation


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: cedric(at)2ndquadrant(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: extension installation faillure using VPATH and MODULEDIR
Date: 2012-12-01 21:06:41
Message-ID: 15395.1354396001@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

=?iso-8859-15?q?C=E9dric_Villemain?= <cedric(at)2ndquadrant(dot)com> writes:
> Le samedi 1 dcembre 2012 18:44:12, Tom Lane a crit :
>> [ scratches head ... ] What's this have to do with VPATH?
>>
>> I see the point that if EXTENSION is set, and a nondefault MODULEDIR is
>> selected, the "install" target puts the control file into the extension
>> subdirectory which hasn't been made by installdirs. But that seems not
>> connected to VPATH builds.

> I just hit the bug and though it was relative to VPATH because it was the main
> difference in my build. Obviously in my others scenariii the extension/
> directory was pre-existent and I didn't notice the problem.

No worries, I was just wondering if you were seeing something more than
the problem described. Committed to 9.1 and up.

regards, tom lane