[Pkg-javascript-devel] Bug#1027865: Bug#1027865: Cannot build for backports: fails test "npm package contains only the expected entries in the package dir"
Julian Gilbey
jdg at debian.org
Wed Jan 4 11:00:54 GMT 2023
On Wed, Jan 04, 2023 at 11:13:22AM +0100, Jérémy Lal wrote:
> Le mer. 4 janv. 2023 à 10:39, Julian Gilbey <jdg at debian.org> a écrit :
>
> Package: node-jasmine
> Version: 4.5.0+~cs8.8.0-1
> Severity: normal
>
> Hi,
>
> I'm trying to backport node-jasmine to bullseye (see
> https://bugs.debian.org/973617 for the reason). Unfortunately, one of
> the tests fails:
>
> Failures:
> 1) npm package contains only the expected entries in the package dir
> Message:
> Expected $.length = 6 to equal 5.
> Expected $[0] = 'CHANGELOG.md' to equal 'MIT.LICENSE'.
> Expected $[1] = 'MIT.LICENSE' to equal 'README.md'.
> Expected $[2] = 'README.md' to equal 'bin'.
> Expected $[3] = 'bin' to equal 'lib'.
> Expected $[4] = 'lib' to equal 'package.json'.
> Unexpected $[5] = 'package.json' in array.
>
> This test fails because CHANGELOG.md shouldn't be there - it indeed is not in
> the upstream source.
> Jérémy
Hi Jérémy,
Indeed, the test failure message is quite explicit about this. The
test passes on bookworm (testing) but not on bullseye (+
bullseye-backports) and I don't understand why.
Note that CHANGELOG.md is generated during the build process, and your
comment made me wonder whether somehow it has slipped into the test.
It is feasible that one of the build-dependencies has changed
behaviour between bullseye and bookworm, something like dh-nodejs, in
which case we might need a versioned depends on something, but I don't
know what. (I tried upgrading dh-nodejs, but it didn't help.)
debian/clean lists it as a file to delete on clean.
But it turns out that adding the following to debian/rules allows the
tests to all succeed:
execute_before_dh_auto_test:
mv CHANGELOG.md debian
execute_after_dh_auto_test:
mv debian/CHANGELOG.md .
Thanks for that prod!
Best wishes,
Julian
More information about the Pkg-javascript-devel
mailing list