On Fri, 04 Dec 2026 09:53:08 -0800, Chris Lamb wrote:

This is because the testsuite generates a Meta.sqlite3 file that ends
up in the binary package, and so if the testsuite is skipped then the
package contents will differ.

Patch attached that removes this file after running the tests.

This looks good; but it breaks autopkgtests (where the test don't have access to lib/ and therefore don't find Meta.sqlite3):

 46s WARNING: Re-creating /usr/share/perl5/UR/DataSource/Meta.sqlite3 from 
/usr/share/perl5/UR/DataSource/Meta.sqlite3-dump.
 46s DBI connect('dbname=/usr/share/perl5/UR/DataSource/Meta.sqlite3','',...) 
failed: unable to open database file at 
/usr/share/perl5/UR/DataSource/SQLite.pm line 800.
 46s Can't create DB handle for file 
/usr/share/perl5/UR/DataSource/Meta.sqlite3: unable to open database file at 
(eval 205) line 3.
 46s # Looks like your test exited with 255 just after 5.

180s # Failed test 'No exceptions during commit' 180s # at t/URT/t/92_save_object_with_propertyless_column.t line 44. 180s # Can't create DB handle for file /usr/share/perl5/UR/DataSource/Meta.sqlite3: unable to open database file at (eval 205) line 3. 180s not ok 11 - Deleted object was deleted from database

The reason Meta.sqlite3 doesn't exist unless the tests are run is that we remove it in debian/clean (as re-creating breaks building twice in a row).

I guess we need a different approach:
- don't dh_clean it
- move it away and back before/after tests to enable building twice
- always install it for reproducability with and without tests

Oh, this also doesn't work, lib/UR/DataSource/Meta.sqlite3 isn't shipped in the .orig tarball. It's only created during tests. Nice. And I was wrong above, dh_clean is not because of re-creation but because of creation. Ok.


Maybe we need to create it, with our without tests, during package build (and always ship it).

*some time later*

Seems to work. Well, good, I guess.

However,
the binary package includes files such as:
/usr/share/perl5/UR/DataSource/Meta.sqlite3-dump
... regardless of whether the testsuite is run or not — just bringing
to your attention as this smells a little weird (but might be fine).

That's all weird, very weird …


Cheers,
gregor

--
 .''`.  https://info.comodo.priv.at -- Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
`-

Attachment: signature.asc
Description: Digital Signature

Reply via email to