pkgsrc-Users archive

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

Re: How to reduce the cost of the ports collection?



  Given that just about everyone agrees that any way to avoid running
  "make clean" in pkgsrc is worthwhile, is there a reason that
  pkgsrc/mk/install/bin-install.mk in the do-bin-install-from-source
  target includes ...

          ${PKG_INFO} -qe "$$pkgpattern" || {                             \
                  ${STEP_MSG} "No binary package found for $$pkgpattern; 
installing from source."; \
                  ${RECURSIVE_MAKE} ${MAKEFLAGS} 
DEPENDS_TARGET=${DEPENDS_TARGET:Q} package-install \
                  && ${RECURSIVE_MAKE} ${MAKEFLAGS} clean;                \
          }

  In particular, is there any good reason for the

          ${RECURSIVE_MAKE} ${MAKEFLAGS} clean

  part of that?

  I have been running with that removed for a year or so now (since at least
  August last year, perhaps a little earlier than that) with no ill effects that
  I am able to discern (but I do tend to use those alternate methods of cleaning
  up fairly frequently.

I would expect that without the recursive clean, you'll have

  build package from source
    recurse to build a new dependency foo

  clean

  [new dependency foo is left unclean]


One thing I've found with pkgsrc is that stale work directories cause
problems because at least at one point you can have foo-1.3 installed
and in workdir but foo source updated to 1.4.  Then a package that needs
foo >= 1.4 will find the workdir with the package-install done cookie
and be happy.  Thus I always tell people to clean out all workdirs.

A clearly-safe improvement would be to have the recursive make record
which dirs it recursed into and have recursive clean only clean those.
That should get speedup without leaving workdirs.

Attachment: pgpWBxjpQIOVq.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index