Opened 4 years ago

Closed 4 years ago

#12522 closed enhancement (fixed)

Archive::Zip : test if Test::MockModule is still needed for the testsuite.

Reported by: ken@… Owned by: ken@…
Priority: normal Milestone: 9.1
Component: BOOK Version: SVN
Severity: normal Keywords:


One of the items noted in the changes for Archive::Zip-1.65 (#12510) was:

· Test for presence of Test::MockModule [github/pmqs]

If the testsuite can now pass without that being installed, we could archive it (and perhaps its dependency SUPER). Needs investigation, no urgency.

Change History (5)

comment:1 by ken@…, 4 years ago

Owner: changed from blfs-book to ken@…
Status: newassigned

comment:2 by ken@…, 4 years ago

Since if Test::MockModule is really not needed there are no extra dependencies for Archive::Zip I had a suitable system on which to take a look. The results were embarrassing:

It warns about the missing prerequisite, but that is no big deal in itself. The testsuite then skips the test which needs MockModule and PASSes. But in the modules which it installs is Archive::Zip::MockFileHandle and the comment at the start of that says:

# This is provided to help with writing zip files
# when you have to process them a chunk at a time.

The embarrassing part is that I did not notice that before. Whether or not anything in the book needs that sub-module is a different matter. Looking through the source of libreoffice's core tarball, the only non-changelog non-configure reference to Archive::Zip is in solenv/bin/modules/installer/

    if ( $archive =~ /zip$/ )
        $from = cwd();
        $return_to_start = 1;
        $systemcall = "$installer::globals::zippath -qr $archive .";

        # Using Archive::Zip fails because of very long path names below "share/uno_packages/cache"
        # my $packzip = Archive::Zip->new();
        # $packzip->addTree(".");   # after changing into $tempdir
        # $packzip->writeToFileNamed($archive);
        # $makesystemcall = 0;

Note that it looks as if usage of Archive::Zip is actually commented out.

I've built LO in the past without the perl test deps and not noticed any problems, and since writing to a zip file is not a common activity on linux, I conclude that this does not need to be recommended.

But I'm inclined to keep the dependency and mark it as 'optional (needed if you need to write zip files a chunk at a time)' since removing it technically reduces the functionality of Archive::Zip.

Opinions, please ?

comment:3 by ken@…, 4 years ago

Clicked submit too soon. I'm suggesting marking it as

Optional (needed if you wish to use Module::Zip::MockFileHandle which is for writing zip files a chunk at a time)

comment:4 by Bruce Dubbs, 4 years ago

Too much detail. Just move it to optional without the explanation. We don't want to set a precedent for these minor and unusual dependencies.

comment:5 by ken@…, 4 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.