Circular dependency with phpunit & php-deepcopy

Bug #2073801 reported by Bryce Harrington
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php-deepcopy (Ubuntu)
New
Undecided
Unassigned
php8.3 (Ubuntu)
New
Undecided
Unassigned
phpunit (Ubuntu)
New
Undecided
Unassigned

Bug Description

phpunit depends on php-deepcopy and built against php-deepcopy 1.11.1. Meanwhile the newer php-deepcopy 1.12.0 runs tests against itself using phpunit during *build time*; phpunit needs the older php-deepcopy but can't install it, which causes the tests to fail and in turn causes php-deepcopy to FTBFS. With no build for the new php-deepcopy it's not possible to no-change rebuild phpunit to get around this.

Debian gets through this by performing binary-only uploads followed by a source upload, however Ubuntu policy disallows that approach.

A workaround we've used in the past is to temporarily disable running the tests during build for the problematic package(s), versioning the package with a "maysync1" suffix so that the package can be re-sync'd after the migration completes.

Ideally, the packaging should be fixed to not enter this messy situation to begin with. An approach is being explored with Debian to adjust the autoload.php include to use a relative rather than absolute path in all packages in the dependency chain.

Several PHP packages are affected by this (some reason showing only on the i386 builds), for example composer:

 54s autopkgtest [00:27:50]: test command1: preparing testbed
 55s autopkgtest [00:27:51]: ERROR: Failed to resolve build-deps for /tmp/autopkgtest.X6WsPd/1-autopkgtest-satdep.dsc; apt-get --simulate output:
 55s autopkgtest [00:27:51]: ERROR: | Note, using file '/tmp/autopkgtest.X6WsPd/1-autopkgtest-satdep.dsc' to get the build dependencies
 55s autopkgtest [00:27:51]: ERROR: | Reading package lists...
 55s autopkgtest [00:27:51]: ERROR: | Building dependency tree...
 55s autopkgtest [00:27:51]: ERROR: | Reading state information...
 55s autopkgtest [00:27:51]: ERROR: | Some packages could not be installed. This may mean that you have
 55s autopkgtest [00:27:51]: ERROR: | requested an impossible situation or if you are using the unstable
 55s autopkgtest [00:27:51]: ERROR: | distribution that some required packages have not yet been created
 55s autopkgtest [00:27:51]: ERROR: | or been moved out of Incoming.
 55s autopkgtest [00:27:51]: ERROR: | The following information may help to resolve the situation:
 55s autopkgtest [00:27:51]: ERROR: |
 55s autopkgtest [00:27:51]: ERROR: | The following packages have unmet dependencies:
 55s autopkgtest [00:27:51]: ERROR: | phpunit : Depends: php-deepcopy (>= 1.12.0) but 1.11.1-2 is to be installed
 55s autopkgtest [00:27:51]: ERROR: | E: Unable to correct problems, you have held broken packages.
 55s autopkgtest [00:27:51]: @@@@@@@@@@@@@@@@@@@@ summary
 55s command1 FAIL badpkg
 55s blame: composer
https://autopkgtest.ubuntu.com/results/autopkgtest-oracular/oracular/i386/c/composer/20240722_002802_e76bc@/log.gz

Bryce Harrington (bryce)
description: updated
Revision history for this message
Jeremy Bícha (jbicha) wrote :

I worked around this by temporarily disabling php-deepcopy's tests to bootstrap it and then reverted my changes once it was built and published.

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.