Subject: Re: Wildcard DEPENDS and CONFLICTS in pkgsrc
To: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
From: Alistair Crooks <azcb0@amdahl.com>
List: tech-pkg
Date: 08/26/1998 14:00:49
Hubert,
 
> I'm still missing the mods for pkg_add - where are they???

No mods are necessary for pkg_add - in bsd.pkg.mk, when creating the
fake pkg, the package-depends target is used to get the dependent
(actually prerequisite) packages.  And, a quick look at that target
reveals:

package-depends:
        @for dir in `${ECHO} ${DEPENDS} ${RUN_DEPENDS} | ${TR} '\040' '\012' | ${SED} -e 's/^[^:]*://' -e 's/:.*//' | sort -u`; do \
                if [ -d $$dir ]; then \
                        (cd $$dir ; ${MAKE} package-name package-depends PACKAGE_NAME_AS_LINK=${PACKAGE_NAME_AS_LINK}); \
                else \
                        ${ECHO_MSG} "Warning: \"$$dir\" non-existent -- @pkgdep registration incomplete" >&2; \
                fi; \
        done

i.e.  it goes into the pkgsrc directory for the pre-req package and
prints its name.  So, in

DEPENDS+= libutf-2.*:../../misc/libutf

libutf-2.* does not matter one iota.  What does matter, however, is
the ../../misc/libutf/Makefile, which sets its PKGNAME to libutf-2.10. 
And so libutf-2.10 is the value which gets put in the @pkgdep field in
the binary package.

Whilst this is arguably broken, binary packages still get produced with
@pkgdeps on real, versioned package names.


Alistair