tech-pkg archive

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

make update and reordering



Hi all,
dh@ has found some issues that have been exposed as side effect of
the recent pkg_delete changes. Basically, make update depends a lot
the order of the entries in the dlist file. It can fail as well if build
dependencies are also included in the list as full dependencies.

The attached patch is a bit hackish, but avoids the problem by
explicitly skipping packages that are already installed during the
reinstall phase of make update. Comments?

Joerg
Index: bsd.pkg.barrier.mk
===================================================================
RCS file: /home/joerg/repo/netbsd/pkgsrc/mk/bsd.pkg.barrier.mk,v
retrieving revision 1.16
diff -u -p -r1.16 bsd.pkg.barrier.mk
--- bsd.pkg.barrier.mk  7 Feb 2008 21:36:13 -0000       1.16
+++ bsd.pkg.barrier.mk  12 May 2009 20:58:33 -0000
@@ -64,13 +64,18 @@ barrier: ${_BARRIER_PRE_TARGETS} ${_COOK
        @${PHASE_MSG} "Invoking \`\`"${_BARRIER_CMDLINE_TARGETS:Q}"'' after 
barrier for ${PKGNAME}"
 .  endif
        ${RUN}                                  \
+       if ${TEST} -n ${_PKGSRC_UPDATE_CHECK} && \
+          ${PKG_INFO} -qe ${PKGNAME}; then \
+               ${PHASE_MSG} "Skipping installation of already handled 
package"; \
+       else \
        cd ${.CURDIR}                                                   \
        && ${RECURSIVE_MAKE} ${MAKEFLAGS} _PKGSRC_BARRIER=yes 
ALLOW_VULNERABLE_PACKAGES= ${_BARRIER_CMDLINE_TARGETS} \
        || {                                                            \
                exitcode="$$?";                                         \
                ${RECURSIVE_MAKE} ${MAKEFLAGS} _PKGSRC_BARRIER=yes 
barrier-error-check; \
                exit "$$exitcode";                                      \
-       }
+       }; \
+       fi
 .  if defined(PKG_VERBOSE)
        @${PHASE_MSG} "Leaving \`\`"${_BARRIER_CMDLINE_TARGETS:Q}"'' after 
barrier for ${PKGNAME}"
 .  endif
Index: bsd.pkg.update.mk
===================================================================
RCS file: /home/joerg/repo/netbsd/pkgsrc/mk/bsd.pkg.update.mk,v
retrieving revision 1.17
diff -u -p -r1.17 bsd.pkg.update.mk
--- bsd.pkg.update.mk   7 Mar 2009 19:36:31 -0000       1.17
+++ bsd.pkg.update.mk   12 May 2009 04:19:23 -0000
@@ -72,6 +72,7 @@ update:
                                ${RECURSIVE_MAKE} ${MAKEFLAGS} deinstall 
_UPDATE_RUNNING=YES; \
                        fi &&                                           \
                        ${RECURSIVE_MAKE} ${MAKEFLAGS} ${UPDATE_TARGET} \
+                               _PKGSRC_UPDATE_CHECK=yes                \
                                DEPENDS_TARGET=${DEPENDS_TARGET:Q} ;    \
                else                                                    \
                        ${PHASE_MSG} "Skipping removed directory $${dep}"; \


Home | Main Index | Thread Index | Old Index