BUG #13220: make uninstall removes man pages not belonging to PostgreSQL

Lists: Postg사설 토토SQL : Postg사설 토토SQL 메일 링리스트 : 2015-05-03 이후 PGSQL-BUGS 03:19
From: mario(at)mariovaldez(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #13220: make uninstall removes man pages not belonging to PostgreSQL
Date: 2015-05-03 03:19:03
Message-ID: 20150503031903.2658.13432@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: Postg사설 토토SQL : Postg사설 토토SQL 메일 링리스트 : 2015-05-03 이후 PGSQL-BUGS 03:19

The following bug has been logged on the website:

Bug reference: 13220
Logged by: Mario Valdez
Email address: mario(at)mariovaldez(dot)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


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: mario(at)mariovaldez(dot)org
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #13220: make uninstall removes man pages not belonging to PostgreSQL
Date: 2015-05-07 14:40:29
Message-ID: 20150507144029.GB27644@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 503 스포츠 토토 결과 페치 실패

On Sun, May 3, 2015 at 03:19:03AM +0000, mario(at)mariovaldez(dot)org wrote:
> The following bug has been logged on the website:
>
> Bug reference: 13220
> Logged by: Mario Valdez
> Email address: mario(at)mariovaldez(dot)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(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +


From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: mario(at)mariovaldez(dot)org, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #13220: make uninstall removes man pages not belonging to PostgreSQL
Date: 2015-05-07 15:05:31
Message-ID: 20150507150531.GD2523@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

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