Project

General

Profile

Bug #7401

custom_php_deinstall_command isn't being run during pkg post-deinstall because info.xml has already been removed by that step.

Added by Jim Pingle 11 days ago. Updated 11 days ago.

Status:
Feedback
Priority:
Normal
Assignee:
Category:
Package System
Target version:
Start date:
03/16/2017
Due date:
% Done:

100%

Affected version:
2.4.x
Affected Architecture:
All

Description

A bit of a chicken/egg problem here:

The custom_php_deinstall_command function from a package is supposed to be run during the post-deinstall phase of pkg delete, but it can't, because that block of code doesn't run if the "configurationfile" doesn't exist (e.g. pkgname.xml). Since it's the post-deinstall phase, that file has been removed already.

I confirmed this by making a change to an XML file so pkg wouldn't delete it (checksum mismatch) and then the commands ran as expected.

Changing custom_php_deinstall_command to run at deinstall instead of post-deinstall works around the issue, but needs some evaluation for potential side effects. If that is OK, it's a simple one-line change.

Affects both 2.3.x and 2.4.x and leads to behavior such as #7319

Associated revisions

Revision 59fada5c
Added by Jim Pingle 11 days ago

Run custom deinstall commands during the deinstall phase instead of post-deinstall, otherwise they will never get run. Fixes #7401

Revision 54f87601
Added by Jim Pingle 11 days ago

Run custom deinstall commands during the deinstall phase instead of post-deinstall, otherwise they will never get run. Fixes #7401

Revision 32e75b43
Added by Jim Pingle 11 days ago

Run custom deinstall commands during the deinstall phase instead of post-deinstall, otherwise they will never get run. Fixes #7401

History

#1 Updated by Jim Pingle 11 days ago

  • Assignee changed from Renato Botelho to Jim Pingle

#2 Updated by Jim Pingle 11 days ago

  • Status changed from Confirmed to Feedback
  • % Done changed from 50 to 100

Also available in: Atom PDF