On 2018/11/26 10:44, Sebastien Marie wrote:
> On Sun, Nov 25, 2018 at 02:19:01PM -0500, Daniel Jakots wrote:
> > On Thu, 28 Jun 2018 15:27:04 +0100, Stuart Henderson
> > <[email protected]> wrote:
> >
> > > @pkgpath devel/py-libmagic${MODPY_FLAVOR}
> >
> > This doesn't work.
> > If I have @pkgpath devel/py-libmagic, only py2 gets updated. If I have
> > @pkgpath devel/py-libmagic${MODPY_FLAVOR}, none gets updated.
> > In order to test, I put
> > @pkgpath devel/py-libmagic
> > @pkgpath devel/py-libmagic,python3
> >
> > and pkg_add updated both:
> > py-libmagic-5.34->py-magic-0.4.15v0: ok
> > py3-libmagic-5.34->py3-magic-0.4.15v0: ok
> >
> > The only other python port that has something like that is
> > py-sqlalchemy and it has what sthen said:
> > @pkgpath databases/py-sqlalchemy${MODPY_FLAVOR}
> >
> > Any idea?
>
> with "@pkgpath devel/py-libmagic${MODPY_FLAVOR}" in pkg/PLIST, the
> +CONTENTS file has "${MODPY_FLAVOR}" verbatim in it. so the variable
> isn't substituted. I am unsure if it is expected or not.
Oh, it will need SUBST_VARS += MODPY_FLAVOR as well then.
> espie@, could you comment on it ? the purpose is to have two migration
> paths for:
>
> - devel/py-libmagic -> devel/py-magic
> - devel/py-libmagic,python3 -> devel/py-magic,python3
>
> please note it seems incorrect to me to have both lines ("@pkgpath
> py" and "@pkgpath py3") as the two versions still exists and could be
> installed separately.
Yes, and it will cause future updates to ask whether you want the
py- or py3- version. (@pkgpath is more like "give an additional path
XX for this package" rather than "also match updates for existing
packages with path XX").
The alternative is to use
%%python3%%
!%%python3%%
in PLIST, and add two files PFRAG.python3 and PFRAG.no-python3 with
the relevant @pkgpath line. But it's easier to substitute the variable.