pkgsrc-Bugs archive

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

pkg/54460: pkg_chk mixes non-default installation with /usr/pkg(src)



>Number:         54460
>Category:       pkg
>Synopsis:       pkg_chk mixes non-default installation with /usr/pkg(src)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 13 14:50:00 +0000 2019
>Originator:     Joern Clausen
>Release:        
>Organization:
>Environment:
>Description:
See this mail thread for context: https://mail-index.netbsd.org/netbsd-users/2019/08/08/msg023310.html

When installing pkgsrc with a non-default prefix (LOCALBASE) on NetBSD, and a native pkgsrc installation with /usr/pkg, /usr/pkgsrc and /etc/mk.conf is present, the non-default pkg_chk will find and use configuration and packages from the native installation. It will read both LOCALBASE/pkgchk.conf and /usr/pkgsrc/pkgchk.conf. It will try to install packages from /usr/pkgsrc/packages/All, although they will not work if installed under LOCALBASE.

The problem seems to stem from the fact, that extract_mk_var() does not return correct values for LOCALBASE and PKGSRCDIR. The function returns the empty default values, making pkg_chk use the native installation instead.

A workaround is to define PKGSRCDIR in $prefix/etc/mk.conf (as LOCALBASE already is), and pkg_chk works as intended. Another, eventually better solution would be to bake the proper values into the pkg_chk script, as is already done for several other variables.
>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index