pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/45513: pkgsrc DEINSTALL file doesn't have ${VARBASE} and other variables defined
>Number: 45513
>Category: pkg
>Synopsis: pkgsrc DEINSTALL file doesn't have ${VARBASE} and other
>variables defined
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Oct 23 10:15:00 +0000 2011
>Originator: John Marino
>Release:
>Organization:
>Environment:
>Description:
If a package has a DEINSTALL script that deletes a file from ${VARBASE}
(normally /var), you must use "/var" instead of ${VARBASE} because the latter
is not expanded.
I assume this is not the intended behavior, otherwise the DEINSTALL script
would fail when the $VARBASE is defined as something other than the standard
/var.
The same effect is seen if ${PKG_DBDIR} is used as well, so the issue is not
limited to $VARBASE.
>How-To-Repeat:
create a dummy file at /var/db/pkg/test.db (assumes $VARBASE = /var). Add the
following DEINSTALL file for any package (I used biology/sewer) for testing
purposes:
================================
# $NetBSD$
#
case ${STAGE} in
DEINSTALL)
${RM} ${VARBASE}/db/pkg/test.db
;;
esac
==============================
> bmake install clean
> pkg_delete name-of-testpackage-\*
confirm that pkg_delete emits an error when file "/db/pkg/test.db" isn't found.
repeat the process using this DEINSTALL file:
================================
# $NetBSD$
#
case ${STAGE} in
DEINSTALL)
${RM} /var/db/pkg/test.db
;;
esac
==============================
confirm that pkg_delete successfully removes all files, including
/var/db/pkg/test.db
>Fix:
Home |
Main Index |
Thread Index |
Old Index