[PKG-Openstack-devel] [MoM] Packaging manila

Malihe Asemani ml.asemani at gmail.com
Sat May 23 18:04:21 UTC 2015


Hey Thomas,

On Wed, May 13, 2015 at 3:18 AM, Thomas Goirand <thomas at goirand.fr> wrote:
> My hint here is to try to do:
>
> python -c "import
manila.tests.share.drivers.netapp.dataontap.client.test_client_cmode"
>
> and see what's the error. I did that, and could see:
>
> ImportError: No module named lxml
>
> Result: please add python-lxml as build-depends-indep.
>

As Andreas mentioned before, lxml is added to the control file. I did what
you proposed and the output is:

$*ython -c "import
manila.tests.share.drivers.netapp.dataontap.client.test_client_cmode"*

Traceback (most recent call last):

 File "<string>", line 1, in <module>

 File
"manila/tests/share/drivers/netapp/dataontap/client/test_client_cmode.py",
line 33, in <module>

 class NetAppClientCmodeTestCase(test.TestCase):

 File
"manila/tests/share/drivers/netapp/dataontap/client/test_client_cmode.py",
line 1710, in NetAppClientCmodeTestCase

 @ddt.unpack

AttributeError: 'module' object has no attribute 'unpack'


As you can see, some thing is wrong with ddt.unpack.

*$ python -c "import ddt"* #Done! It is ok.

*$ python -c "import ddt.unpack"*

Traceback (most recent call last):

 File "<string>", line 1, in <module>

 ImportError: No module named unpack

As mentioned in DDT documentations, unpack is one of ddt modules and so
importing ddt.unpack should not faced with an error.

I noticed that you are the maintainer of python-ddt package. Therefore I
thought the best approach for solving the problem is asking from you :)

> BTW, please do run pkgos-reqsdiff, it will show lots of issues. Note that
you need to run pkgos-fetch-fake-repo so that pkgos-reqsdiff can use
madison-lite using the versions in Jessie, otherwise it wont be able to
report versions correctly.

I did pkgos-reqsdiff and pushed it on git, when you introduced this tool.
But all of the efforts were done without pkgos-fetch-fake-repo. So, i
re-ran this command.
When I use pkgos-fetch-fake-repo it warns about some version numbers which
should be removed or added to the control file. The output of
'pkgos-reqsdiff' is some thing like (The verbose version of output is
attached):

--- /tmp/pkgos-reqsdiff1.woz5Jz 2015-05-23 17:43:43.531307483 +0000
+++ /tmp/pkgos-reqsdiff1.NdtQVi 2015-05-23 17:43:54.943269331 +0000
@@ -3,9 +3,9 @@
                dh-systemd,
                openstack-pkg-tools (>= 23~),
                po-debconf,
-               python-all,
+               python-all (>= 2.6.6-3~),
@@ -25,15 +25,15 @@
                      python-netaddr,
                      python-neutronclient (>= 2.3.11),
                      python-novaclient (>= 2:2.22.0),
-                     python-oslo.concurrency,
+                     python-oslo.concurrency (>= 1.8.0),
                      python-oslo.config (>= 1:1.9.3),

After applying these changes and adding version numbers, I ran 'cme fix
dpkg-control' and the result is some thing like this:

mali at buildEnv:/home/mali/manila$ *cme fix dpkg-control*

Fixing dpkg-control configuration...

Reading package lists... Done

Building dependency tree

Reading state information... Done

Warning in 'source Build-Depends:5' value 'python-all (>= 2.6.6-3~)':
unnecessary versioned dependency: python-all >= 2.6.6-3~. Debian has
squeeze -> 2.6.6-3+squeeze7; wheezy -> 2.7.3-4+deb7u1; jessie-kfreebsd ->
2.7.9-1; jessie -> 2.7.9-1; stretch -> 2.7.9-1; sid -> 2.7.9-1;

Warning in 'source Build-Depends-Indep:19' value 'python-oslo.concurrency
(>= 1.8.0)': unnecessary versioned dependency: python-oslo.concurrency >=
1.8.0. Debian has jessie-backports -> 1.8.0-1~bpo8+1; stretch -> 1.8.0-1;
sid -> 1.8.0-1;

These two tools reports two different result.

I personally believe cme report is correct, because I checked the version
numbers in stable/testing/unstable repo (at least for 3-4 of the packages),
and the cme output about version numbers was completely true. Maybe we need
to some little changes in 'pkgos-reqsdiff'.  Or we can just recommend to do
a 'cme fix dpk-control' after running 'wrap-and-sort -t -a',
'pkgos-fetch-fake-repo',
and 'pkgos-reqsdiff'.

>
> If you didn't get it, pkgos-reqsdiff does a diff between the dependency
parts which is in your debian/control (try to use
pkgos-show-control-depends), and what it calculates using the
requirements.txt and tests-requirements.txt (try pkgos-parse-requirements).
>
> The part on top (the Build-Depends:) is nearly always the same, so it's
calculated using some static heuristics, like: does the package has debconf
templates? Does it has python3 support? Stuff like that...
>
> Again, this isn't a magic tool, but a helper for you, as a package
maintainer, to use and check if you didn't forget anything. For example
here, it wouldn't have show you the missing python-lxml
Build-Depends-Indep:, as upstream didn't declare it at all.
>
> I hope this helps...
>
Thanks for explanation :)

Best regards,
Mali


> Cheers,
>
> Thomas Goirand (zigo)
>
>
> _______________________________________________
> Openstack-devel mailing list
> Openstack-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/openstack-devel




--
------------
you can't start the next chapter if you keep re-reading the last one

mali
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/openstack-devel/attachments/20150523/64f16960/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cme and reqsdiff.odt
Type: application/vnd.oasis.opendocument.text
Size: 52768 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/openstack-devel/attachments/20150523/64f16960/attachment-0001.odt>


More information about the Openstack-devel mailing list