pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/31916: Better checks in bsd.pkg.mk if pkg_create happens to core dump during install
>Number: 31916
>Category: pkg
>Synopsis: Better checks in bsd.pkg.mk if pkg_create happens to core dump
>during install
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Oct 25 23:34:00 +0000 2005
>Originator: Lars Nordlund
>Release: NetBSD/current, i386, pkgsrc-current
>Organization:
>Environment:
>Description:
(from mail sent to tech-pkg%netbsd.org@localhost)
On my NetBSD i386-current with pkgsrc-current I see this:
===> lars@glengoyne:/usr/pkgsrc/net/openslp %make install
[...]
===========================================================================
===> do-shlib-handling [openslp-1.2.1] ===> [Automatic ELF shared object
handling]
===> register-pkg [openslp-1.2.1] ===> Registering installation for
openslp-1.2.1
[1] Segmentation fault (core dumped) /home/lars/tmp/p...
===> check-wrkref [openslp-1.2.1] ===> Checking for work-directory references
in openslp-1.2.1
===> lars@glengoyne:/usr/pkgsrc/net/openslp %echo $?
0
===> lars@glengoyne:/usr/pkgsrc/net/openslp %ls -la
work.glengoyne/.pkgdb/+CONTENTS
-rw-r--r-- 1 root wheel 0 Oct 24 21:47 work.glengoyne/.pkgdb/+CONTENTS
===> lars@glengoyne:/usr/pkgsrc/net/openslp %
i.e. 'make install' silently fails leaving the package with an empty
+CONTENTS file. This causes problems for other packages because they
can't be properly buildlinked (or something like that?).
After some discussions I came up with this patch:
The diff:
@@ -4386,7 +4435,13 @@
case $$doit in \
yes) \
${ECHO_MSG} "${_PKGSRC_IN}> Registering installation for
${PKGNAME}"; \
- ${PKG_CREATE} ${PKG_ARGS_INSTALL} -O ${PKGFILE} >
${PKG_DB_TMPDIR}/+CONTENTS; \
+ if ${PKG_CREATE} ${PKG_ARGS_INSTALL} -O ${PKGFILE} >
${PKG_DB_TMPDIR}/+CONTENTS; then \
+ :; \
+ else \
+ ${ECHO} "(pkg_create: exitcode $$?)"; \
+ ${ECHO} "Broken pkgdb? Try repairing it with
\"pkg_admin rebuild\""; \
+ exit 1; \
+ fi; \
list="`${MAKE} ${MAKEFLAGS} run-depends-list ECHO_MSG=${TRUE} |
${SORT} -u`" ; \
for realdep in `${ECHO} $$list | ${XARGS} -n 1 ${SETENV}
${PKG_BEST_EXISTS} | ${SORT} -u`; do \
if ${TEST} -z "$$realdep"; then \
This catches non-zero exit values from pkg_create and tries to give some kind
of information about what to do.
>How-To-Repeat:
>Fix:
Home |
Main Index |
Thread Index |
Old Index