Opened 9 months ago

Last modified 9 months ago

#5239 new defect

make uninstall uninstalls more than needed

Reported by: strk Owned by: strk
Priority: medium Milestone: PostGIS 3.4.0
Component: build/upgrade/install Version: 1.4.X
Keywords: Cc:


The make uninstall target under extension directories remove all extensions, not just the one installed by make install in that directory. It can also uninstall foreign extensions which may happen to have the same version as ours. Sounds dangerous.

Change History (2)

comment:1 by strk, 9 months ago

The behaviour I'm describing is due to this snippet in extensions/ which is included by all extension files:

  $(wildcard $(EXTDIR)/*$(EXTVERSION).sql) \
  $(wildcard $(EXTDIR)/*$(EXTVERSION)next.sql) \


Note there's no $(EXTENSION) being used, so any extension is removed

comment:2 by strk, 9 months ago

Version: 3.0.x1.4.X

I verified we've had this problem for a long time. As back as 1.4:

[strk@c19:/usr/local/src/postgis] grep wildcard.*EXT */extensions/ 
postgis-1.4/extensions/  $(wildcard $(EXTDIR)/*$(EXTVERSION).sql) \
postgis-1.4/extensions/  $(wildcard $(EXTDIR)/*$(EXTVERSION)next.sql) \
postgis-2.4/extensions/  $(wildcard $(EXTDIR)/*$(EXTVERSION).sql) \
postgis-2.4/extensions/  $(wildcard $(EXTDIR)/*$(EXTVERSION)next.sql) \
postgis-2.5/extensions/  $(wildcard $(EXTDIR)/*$(EXTVERSION).sql) \
postgis-2.5/extensions/  $(wildcard $(EXTDIR)/*$(EXTVERSION)next.sql) \
postgis-3.0/extensions/  $(wildcard $(EXTDIR)/*$(EXTVERSION).sql) \
postgis-3.0/extensions/  $(wildcard $(EXTDIR)/*$(EXTVERSION)next.sql) \
postgis-3.1/extensions/  $(wildcard $(EXTDIR)/*$(EXTVERSION).sql) \
postgis-3.1/extensions/  $(wildcard $(EXTDIR)/*$(EXTVERSION)next.sql) \
postgis-3.2/extensions/  $(wildcard $(EXTDIR)/*$(EXTVERSION).sql) \
postgis-3.2/extensions/  $(wildcard $(EXTDIR)/*$(EXTVERSION)next.sql) \
postgis-3.3/extensions/  $(wildcard $(EXTDIR)/*$(EXTVERSION).sql) \
postgis-3.3/extensions/  $(wildcard $(EXTDIR)/*$(EXTVERSION)next.sql) \
postgis/extensions/      $(wildcard $(EXTDIR)/*$(EXTVERSION).sql) \
postgis/extensions/      $(wildcard $(EXTDIR)/*$(EXTVERSION)next.sql) \
Note: See TracTickets for help on using tickets.