pkgsrc-Bugs archive

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

pkg/40085: x11/py-gtk2 (from devel/meld) python version confusion



>Number:         40085
>Category:       pkg
>Synopsis:       x11/py-gtk2 (from devel/meld) python version confusion
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 02 18:35:00 +0000 2008
>Originator:     Robert Elz
>Release:        NetBSD 4.0_STABLE  (pkgsrc current within past 12 hours)
>Organization:
        Prince of Songkla University
>Environment:
System: NetBSD jade.coe.psu.ac.th 4.0_STABLE NetBSD 4.0_STABLE 
(JADE-1.696-20080517) #9: Fri May 23 18:55:13 ICT 2008 
kre%jade.coe.psu.ac.th@localhost:/usr/obj/4/kernels/JADE i386
Architecture: i386
Machine: i386
>Description:
        devel/meld requires python version 2.5 (uses 2.5 syntax).
        pkgsrc default for python is version 2.4
        devel/meld requires x11/py-gtk2

        Building from source, with devel/meld and x11/py25-gtk2
        needing to be compiled (ie: no existing binary pkg for either)
        results in building py24-gtk2 instead of py25-gtk2 (this is built
        from source even if a binary package for py24-gtk2 exists, though
        that is not a surprise really).

>How-To-Repeat:
        Attempt to build devel/meld with nothing related to python in
        mk.conf, and no binary package for py25-gtk2

jade# pkg_comp -cx4 chroot
PKG_COMP ==> Mounting sandboxed filesystems
PKG_COMP ==> Entering sandbox `/local/pkg_comp/4x'
pkg_comp:x4.conf# grep PY /etc/mk.conf
pkg_comp:x4.conf# ^D
PKG_COMP ==> Unmounting sandboxed filesystems

        Expect to see this (heavily edited) build log.

        This was produced using pkg_comp with libkver and NetBSD 4.0
        sets installed (except the x* sets) X11_TYPE=modular is in
        mk.conf.   None of that info is likely to be relevant for this
        problem - other than that this build started in an almost
        empty sandbox, nothing relevant for this package was installed
        wben the build started, though there were many binary packages
        available (the sandbox would have contained pkg_install, digest,
        libkver and lintpkgsrc - and perl 5.10 for the last of those).

        The build log was ...

===> Binary install for meld-1.2.1
=> Installing meld-1.2.1 from /pkg_comp/packages/All
pkg_add: no pkg found for 'meld-1.2.1', sorry.
pkg_add: 1 package addition failed
=> No binary package found for meld-1.2.1; installing from source.
=> Bootstrap dependency digest>=20010302: found digest-20080510
=> Checksum SHA1 OK for meld-1.2.1.tar.bz2
=> Checksum RMD160 OK for meld-1.2.1.tar.bz2
===> Installing dependencies for meld-1.2.1
==========================================================================
The following variables will affect the build process of this package,
meld-1.2.1.  Their current value is shown below:

        * PYTHON_VERSION_DEFAULT = 24

Based on these variables, the following variables have been set:

        * PYPACKAGE = python25

You may want to abort the process now with CTRL-C and change their value
before continuing.  Be sure to run `/usr/bin/make clean' after
the changes.
==========================================================================

        [ To this point all is fine, meld wants python 2.5 ]

        [ In the following I have just left the "successfully installed"
          log entry line for binary packages that were installed, there
          was nothing significant in the entries noting that the package
          was not already present, and was being looked for ..... ]

intltool-0.40.5 successfully installed.
gmake-3.81 successfully installed.
checkperms-1.10 successfully installed.

        [ OK, now we're to where py-gtk2 is needed ] ...

=> Installing py25-gtk2>=2.8.0 from /pkg_comp/packages/All

        [ And it is py25-gtk2 that is wanted ]

pkg_add: no pkg found for 'py25-gtk2>=2.8.0', sorry.
pkg_add: 1 package addition failed
=> No binary package found for py25-gtk2>=2.8.0; installing from source.

        [ This is expected, the binary package does not exist ]

=> Bootstrap dependency digest>=20010302: found digest-20080510
=> Checksum SHA1 OK for pygtk-2.13.0.tar.bz2
=> Checksum RMD160 OK for pygtk-2.13.0.tar.bz2

        [ We have digest installed, and the correct distfile for py-gtk2 ]

===> Installing dependencies for py24-gtk2-2.13.0nb1

        [ but now ... it is about to build the wrong thing ]
        [ from this point, there's not really any hope left, but ...]

==========================================================================
The following variables will affect the build process of this package,
py24-gtk2-2.13.0nb1.  Their current value is shown below:

        * PYTHON_VERSION_DEFAULT = 24

Based on these variables, the following variables have been set:

        * PYPACKAGE = python24

You may want to abort the process now with CTRL-C and change their value
before continuing.  Be sure to run `/usr/bin/make clean' after
the changes.
==========================================================================

        [ again, it has decided to build py24-gtk2, given that the
         above message is expected - it just isn't what is needed ]

        [ most of what follows has been edited away, there was really
          the complete log of a 100% successful build of py24-gtk2
          from source through installation to building the binpkg ]

=> Build dependency libtool-base>=1.5.18nb5: NOT found
=> Verifying bin-install for ../../devel/libtool-base
===> Binary install for libtool-base>=1.5.18nb5
=> Installing libtool-base>=1.5.18nb5 from /pkg_comp/packages/All
libtool-base-1.5.26 successfully installed.
=> Returning to build of py24-gtk2-2.13.0nb1
        [ lots & lots deleted ...]
===> Building binary package for py24-gtk2-2.13.0nb1
=> Creating binary package /pkg_comp/packages/All/py24-gtk2-2.13.0nb1.tgz

        [ all very nice, never mind that that binpkg existed already,
          no real harm done, just a little wasted time, then ... ]

ERROR: [depends.mk] A package matching ``py25-gtk2>=2.8.0'' should
ERROR:     be installed, but one cannot be found.  Perhaps there is a
ERROR:     stale work directory for ../../x11/py-gtk2?
*** Error code 1

        [ Oops ... we know we wanted py25-gtk2 and that's what was
          supposed to be built, it just wasn't.   The "stale work
          directory" certainly was not the problem here, we started
          with an empty sandbox (in which the work directories get
          placed) and in any case, pkg_comp is zealous (overzealous)
          in running "make clean" - work directories are almost never
          left around - you have to try real hard ]

Stop.
make: stopped in /usr/pkgsrc/devel/meld
*** Error code 1

Stop.

>Fix:
        I tried converting devel/meld from the DEPENDS+= variety
        to the .include ..../buildlink3.mk variety on the assumption
        (ie: wild guess) that the buildlink3.mk file might have some
        extra magic that would make a difference.  It didn't, it ended
        up with the same result (just in a different way).  That would
        also be a sub-optimal solution, as it would force devel/meld
        to require a newer version of py-gtk2 than it currently says
        it requires (there seems to be no way with py-gtk2/buildlink3.mk
        to avoid getting as a minimum the dependency requirement it
        imposes, which is more than devel/meld claims to need).

        I suspect the problem is somewhere inside x11/py-gtk2,
        as devel/melb also requires x11/py-gnome2 and that one seems
        to correctly want to build py25-gnome2 (if I cause it to be built
        before py-gtk2 rather than after) - not fall back to
        py24-gnome2 - but it is a bit hard to be sure, as that build
        also requires x11/py-gtk2 and so needs to compile it to get
        py25-gtk2-* installed, and when reached via that path
        py-gtk2 still builds py24-gtk2 so the build of py25-gnome2
        aborts just like the build of devel/meld.

        Further, devel/bzr-gtk has the exact same problem as devel/meld
        which suggests either a common problem between them, or that the
        problem is in py-gtk2.  I suspect the latter.

        I haven't found any other packages that require python25 and
        also require py-gtk2, but I have not done an exhaustive search.

        I don't see what (to me) is any blatant difference between
        py-gnome2 and py-gtk2 that would explain why the latter
        insists on building the version for the default python
        version whereas the former does not (and nor do most other
        python packages - I have tried building a few other things that
        require a python version that is not 2.4 and also require a
        py-* package as a dependency, and where latter needs to be built
        from source, and none of those seem to have this particular problem.

        I suspect that if I just set PYTHON_VERSION_DEFAULT=25
        then it might all just work, but I really would prefer to use
        the pkgsrc defaults here (if anything should work, that should).
        Just bumping the pkgsrc default python version might "fix"
        the immediate problem, but it isn't really getting rid of the bug.



Home | Main Index | Thread Index | Old Index