pkgsrc-Users archive

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

Re: What happened to make show-depends-options ?



Am 10.05.2019 um 22:47 schrieb mueller6725%twc.com@localhost:
> make show-depends-options 2>&1 | tee show-depends-options.log (run from /BETA1/pkgsrc/print/hplip directory):
>
> make[1]: don't know how to make show-depends-pkgpaths. Stop
> make[1]: don't know how to make show-depends-pkgpaths. Stop
> test: stopped: unexpected operator
> ===> Options for make[1]: stopped in /BETA1/pkgsrc
> cd: bad substitution
> ===> Options for
> test: stopped: unexpected operator

Ah, now we're getting closer.

The show-depends-options target is defined in mk/misc/show.mk and runs
the following commands:

    ${_DEPENDS_WALK_CMD} ${PKGPATH}
    ${RECURSIVE_MAKE} ${MAKEFLAGS} show-options

The _DEPENDS_WALK_CMD command runs depends-depth-first.awk to process
all dependencies. And in there we find:

    cmd = "if " TEST " -d " dir "; then cd " dir " && "
          MAKE " show-depends-pkgpaths DEPENDS_TYPE=\""
          depends_type "\"; fi"

The two error messages "cd: bad substitution" and "test: stopped" look
closely related to that command. Probably the list of directories is
somewhat broken.

To see why, you should edit the depends-depth-first.awk program to show
the actual command that it runs and what these commands output. To do
this, add 2 lines around the "while (cmd |" line, so that the code looks
like this:

    cmd = "if " TEST " -d " dir "; then ...
    print("running command: " cmd) > "/dev/stderr"
    while (cmd | getline depends_pkgpath) {
        print("found dependency: " depends_pkgpath) > "/dev/stderr"

Now when you now "make show-depends-options" again, the error messages
will still appear. But around them, you will see the actual command that
is causing it. Some of these commands will have special characters (like
parentheses, ampersands, asterisks) in them, and these special
characters produce the error messages.

The next step will then be to look where these special characters come
from. To analyze this further, I first need to see what these special
characters are. So please run:

    make show-depends-options

and post the output of that command again. This will provide further clues.


Home | Main Index | Thread Index | Old Index