[Debian-olpc-devel] sugar-terminal-activity troubles

Jonas Smedegaard dr at jones.dk
Sun Jul 4 23:19:01 UTC 2010

On Sun, Jul 04, 2010 at 12:49:01PM -0700, Luke Faraone wrote:
>On 07/01/2010 01:28 PM, Jonas Smedegaard wrote:
>> python-sugar.mk does not ensure Policy-compliant build-dependencies.  
>> It only provides some helper routines.  You declared the 
>> build-dependencies yourself with the following line in debian/rules:
>> CDBS_DEPENDS = $(call cdbs_sugar_anybranchdeps,python-sugar python-sugar-toolkit)
>> For a branch-independent activity you need no branch expansion, so 
>> could instead do something like this:
>> CDBS_DEPENDS = python-sugar, python-sugar-toolkit-0.88 | python-sugar-toolkit
>I tried doing that. That seems to control the dependency information, 
>not the build dependency information.

Right, above I only deal with binary dependencies - which needs those 
fixes above.  And actually the python-sugar dependency is wrong too - 
here is a proper string:

CDBS_DEPENDS = python-sugar-0.88 | python-sugar, python-sugar-toolkit-0.88 | python-sugar-toolkit

Build-dependencies need fixing too - although for slightly different 
reason: Contrary to binary dependencies it is legal to build-depend on a 
virtual package, but only if it deterministic - i.e. is provided only by 
a single real package (as is the case with some -dev packages with 
soname included in package name and then providing a virtual package 
without the soname.

...so in reality the exact same kind of thing is needed here (as none of 
the virtual packages are provided only by a single real one).

>Changing CDBS_DEPENDS to CDBS_BUILD_DEPENDS and "= " to "+= ," results 
>in the following build-deps:

You should not change it - above needs to be done too.

>python-sugar / p-s-toolkit as well as CDBS are listed twice. How can I 
>remove the duplicate python-sugar listing? It looks like it is being 
>added in line 60 of /usr/share/cdbs/1/class/python-sugar.mk:
>> # Sugar-related dependencies
>> CDBS_BUILD_DEPENDS_class_python-sugar_sugar ?= $(call cdbs_sugar_anybranchdeps,python-sugar python-sugar-toolkit), unzip
>> CDBS_BUILD_DEPENDS += $(comma) $(CDBS_BUILD_DEPENDS_class_python-sugar_sugar)

You found the right piece.  What then to do about it is add an override, 
like this:

CDBS_BUILD_DEPENDS_class_python-sugar_sugar = python-sugar-0.88 | python-sugar, python-sugar-toolkit-0.88 | python-sugar-toolkit, unzip

>Also, why is python-sugar adding a dep on python-dev if s-terminal-a is 
>arch all?

The reason for this is that in theory it might truly be needed in some 
corner cases, and Python Policy therefore mentions this possibility.

I have not come across any such corner case and cannot imagine what it 
would look like, so cannot handle such exceptions in CDBS and need to 
play safe by default.

I have begun adding the following to the rules file of packagings where 
I have verified that python-dev indeed is not necessary:

# Suppress unneeded auto-resolved build-dependency on python-dev
CDBS_BUILD_DEPENDS_class_python-distutils = python$(cdbs_python_nondefault_version)

Kind regards,

  - Jonas

  * Jonas Smedegaard - idealist & Internet-arkitekt
  * Tlf.: +45 40843136  Website: http://dr.jones.dk/

  [x] quote me freely  [ ] ask before reusing  [ ] keep private
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/debian-olpc-devel/attachments/20100705/961758d3/attachment-0001.pgp>

More information about the Debian-olpc-devel mailing list