Provide pithos namespace
authorKostas Papadimitriou <kpap@grnet.gr>
Fri, 23 Mar 2012 16:13:12 +0000 (18:13 +0200)
committerKostas Papadimitriou <kpap@grnet.gr>
Fri, 23 Mar 2012 16:13:12 +0000 (18:13 +0200)
and Replace snf-pithos-backend to avoid conflicts when both packages get
installed

snf-pithos-tools/debian/control
snf-pithos-tools/debian/rules

index 702df46..96e0bc5 100644 (file)
@@ -11,6 +11,6 @@ Package: snf-pithos-tools
 Architecture: all
 Depends: ${misc:Depends}, ${python:Depends}
 Provides: ${python:Provides}
+Replaces: snf-pithos-backend
 XB-Python-Version: ${python:Versions}
 Description: Synnefo pithos tools
-
index 789ebc7..61ab410 100755 (executable)
@@ -8,6 +8,14 @@ package=snf-pithos-tools
 override_dh_auto_install:
        dh_auto_install
        
+       # this package provides the pithos namespace __init__.py
+       # because snf-pithos-backend also provides this file
+       # Replaces setting has been added to control file to avoid
+       # dpkg existing files errors
+       for py in $(shell pyversions -vr debian/control); do \
+               cp pithos/__init__.py debian/$(package)/usr/lib/python$$py/*-packages/pithos/; \
+       done
+
        for py in $(shell pyversions -vr debian/control); do \
                rm debian/$(package)/usr/lib/python$$py/*-packages/*-nspkg.pth; \
        done