pkgsrc-Bugs archive

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

pkg/47265: pkgsrc problem pkg_info: missing package name(s) involving pkgsrc/mk/pkgformat/pkg/

>Number:         47265
>Category:       pkg
>Synopsis:       pkgsrc problem pkg_info: missing package name(s) involving 
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 30 15:55:00 +0000 2012
>Originator:     Richard PALO
>Release:        pkgsrc trunk
SunOS devzone 5.11 oi_151a7 i86pc i386 i86pc Solaris

as found during discussion gnats pkg/47252, there is a problem when building 
packages apparently without any "full" depends.

The error manifests itself thus:
richard@devzone:~/src/pkgsrc/lang/gcc47-libs$ bmake package
===> Installing dependencies for gcc47-libs-4.7.2
The following variables will affect the build process of this package,
gcc47-libs-4.7.2.  Their current value is shown below:

        * GCC_TARGET_MACHINE = x86_64-sun-solaris2.11

You may want to abort the process now with CTRL-C and change their value
before continuing.  Be sure to run `/opt/pkg/bin/bmake clean' after
the changes.
=> Build dependency gcc47-4.7.2{,nb[0-9]*}: found gcc47-4.7.2
===> Overriding tools for gcc47-libs-4.7.2
===> Extracting for gcc47-libs-4.7.2
===> Patching for gcc47-libs-4.7.2
===> Creating toolchain wrappers for gcc47-libs-4.7.2
===> Configuring for gcc47-libs-4.7.2
===> Installing for gcc47-libs-4.7.2
/opt/pkg/sbin/pkg_info -K /var/opt/pkg/db/pkg -qL 'gcc47-4.7.2*' |          
/opt/pkg/bin/nbsed -n -e's,^/opt/pkg/gcc47/,,' -e'/libexec\//d'                 
-e'/libgij/d;/libgcj/d;/libjvm/d'                  -e'/lib.*\.so/p' 
test -d 
 ||    /usr/bin/mkdir -p 
cd /opt/pkg/gcc47 && /bin/pax -rw 
=> Automatic manual page handling
pkg_info: missing package name(s)
usage: pkg_info [-BbcDdFfhIikLmNnpqrRSsVvX] [-e package] [-E package]
                [-K pkg_dbdir] [-l prefix] pkg-name ...
       pkg_info [-a | -u] [flags]
       pkg_info [-Q variable] pkg-name ...
===> Building binary package for gcc47-libs-4.7.2
=> Creating binary package 

I have noticed this problem, at least, with pkgsrc/lang/gcc47-libs and 
pkgsrc/devel/nspr, both occur just after "=> Automatic manual page handling"
A workaround that seems to work is this patch:

richard@devzone:~/src/pkgsrc/mk/pkgformat/pkg$ pkgdiff
 ---    2012-05-13 08:20:11.000000000 +0000
 @@ -309,7 +309,7 @@ ${_SIZE_ALL_FILE}: ${_RDEPENDS_FILE} ${_
          {                                                               \
                  ${CAT} ${_SIZE_PKG_FILE} &&                             \
                  ${_FULL_DEPENDS_CMD} | ${SORT} -u |                     \
 -               ${XARGS} -n 256 ${PKG_INFO} -qs;                        \
 +               ${XARGS} -rn 256 ${PKG_INFO} -qs;                       \
          } |                                                             \
          ${AWK} 'BEGIN { s = 0 } /^[0-9]+$$/ { s += $$1 } END { print s }' \
                  > ${.TARGET}

What I don't like is the gnu-ism...from the xargs man page:
       --no-run-if-empty, -r
            If the standard input does not contain  any  nonblanks,
            do  not  run the command.  Normally, the command is run
            once even if there is no input.  This option is  a  GNU
 I believe there should be a better way to do this, but I'm afraid it is 
perhaps better for the pkgsrc maintainers to determine the best approach.

Home | Main Index | Thread Index | Old Index