python-libvirt lacks egg-info on precise

Bug #1379585 reported by houkouonchi on 2014-10-10
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Medium
Unassigned
Precise
Medium
Unassigned

Bug Description

=========================================
SRU Justification
1. Impact: python-libvirt doesn't work with pypi
2. Test case: see below
3. Regression potential: this just adds an egg-info file under /usr/lib/python-2.7. It should not regress in any way.
=========================================

On precise. Package version:

ii python-libvirt 0.9.8-2ubuntu17.20 libvirt Python bindings

Unlike trusty which has egg-info:

/usr/lib/python-2.7/dist-packages/libvirt_python-1.2.2.egg-info

No such file exists with python-libvirt on precise.

This is important as any programs that are packaged so they can be used by pypi will fail as they will try to use new > 1.0 package versions to download as they will be unable to detect the local installed package from the distro:

Here is the output during bootstrap for a program that depends on libvirt-python without the egg file on precise:

    Searching for libvirt-python
    Reading http://pypi.python.org/simple/libvirt-python/
    Best match: libvirt-python 1.2.9
    Downloading https://pypi.python.org/packages/source/l/libvirt-python/libvirt-python-1.2.9.tar.gz#md5=970da28cfdc1c6532c96101b22f94ec4
    Processing libvirt-python-1.2.9.tar.gz
    Running libvirt-python-1.2.9/setup.py -q bdist_egg --dist-dir /tmp/easy_install-gfyjD8/libvirt-python-1.2.9/egg-dist-tmp-l_L3cW
    Package libvirt was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libvirt.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libvirt' found
    Package libvirt was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libvirt.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libvirt' found
    /usr/bin/pkg-config --atleast-version=1.0.2 libvirt
    file build/libvirt.py (for module libvirt) not found
    file build/libvirt_qemu.py (for module libvirt_qemu) not found
    file build/libvirt.py (for module libvirt) not found
    file build/libvirt_qemu.py (for module libvirt_qemu) not found
    file build/libvirt.py (for module libvirt) not found
    file build/libvirt_qemu.py (for module libvirt_qemu) not found
    libvirt-override.c:21:29: fatal error: libvirt/libvirt.h: No such file or directory
    compilation terminated.
    error: Setup script exited with error: command 'gcc' failed with exit status 1

After manually creating the egg-info file which is a very simple file:

    $ cat /usr/lib/python2.7/dist-packages/libvirt_python-0.9.8.egg-info
    Metadata-Version: 1.0
    Name: libvirt-python
    Version: 0.9.8
    Summary: The libvirt virtualization API
    Home-page: http://www.libvirt.org
    Author: Libvirt Maintainers
    Author-email: <email address hidden>
    License: UNKNOWN
    Description: UNKNOWN
    Platform: UNKNOWN

Install goes ok:

    Using /usr/lib/python2.7/dist-packages
    Searching for libvirt-python==0.9.8
    Best match: libvirt-python 0.9.8
    libvirt-python 0.9.8 is already the active version in easy-install.pth

This seems like an easy enough fix that it should be added to precise.

Can we get this updated on precise?

If someone doesn't want to spend the time doing a patch I will gladly build a new package and submit a patch.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libvirt (Ubuntu):
status: New → Confirmed
Changed in libvirt (Ubuntu Precise):
importance: Undecided → Medium
status: New → Confirmed
Changed in libvirt (Ubuntu):
status: Confirmed → Fix Released
Serge Hallyn (serge-hallyn) wrote :

If you feel this needs to be a higher priority, please leave a note saying so.

Serge Hallyn (serge-hallyn) wrote :

(Please ignore comment #3, it was posted to the wrong bug)

no longer affects: libvirt (Ubuntu Precise)
Serge Hallyn (serge-hallyn) wrote :

For the completion of the test case, could you please tell us the name of a package you tried to install with pypi which failed?

description: updated
Changed in libvirt (Ubuntu):
importance: Undecided → Medium
Changed in libvirt (Ubuntu Precise):
importance: Undecided → Medium
houkouonchi (houkouonchi) wrote :

Well it was downburst which is a tool I maintain but the problem is that if you have a program that will pull from pypi for dependencies (and you have libvirt-python) listed as a dependency, (like in this case) then it won't be able to detect you already have the python bindings installed from a system package but instead it will try to download the newest libvirt-python from pypi.

This is problematic for multiple reasons. Since you are using a version of libvirt that is maintained by your distribution then its probably better to just use the same version of python bindings of your installed version of libvirt (IE python-libvirt) rather than try to use bleeding edge from pypi (which likely will fail to build anyway against your old version of libvirt).

I am not sure why you wouldn't want the egg info file installed so things like pypi can detect you already have a version installed. Trusty has the egg-info file and this is not an issue on trusty (just precise).

> I am not sure why you wouldn't want the egg info file installed so

Noone is arguing we don't want it installed. We want a simple test case
("pypi install downburst") to test the new package with the egg-info,
to make sure it is correct.

Hello houkouonchi, or anyone else affected,

Accepted libvirt into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/libvirt/0.9.8-2ubuntu17.21 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in libvirt (Ubuntu Precise):
status: New → Fix Committed
tags: added: verification-needed

The fix for this bug has been awaiting testing feedback in the -proposed repository for precise for more than 90 days. Please test this fix and update the bug appropriately with the results. In the event that the fix for this bug is still not verified 15 days from now, the package will be removed from the -proposed repository.

tags: added: removal-candidate
Serge Hallyn (serge-hallyn) wrote :

Verified by running the bootstrap script in downburst (https://github.com/ceph/downburst.git)

tags: added: verification-done
removed: removal-candidate verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 0.9.8-2ubuntu17.21

---------------
libvirt (0.9.8-2ubuntu17.21) precise-proposed; urgency=medium

  * Add egg-info file (LP: #1379585)
 -- Serge Hallyn <email address hidden> Tue, 10 Feb 2015 15:34:28 -0600

Changed in libvirt (Ubuntu Precise):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for libvirt has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers