pkgsrc-Users archive

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

Re: pkg_chk confused by new configurable PKG_DBDIR

Louis Guillaume <> writes:

> But in this case, for pkg_chk, these are just string values subst'd
> into a deliverable shell script at build time.

Yes, but that's an implementation detail, and not conceptually different
from strings baked into a C program.

> Surely we can separate the `-K /hard/coded/path' and make it `-K 
> ${PKG_DBDIR}', so that gets resolved at runtime.
> It's not clear to me where/when the SUBST_VARS get their value, or if
> it's modifiable at all.
> If, for example, @PKG_INFO@ would resolve to "/usr/pkg/sbin/pkg_info"
> without the -K argument, then instead of:
>   test -n "$PKG_INFO"   || PKG_INFO="@PKG_INFO@"
> we could have something like :
> How do we represent *just* the pkg_info binary in @PKG_INFO@, without
> the -K argument?
> Any guidance as to where to look for the "subst" magic would be great.

To understand:

  the big hint is that @FOO@ is substituted with a value

  read pkgsrc/pkgtools/pkg_chk/Makefile

  egrep PKG_DBDIR files/

  diff -u files/ /usr/pkg/sbin/pkg_chk 

Attachment: signature.asc
Description: PGP signature

Home | Main Index | Thread Index | Old Index