pbr requires the dist name and module name to be the same

Bug #1322882 reported by Fathi Boudra
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Core Infrastructure
Fix Committed
Medium
Khai Do
PBR
Won't Fix
Wishlist
Unassigned

Bug Description

I tried to package jenkins-job-builder 0.8.0 for Debian/Ubuntu and it failed to build from scratch:

/usr/bin/make -C doc html man BUILDDIR=/tmp/buildd/jenkins-job-builder-0.8.0/build/docs
make[2]: Entering directory `/tmp/buildd/jenkins-job-builder-0.8.0/doc'
sphinx-build -b html -d /tmp/buildd/jenkins-job-builder-0.8.0/build/docs/doctrees -W source /tmp/buildd/jenkins-job-builder-0.8.0/build/docs/html
Making output directory...
Running Sphinx v1.2.2

Exception occurred:
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
The full traceback has been saved in /tmp/sphinx-err-wmsosv.log, if you want to report the issue to the developers.

After investigation, the exception is triggered by pbr failing to get jenkins-jobs-builder version.
Further digging into pbr/packaging.py code and get_version function, we fail to get the version from PKG-INFO because package_name = "jenkins_jobs" while "jenkins-job-builders" is expected (and tested).

In jenkins-job-builder, the distribution name is "jenkins-job-builder" but the module name is "jenkins_jobs".
Obviously, pbr doesn't like that as we can see also on https://bugs.launchpad.net/pbr/+bug/1310008 .

As an ugly workaround, we can force PBR_VERSION and will bypass PKG-INFO check.

I understand the bug is mostly a pbr bug but I doubt we'll get a fix in distro. Please advise on proper way to fix the issue with released pbr (0.7.0 in Trusty).

Tags: jjb pbr
Revision history for this message
Fathi Boudra (fboudra) wrote :
Khai Do (zaro0508)
tags: added: jjb
Changed in pbr:
assignee: nobody → Khai Do (zaro0508)
Changed in openstack-ci:
assignee: nobody → Khai Do (zaro0508)
Khai Do (zaro0508)
tags: added: pbr
Khai Do (zaro0508)
Changed in pbr:
assignee: Khai Do (zaro0508) → nobody
Changed in openstack-ci:
assignee: Khai Do (zaro0508) → nobody
Revision history for this message
Marc Abramowitz (msabramo) wrote :

The following change set fixed the issue that you linked to (also involves package name but it's about coverage not working because of a differing package name) - https://review.openstack.org/89205

Revision history for this message
Marc Abramowitz (msabramo) wrote :

I'll let Monty Taylor weigh in on this one, but I wonder if packaging a new version of pbr might help. Current version on PyPI is 0.8.2.

Jeremy Stanley (fungi)
Changed in openstack-ci:
status: New → Confirmed
importance: Undecided → Medium
tags: removed: pbr
Revision history for this message
Khai Do (zaro0508) wrote :
Changed in openstack-ci:
assignee: nobody → Khai Do (zaro0508)
status: Confirmed → Fix Committed
Revision history for this message
Khai Do (zaro0508) wrote :

jenkins-job-builder release 0.3.4 is the last release WITHOUT pbr.

jenkins-job-builder 0.4.x releases are pbr enabled.

Changed in pbr:
status: New → Triaged
importance: Undecided → Wishlist
summary: - jenkins-job-builder 0.8.0 tarball with the switch to pbr is unusable for
- packagers
+ pbr requires the dist name and module name to be the same
Revision history for this message
Khai Do (zaro0508) wrote :

Please ignore comment #5, that comment was for python-jenkins NOT for jenkins-job-builder.

tags: added: pbr
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

Since jenkins-job-builder is packaging with pbr now, it appears this problem is resolved. If that's incorrect, please reopen the bug.

Changed in pbr:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.