Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 449422 - How to handle packages having impl-conditional sources?
Summary: How to handle packages having impl-conditional sources?
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-31 10:28 UTC by Michał Górny
Modified: 2013-03-10 11:16 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
An example ebuild with sol. A (unittest2-0.5.1-r1.ebuild,1.41 KB, text/plain)
2013-01-01 12:35 UTC, Michał Górny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-12-31 10:28:56 UTC
Examples: pycairo, unittest2

They have different source tarballs for py2 & py3; both are maintained and versioned the same.


Variant A: ebuild with conditionals

  SRC_URI='py2.5? ( py2-sources )
     py2.6? ( py2-sources )
     ...
     py3.1? ( py3-sources )
     py3.2? ( py3-sources )'

In practice, it would look like:

  SRC_URI="$(python_gen_cond_dep py2-sources python2* pypy*)
     $(python_gen_cond_dep py3-sources python3*)"


Variant B: gtk-like slotting + a virtual

  SLOT py2, ver -r200 with py2 implementations only
  SLOT py3, ver -r300 with py3 implementations only
  virtual which pulls in both implementations


A pros: simple, one ebuild, no change to deps.
A cons: a bit of conditionals.

B pros: a bit cleaner prolly.
B cons: two ebuilds + virtual, change to deps, uneasy to dep on version.

In this case, I think we should really go with A.
Comment 1 Mike Gilbert gentoo-dev 2012-12-31 18:45:39 UTC
A sounds ok.

It might be easier to just have both distfiles in SRC_URI unconditionally. An extra tarball in DISTDIR never hurt anyone.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-01-01 12:35:48 UTC
Created attachment 333932 [details]
An example ebuild with sol. A

I followed floppym's advice and didn't make SRC_URI conditional. But to be honest, I dislike my work. I can't think of a sane way to do an ebuild with per-impl conditional sources.

Curiosity: this package has test failures on every python impl but pypy ;).