python-mkdebian adds wrongly kde4 dependency

Bug #1002076 reported by Angelo Compagnucci
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-distutils-extra (Ubuntu)
Fix Released
Undecided
Angelo Compagnucci
Precise
Fix Released
Undecided
Unassigned

Bug Description

python-mkdebian adds kde4 dependency if ui file is found also when none of kde4 classes is used.

The error is locate in python-mkdebian:

if subprocess.call('find -name "*.ui" | xargs grep -q \'<widget class="Q\'',
             shell=True) == 0:
         print 'Package uses KDE *.ui files, adding python-kde4-dev build dependency'
         bdeps += ',\n python-kde4-dev'

ui files are grepped for classes beginning in Q when kde4 classes begins in K.

TEST-CASE:
----------

Test-case:
  cd /tmp
  quickly create ubuntu-application test-project
  cd test-project/
  echo '<widget class="Q">' > data/ui/test.ui
  bzr add
  quickly package

Observe in debian/control: no build-dep on python-kde4-dev, if you change the 'Q' to 'K' in test.ui and re-run 'quickly package', it will get added as a build depends.

REGRESSION POTENTIAL:
---------------------

Almost no regression potential. As the changes mostly revolve around descriptive changes in the packaging of apps, there is little which can go wrong.

Related branches

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks for this!

Changed in python-distutils-extra:
status: New → In Progress
Changed in python-distutils-extra:
assignee: nobody → Angelo Compagnucci (angeloc)
Revision history for this message
Martin Pitt (pitti) wrote :

python-distutils-extra (2.32-3) unstable; urgency=low

  * python-mkdebian: Fix wrong kde4 ui file detection regular expression.
    Thanks Angelo Compagnucci! (LP: #1002076)

 -- Martin Pitt <email address hidden> Mon, 21 May 2012 07:56:37 +0200

affects: python-distutils-extra → python-distutils-extra (Ubuntu)
Changed in python-distutils-extra (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Angelo Compagnucci (angeloc) wrote :

[Impact]
python-mkdebian always adds a wrong KDE dependency whatever QT class is used in code. Package should add KDE dependency only if a KDE package is used.

[Development Fix]
Fixed upstream, merge proposal here: https://code.launchpad.net/~angeloc/python-distutils-extra/fix-for-1002076/+merge/106549

[Stable Fix]
Fixed upstream, merge proposal here: https://code.launchpad.net/~angeloc/python-distutils-extra/fix-for-1002076/+merge/106549

[Test Case]
Use python-mkdebian on a QT only software always adds a KDE dependency

[Regression Potential]
No regression here because adding a wrong KDE dependency to a QT only software is a bug. If python-mkdebian fails to add a KDE dependency to a QT only software and this software really relies on python-kde4-dev, you should fix the software, not python-mkdebian.

Revision history for this message
Sebastien Bacher (seb128) wrote :

There seems to be no patch nor merge request to sponsor on this bug, unsubscribing the sponsors, feel free to subscribe ubuntu-sponsors again if there is something to sponsor

description: updated
tags: added: arb
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Angelo, or anyone else affected,

Accepted python-distutils-extra into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/python-distutils-extra/2.33-0ubuntu0.1 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 change the bug tag from verification-needed to verification-done. If it does not, 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 python-distutils-extra (Ubuntu Precise):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Angelo, or anyone else affected,

Accepted python-distutils-extra into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/python-distutils-extra/2.34-0ubuntu0.1 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 change the bug tag from verification-needed to verification-done. If it does not, 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!

description: updated
description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

the testcase was a bit buggy but Didier helped me and fixed it, I can confirm it works!

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.5 KiB)

This bug was fixed in the package python-distutils-extra - 2.34-0ubuntu0.1

---------------
python-distutils-extra (2.34-0ubuntu0.1) precise-proposed; urgency=low

  * Backport some fixes from latest release (and a regression fix):
    - debian/rules: Run Python3 tests under C locale, to expose more unicode
      errors.
    - auto.py: Fix *.ui detection to be robust for non-ASCII files.
      (LP: #1017468)
    - auto.py: Fix a regression with python2 if files have some utf-8 directives
      (LP: #1021969)

python-distutils-extra (2.34-1) unstable; urgency=low

  [ Martin Pitt ]
  * debian/rules: Run Python3 tests under C locale, to expose more unicode
    errors.
  * auto.py: Fix *.ui detection to be robust for non-ASCII files.
    (LP: #1017468)

  [ Didier Roche ]
  * auto.py: Fix a regression with python2 if files have some utf-8 directives
    (LP: #1021969)

python-distutils-extra (2.33-0ubuntu0.1) precise-proposed; urgency=low

  * Backport 2.33-1 to precise as an SRU (LP: #1020017):
    - auto.py: Fix crash when encountering binary files with Python 3.
      (LP: #995653)
    - auto.py: Fix crash when encountering an UTF-8 Python source code file.
    - debian/local/python-mkdebian cleanups: (LP: #706051)
      - Don't use {XS, XB}-Python-Version.
      - Generate an up to date Standards-Version.
      - Generate build dep on debhelper (>= 8) as debian/compat is set to '8'
        and debhelper overrides are used.
      - No need to generate a build dep on cdbs.
    - debian/local/python-mkdebian: For projects using --prefix, install
      binaries into a .../bin/ subdirectory instead of into the main project
      directory. This avoids potential name collisions with local Python
      modules. Thanks to Michael Terry for the patch!
    - debian/local/python-mkdebian: Create copyright format 1.0 compatible
      copyright files. Thanks Andrew Starr-Bochicchio! (LP: #1002379)
    - debian/copyright: Update to copyright 1.0 format.
    - debian/control: Bump Standards-Version to 3.9.3.
    - python-mkdebian: Fix wrong kde4 ui file detection regular expression.
      Thanks Angelo Compagnucci! (LP: #1002076)

python-distutils-extra (2.33-1) unstable; urgency=low

  * auto.py: Fix crash when encountering binary files with Python 3.
    (LP: #995653)
  * auto.py: Fix crash when encountering an UTF-8 Python source code file.

python-distutils-extra (2.32-5) unstable; urgency=low

  [ Andrew Starr-Bochicchio ]
  * debian/local/python-mkdebian cleanups: (LP: #706051)
    - Don't use {XS, XB}-Python-Version.
    - Generate an up to date Standards-Version.
    - Generate build dep on debhelper (>= 8) as debian/compat is set to '8'
      and debhelper overrides are used.
    - No need to generate a build dep on cdbs.

  [ Martin Pitt ]
  * debian/local/python-mkdebian: For projects using --prefix, install
    binaries into a .../bin/ subdirectory instead of into the main project
    directory. This avoids potential name collisions with local Python
    modules. Thanks to Michael Terry for the patch!

python-distutils-extra (2.32-4) unstable; urgency=low

  * debian/local/python-mkdebian: Create copyright format 1.0 compatible
    copyright fi...

Read more...

Changed in python-distutils-extra (Ubuntu Precise):
status: Fix Committed → Fix Released
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.