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
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

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


pkg_admin rebuild


Home | Main Index | Thread Index | Old Index