Thread: BUG #13220: make uninstall removes man pages not belonging to PostgreSQL
BUG #13220: make uninstall removes man pages not belonging to PostgreSQL
From
mario@mariovaldez.org
Date:
The following bug has been logged on the website: Bug reference: 13220 Logged by: Mario Valdez Email address: mario@mariovaldez.org PostgreSQL version: 9.4.1 Operating system: Linux Description: Executing the command "make uninstall" will remove all man pages in the DESTDIR/man1 and DESTDIR/man3 directories, even if there are files there from other programs. For example, if your DESTDIR is set to "/usr", man pages will be copied to /usr/man1 and /usr/man3, and if you run "make uninstall" all the man1 and man3 pages will be gone. The greediness of the unistall command only affects the man pages Makefile (doc/src/sgml/Makefile), all other Makefiles seems to delete only what was installe, no more, no less. Regards, Mario Valdez
Re: BUG #13220: make uninstall removes man pages not belonging to PostgreSQL
From
Bruce Momjian
Date:
On Sun, May 3, 2015 at 03:19:03AM +0000, mario@mariovaldez.org wrote: > The following bug has been logged on the website: > > Bug reference: 13220 > Logged by: Mario Valdez > Email address: mario@mariovaldez.org > PostgreSQL version: 9.4.1 > Operating system: Linux > Description: > > Executing the command "make uninstall" will remove all man pages in the > DESTDIR/man1 and DESTDIR/man3 directories, even if there are files there > from other programs. For example, if your DESTDIR is set to "/usr", man > pages will be copied to /usr/man1 and /usr/man3, and if you run "make > uninstall" all the man1 and man3 pages will be gone. > > The greediness of the unistall command only affects the man pages Makefile > (doc/src/sgml/Makefile), all other Makefiles seems to delete only what was > installe, no more, no less. Ouch, I see your point: uninstall: rm -f '$(DESTDIR)$(htmldir)/html/'* $(addprefix '$(DESTDIR)$(mandir)'/man, 1/* 3/* $(sqlmansectnum)/*) That Makefile assumes your man pages are in a Postgres-specific directory, rather than shared with other applications. I am unclear how to fix this as we don't actually have a list of files to uninstall; rather, we just copy every file we have generated during the install. I have added a Makefile comment about this undesirable behavior in case we ever find a way to fix it. The cleanest way would be to build the docs as part of the uninstall, get a list of those files, then delete the files from the install and the man directories. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. +
Re: BUG #13220: make uninstall removes man pages not belonging to PostgreSQL
From
Alvaro Herrera
Date:
Bruce Momjian wrote: > That Makefile assumes your man pages are in a Postgres-specific > directory, rather than shared with other applications. I am unclear how > to fix this as we don't actually have a list of files to uninstall; > rather, we just copy every file we have generated during the install. Can't we create a "manifest" file? Keeping it in the build dir should be enough. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services