[oi-dev] How to combine two source archives into one OI package?

Aurélien Larcher aurelien.larcher at gmail.com
Fri Dec 3 18:02:46 UTC 2021


On Fri, Dec 3, 2021 at 6:23 PM stes at PANDORA.BE <stes at telenet.be> wrote:

>
> Hello,
>
> On the website pkg.opendiana.org I entered "pycairo" in Package Search.
>
> This results in some packages like :
>
> library/python-2/pycairo
> library/python-2/pycairo-26
> library/python/pycairo
> library/python/pycairo-26
> library/python/pycairo-27
> library/python/pycairo-34
> library/python/pycairo-35
>
> Those are distinct IPS packages not versions of the same IPS package.
>
> Without knowing the details of the python Makefile rules, I think the
> manifests
>
> ./pycairo/pycairo-PYVER.p5m
> ./pycairo/pycairo-GENFRAG.p5m
>
> the PYVER is somehow replaced by the Python Version that is targeted.
>
> So producing a 37 or 39 package could produce a different package without
> obsoleting the old package,
> and perhaps using a "mediator" it is possible to deliver the same file in
> two different IPS packages.
>
> The mediator in this case could be the python mediator ?
>
> Unfortunately I'm not familiar with the python build framework, but if you
> search/grep for mediator,
> there are many examples.
>
> For example
>
> grep mediator */*.p5m
>
> setuptools/setuptools-PYVER.p5m:link path=usr/bin/easy_install
> target=easy_install-$(PYVER) mediator=python \
>
> So the symbolic link /usr/bin/easy_install is set to the target
> easy_install-35 or easy_install-37 or whathever the mediator python
> indicates.
>
> Regards,
> David Stes
>
> ----- Op 2 dec 2021 om 22:03 schreef gary mills gary_mills at fastmail.fm:
>
> > I'm working on upgrading the pycairo package to the latest version,
> > but I've run into a conflict with the existing version.  Specifically,
> > the conflict is with usr/include/pycairo/py3cairo.h and
> > usr/lib/pkgconfig/py3cairo.pc, both of which are created by both
> > versions.  The existing version only supports python 3.5.  The latest
> > version supports only 3.7 and 3.9.  The latter are required by many
> > other packages.
> >
> > I could solve the conflict by obsoleting the existing pycairo package.
> > Is this possible?  Do I need to retain it?
> >
> > If I have to retain it, I'll need the Makefile to publish packages for
> > python 3.5, 3.7, and 3.9, using both the existing and latest versions
> > of the source.  How do I do that?  Is it even possible?  I haven't
> > seen any examples of doing that.
>

You could split first the package in two directories:

https://github.com/OpenIndiana/oi-userland/commit/2de4e11a0f8069802bf0d32d3d937bb46edef321

Then provide the headers in /usr/include/pycairoXY like it was done for
pycairo-27, and provide a symlink in the current version
usr/include/pycairo/py3cairo.h -> usr/include/pycairoXY/py3cairo.h  using a
$(PYTHON_X.Y_ONLY) in the manifest to include it only in X.Y version (or
use the GENFRAG manifest), same for the *.pc file.

Actually file path=usr/include/pycairo is provided in py2cairo-27 as a
symlink... so more work will be needed in the future...

When ready to switch to 3.9 as default version you can republish but you
will need a dependency to the 3.5 version that does not ship the symlinks
to avoid conflicts.

It seems a bit overkill to introduce a mediator.



> >
> >
> > --
> > -Gary Mills-          -refurb-                -Winnipeg, Manitoba,
> Canada-
> >
> > _______________________________________________
> > oi-dev mailing list
> > oi-dev at openindiana.org
> > https://openindiana.org/mailman/listinfo/oi-dev
>
> _______________________________________________
> oi-dev mailing list
> oi-dev at openindiana.org
> https://openindiana.org/mailman/listinfo/oi-dev
>


-- 
---
Praise the Caffeine embeddings
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openindiana.org/pipermail/oi-dev/attachments/20211203/ce75225f/attachment.html>


More information about the oi-dev mailing list