Search Postgresql Archives

Extension uninstall issue with PGXS

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

 



Hi all,

I am in trouble when building an extension with PGXS. At uninstall time, the documentation and script files are not removed.

The specificity of my distribution tree is that these script and documentation files are located into subdirectories. So in the Makefile, the DOCS and SCRIPTS variables are described like DATA, with something like:
DOCS         = \$(wildcard doc/*)
SCRIPTS      = \$(wildcard script/*)

At install time, all files of both subdirectories are correctly copied into the DOCDIR and BINDIR directories respectively.
But at uninstall time, these files are not removed.

Attached is a simple test case that reproduces the issue, with the execution result on my PC.

As you can see, the uninstall step tries to remove files from DOCDIR and BINDIR, using the original subdirectories.

I don't know if this can be considered as a bug or if it is a functional limitation or if there is a better way to code the Makefile.

Kind regards. Philippe.

Attachment: testcase.sh
Description: application/shellscript

------------ Install the extension ------------
make: rien à faire pour « all ».
/bin/mkdir -p '/usr/share/postgresql/14/extension'
/bin/mkdir -p '/usr/share/postgresql/14/myext'
/bin/mkdir -p '/usr/share/doc/postgresql-doc-14/myext'
/bin/mkdir -p '/usr/lib/postgresql/14/bin'
/usr/bin/install -c -m 644 .//myext.control '/usr/share/postgresql/14/extension/'
/usr/bin/install -c -m 644 .//sql/myext_1.0.0.sql  '/usr/share/postgresql/14/myext/'
/usr/bin/install -c -m 644 .//doc/mydoc1 .//doc/mydoc2 '/usr/share/doc/postgresql-doc-14/myext/'
/usr/bin/install -c -m 755 .//script/myscript1 .//script/myscript2 '/usr/lib/postgresql/14/bin/'
------------ Check ------------
/usr/share/postgresql/14/extension/myext.control
myext_1.0.0.sql
/usr/lib/postgresql/14/bin/myscript1  /usr/lib/postgresql/14/bin/myscript2
mydoc1	mydoc2
------------ Uninstall the extension ------------
rm -f '/usr/share/postgresql/14/extension'/myext.control
rm -f '/usr/share/postgresql/14/myext'/myext_1.0.0.sql
rm -f '/usr/share/doc/postgresql-doc-14/myext'/doc/mydoc1 '/usr/share/doc/postgresql-doc-14/myext'/doc/mydoc2
rm -f '/usr/lib/postgresql/14/bin'/script/myscript1 '/usr/lib/postgresql/14/bin'/script/myscript2
------------ Check (nothing should be found here) ------------
ls: impossible d'accéder à '/usr/share/postgresql/14/extension/myext.control': Aucun fichier ou dossier de ce nom
ls: impossible d'accéder à '/usr/share/postgresql/14/extension/myext': Aucun fichier ou dossier de ce nom
/usr/lib/postgresql/14/bin/myscript1  /usr/lib/postgresql/14/bin/myscript2
mydoc1	mydoc2


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux