tech-pkg archive

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

Re: can't buildlink files



On 03.12.2020 11:06, Thomas Klausner wrote:
On Thu, Dec 03, 2020 at 06:31:52PM +0900, Ryo ONODERA wrote:
I have the following patch for some dependency problems
after pkgdb migration.
I have no problem about mail/neomutt with the patch.

Index: mk/pkgformat/pkg/pkgformat-vars.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/pkgformat/pkg/pkgformat-vars.mk,v
retrieving revision 1.9
diff -u -r1.9 pkgformat-vars.mk
--- mk/pkgformat/pkg/pkgformat-vars.mk	2 Dec 2020 10:22:39 -0000	1.9
+++ mk/pkgformat/pkg/pkgformat-vars.mk	3 Dec 2020 09:31:19 -0000
@@ -16,7 +16,7 @@
  .endif

  # This is the package database directory for the default view.
-PKG_DBDIR?=		${PREFIX}/pkgdb
+PKG_DBDIR?=		${LOCALBASE}/pkgdb

  .if exists(/var/db/pkg) && !exists(${PKG_DBDIR})
  PKG_DBDIR_ERROR=	The default package database directory has changed. Please run: mv /var/db/pkg ${PKG_DBDIR}

Thank you.

I've committed this, since it fixes the problem with mail/neomutt for
me.

Can anyone explain why this helps?

Yep.  The crucial point is that LOCALBASE is defined in bsd.prefs.mk.
PREFIX, on the other hand, is defined much later, in bsd.pkg.mk.

I had been bitten by this since some earlier versions of pkglint
suggested to replace LOCALBASE with PREFIX, but that's only possible in
a few cases.  As long as the makefiles are still being parsed, PREFIX is
not guaranteed to be defined.

I'd be happy as well to only have PREFIX.  The name LOCALBASE is ancient
and does not fit its purpose anymore.

Roland


Home | Main Index | Thread Index | Old Index