On 25.11.2014 22:52, Gary Oberbrunner wrote:
I'd certainly think those two should stay in sync (name and path).

This would then mean that either VersionedSharedLibrary() in engine/SCons/Tool/__init__.py, ll. 336 :

    if version:
# here we need the full pathname so the links end up in the right directory
        if Verbose:
            print "VerShLib: target lib is = ", map(str, target)
            print "VerShLib: name is = ", target[0].name
            print "VerShLib: dir is = ", target[0].dir.path
        libname = target[0].path
        linknames = VersionShLibLinkNames(version, libname, env)

or the test in "test/LINK/VersionedLib.py" has to get fixed. At the moment, the test only passes because "target[0].path" doesn't contain the version number at its end.

Dirk

On Tue, Nov 25, 2014 at 3:37 PM, Dirk Bächle <[email protected] <mailto:[email protected]>> wrote:

    Hi fellow devs,

    I'm currently working on my patch for switching the Node class to
    __slots__, and there is one final test in the suite which doesn't
    pass and keeps bugging me: test/LINK/VersionedLib.py.

    The basic problem seems to be that the "shlib_emitter" in the
    "link.py" tool rewrites the name of the target node:

    ===================================================

    def shlib_emitter(target, source, env):
        Verbose = True
        platform = env.subst('$PLATFORM')
        for tgt in target:
            tgt.attributes.shared = 1
        try:
            # target[0] comes in as libtest.so. Add the version extensions
            version = env.subst('$SHLIBVERSION')
            if version:
                version_names = shlib_emitter_names(target, source, env)
                # change the name of the target to include the version
    number
                target[0].name = version_names[0]
                for name in version_names:
                    env.SideEffect(name, target[0])
                    env.Clean(target[0], name)
                    if Verbose:
                        print "shlib_emitter: add side effect - ",name
        except KeyError:
            version = None
        return (target, source)

    ===================================================

    but it doesn't amend the ".path" at the same time, so both entries
    are actually out of synch in the following:

      name = "libtest.so.2.5.4"
      path = "libtest.so"

    for the test example.

    My question: Do we allow the name of a Node to be anything, or (as
    I assumed until now) is the "name" always the trailing part of the
    "path"?

    Best regards,

    Dirk

    _______________________________________________
    Scons-dev mailing list
    [email protected] <mailto:[email protected]>
    https://pairlist2.pair.net/mailman/listinfo/scons-dev




--
Gary

_______________________________________________
Scons-dev mailing list
[email protected]
https://pairlist2.pair.net/mailman/listinfo/scons-dev

Reply via email to