r1892 - in van.pydeb/branches/jinty-dh7/debian (dh_pydeb pydeb.pm)

jinty-guest at users.alioth.debian.org jinty-guest at users.alioth.debian.org
Tue Nov 24 23:02:08 UTC 2009


    Date: Tuesday, November 24, 2009 @ 23:02:05
  Author: jinty-guest
Revision: 1892

fix till it works, I hope

Modified:
  van.pydeb/branches/jinty-dh7/debian/dh_pydeb
  van.pydeb/branches/jinty-dh7/debian/pydeb.pm

Modified: van.pydeb/branches/jinty-dh7/debian/dh_pydeb
===================================================================
--- van.pydeb/branches/jinty-dh7/debian/dh_pydeb	2009-11-24 23:01:46 UTC (rev 1891)
+++ van.pydeb/branches/jinty-dh7/debian/dh_pydeb	2009-11-24 23:02:05 UTC (rev 1892)
@@ -16,41 +16,52 @@
 # Parse environment variables that affect us
 # Extras totally excluded: PYDEB_EXCLUDED_EXTRAS
 for extra in $PYDEB_EXCLUDED_EXTRAS; do
-	excluded_extras=--exclude-extra ${extra} ${excluded_extras}
+	excluded_extras="--exclude-extra ${extra} ${excluded_extras}"
 done
 
 # Extras to be made into metapackages: PYDEB_METAPACKAGE_EXTRAS
 for extra in $PYDEB_METAPACKAGE_EXTRAS; do
 	# Don't put dependencies of metapackages on the main package
-	excluded_extras=--exclude-extra ${extra} ${excluded_extras}
+	excluded_extras="--exclude-extra ${extra} ${excluded_extras}"
 done
 
 # Extras to be assigned to Recommends: PYDEB_RECOMMENDS_EXTRAS
 for extra in $PYDEB_RECOMMENDS_EXTRAS; do
-	recomends_extras=--extra ${extra} ${recomends_extras}
+	recomends_extras="--extra ${extra} ${recomends_extras}"
 	# exclude recommends dependencies from the main package dependencies
-	excluded_extras=--exclude-extra ${extra} ${excluded_extras}
+	excluded_extras="--exclude-extra ${extra} ${excluded_extras}"
 done
 
 # Extras to be assigned to Suggests: PYDEB_SUGGESTS_EXTRAS
 for extra in $PYDEB_SUGGESTS_EXTRAS; do
-	suggests_extras=--extra ${extra} ${suggests_extras}
+	suggests_extras="--extra ${extra} ${suggests_extras}"
 	# exclude recommends dependencies from the main package dependencies
-	excluded_extras=--exclude-extra ${extra} ${excluded_extras}
+	excluded_extras="--exclude-extra ${extra} ${excluded_extras}"
 done
 
+# Now for the real work
+# XXX - do we really have to run this multiple times? can dependencies ever differ for different python versions? (yes)
 for pyvers in `pyversions -vr debian/control`; do
 	py_libdir=$(python${pyvers} -c 'from distutils import sysconfig; print(sysconfig.get_python_lib())')
-	egg_info=debian/${PYDEB_BIN_PACKAGE}${py_libdir}/${PYDEB_PY_PACKAGE}*.egg-info
+	egg_info=debian/tmp${py_libdir}/${PYDEB_PY_PACKAGE}*.egg-info
 	if [ ! -x ${egg_info} ]; then
 	    echo ERROR: could not find package metadata file to work on that matches the pattern ${egg_info}.
 	fi
+	# set dependencies of main package
 	(echo -n 'setuptools:Depends=' && van-pydeb depends --egg-info ${egg_info} ${excluded_extras}) >> debian/${PYDEB_BIN_PACKAGE}.substvars
+	# set provides for the extras included in the main package
 	(echo -n 'setuptools:Provides=' && van-pydeb provides --egg-info ${egg_info} ${excluded_extras}) >> debian/${PYDEB_BIN_PACKAGE}.substvars
-	(echo -n 'setuptools:Provides=' && van-pydeb provides --egg-info ${egg_info} ${excluded_extras}) >> debian/${PYDEB_BIN_PACKAGE}.substvars
-	(echo -n 'setuptools:Recommends=' && van-pydeb provides --egg-info ${egg_info} ${recommends_extras}) >> debian/${PYDEB_BIN_PACKAGE}.substvars
-	(echo -n 'setuptools:Suggests=' && van-pydeb provides --egg-info ${egg_info} ${suggests_extras}) >> debian/${PYDEB_BIN_PACKAGE}.substvars
+	# if some extras were moved to recomends, include them
+	if [ -n "${recomends_extras}" ]; then
+		(echo -n 'setuptools:Recommends=' && van-pydeb depends --egg-info ${egg_info} ${recomends_extras}) >> debian/${PYDEB_BIN_PACKAGE}.substvars
+	fi
+	# if some extras were moved to suggests, include them
+	if [ -n "${suggests_extras}" ]; then
+		(echo -n 'setuptools:Suggests=' && van-pydeb depends --egg-info ${egg_info} ${suggests_extras}) >> debian/${PYDEB_BIN_PACKAGE}.substvars
+	fi
+	# setup the dependencies/provides of dependencies moved to metapcakages
 	for extra in $PYDEB_METAPACKAGE_EXTRAS; do
 		(echo -n 'setuptools:Provides=' && van-pydeb provides --egg-info ${egg_info} --extra ${extra}) >> debian/${PYDEB_BIN_PACKAGE}-${extra}.substvars
+		(echo -n 'setuptools:Depends=' && van-pydeb depends --egg-info ${egg_info} --extra ${extra}) >> debian/${PYDEB_BIN_PACKAGE}-${extra}.substvars
 	done
 done

Modified: van.pydeb/branches/jinty-dh7/debian/pydeb.pm
===================================================================
--- van.pydeb/branches/jinty-dh7/debian/pydeb.pm	2009-11-24 23:01:46 UTC (rev 1891)
+++ van.pydeb/branches/jinty-dh7/debian/pydeb.pm	2009-11-24 23:02:05 UTC (rev 1892)
@@ -5,4 +5,4 @@
 
 insert_after("dh_auto_install", "dh_pydeb");
 
-1;
+1




More information about the pkg-zope-developers mailing list