Opened 15 months ago

Closed 4 months ago

#5239 closed defect (fixed)

make uninstall uninstalls more than needed

Reported by: strk Owned by: strk
Priority: medium Milestone: PostGIS 2.5.0
Component: build 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 (3)

comment:1 by strk, 15 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, 15 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) \

comment:3 by strk, 4 months ago

Milestone: PostGIS 3.4.0PostGIS 2.5.0
Resolution: fixed
Status: newclosed

This was fixed with [8a4b3a7f80f160c12b9bfab3f049555c5735f7dc/git] which is included even in 2.5.0 and 2.5 is the oldest we support, so closing.

Note: See TracTickets for help on using tickets.