pkgsrc-Bugs archive

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

pkg/40093: creates circular symlink when SHLIB_MINOR undefined

>Number:         40093
>Category:       pkg
>Synopsis: creates circular symlink when SHLIB_MINOR undefined
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 03 07:10:00 +0000 2008
>Originator:     Aleksej Saushev <>
>Release:        NetBSD 5.99.01
System: NetBSD asau.local 5.99.01 NetBSD 5.99.01 (KERN) #0: Wed Nov 5 20:10:09 
MSK 2008 asau%asau.local@localhost:/usr/obj/sys/arch/i386/compile/KERN i386
Architecture: i386
Machine: i386
        When using, one has to define both SHLIB_MAJOR and 
        with missing SHLIB_MINOR circular symlink is created at installation.
        bsd.README should've mentioned, that both variables are required for
        correct operation.

        NetBSD's behaviour differs from the above: it just doesn't
        create symlinks, when SHLIB_MAJOR/SHLIB_MINOR variables are undefined.

        When comparing /usr/pkgsrc/pkgtools/bootstrap-mk-files/files/
        and /usr/share/mk/ diff produces the following fragment:

 .if ${OBJECT_FMT} == "ELF"
-       ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}.tmp
+#  We don't use INSTALL_SYMLINK here because this is just
+#  happening inside the build directory/objdir. XXX Why does
+#  this spend so much effort on libraries that aren't live??? XXX
+.if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \
+       ${HOST_LN} -sf lib${LIB}.so.${SHLIB_FULLVERSION} 
        mv -f lib${LIB}.so.${SHLIB_MAJOR}.tmp lib${LIB}.so.${SHLIB_MAJOR}
-       ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp
+       ${HOST_LN} -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp
        mv -f lib${LIB}.so.tmp lib${LIB}.so

        Most probably, pkgsrc mk files are too old compared to NetBSD.
        Build test library with SHLIB_MAJOR set and SHLIB_MAJOR unset,
        e.g. on FreeBSD 6.3 i386.
        Update bootstrap-mk-files?
        Fix documentation?

Home | Main Index | Thread Index | Old Index