NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

install/56458: pkg_add leaves files installed when POST-INSTALL fails



>Number:         56458
>Category:       install
>Synopsis:       pkg_add leaves files installed when POST-INSTALL fails
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 18 13:05:00 +0000 2021
>Originator:     Michal Maru?ka
>Release:        
>Organization:
>Environment:
>Description:
INSTALL script can exit with failure, say during POST-INSTALL stage.
In that case pkg_add will revert the installation, i.e. the package is marked as not-installed, yet the files remain on the filesystem, so an attempt to reinstall (a working version) will fail.

A possible workaround (in such situation) is currently
   pkg_admin rebuild


>How-To-Repeat:
Prepare a package which in INSTALL script does:
   exit 1

then install such a package.

$ pkg_add -v pkg-N.tgz
pkg_add: install script returned error status
pkg_add: 1 package addition failed


then try again:
$ pkg_add -v pkg-N.tgz
pkg_add: Conflicting PLIST with pkg-N: dir/filename

>Fix:
workaround:

pkg_admin rebuild

fix: https://github.com/NetBSD/pkgsrc/pull/95



Home | Main Index | Thread Index | Old Index