Package: composer
Version: 1.0.0~beta1-1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu xenial ubuntu-patch

Hi David,

In Ubuntu, we've found that composer has an undeclared test dependency on
xz-utils.  While the package's tests pass for us at build time, and on three
of five architectures where we run autopkgtests, on two architectures it
seems that xz-utils happens to not be installed in the test environment,
causing a test failure:

  Time: 15.32 seconds, Memory: 20.00Mb

  There was 1 failure:

  1) Composer\Test\Downloader\XzDownloaderTest::testErrorMessages
  Failed asserting that 'Failed to execute tar -xJf 
'/tmp/composer-test-736556ecbc93ac9f6/XzDownloaderTest.php' -C 
'/tmp/composer-test-623556ecbc93ac3f5/composer/a72d1367'

  tar (child): xz: Cannot exec: No such file or directory
  tar (child): Error is not recoverable: exiting now
  tar: Child returned status 2
  tar: Error is not recoverable: exiting now
  ' contains "File format not recognized".

  
/data/adttmp/adt-virt-lxc.shared.2c5mooi4/downtmp/build.Acc/composer-1.0.0~beta1/tests/Composer/Test/Downloader/XzDownloaderTest.php:75


See, e.g.

  
https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-xenial/xenial/armhf/c/composer/20160319_024249@/log.gz

Of course, xz-utils is Build-Essential, so many environments will already
have xz-utils installed.  But it's optional, so for complete correctness
this should be declared as a dependency.

The attached trivial patch addresses this.

Thanks for considering,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
diff -Nru composer-1.0.0~beta1/debian/tests/control composer-1.0.0~beta1/debian/tests/control
--- composer-1.0.0~beta1/debian/tests/control	2016-03-09 17:43:10.000000000 -0800
+++ composer-1.0.0~beta1/debian/tests/control	2016-03-18 20:22:14.000000000 -0700
@@ -1,3 +1,3 @@
 Test-Command: phpunit
 Restrictions: needs-recommends
-Depends: @, php-mbstring, php-symfony-class-loader, php-zip, phpunit
+Depends: @, php-mbstring, php-symfony-class-loader, php-zip, phpunit, xz-utils

Reply via email to