Bug 456797 - Ark doesn't work with original 7-Zip
Summary: Ark doesn't work with original 7-Zip
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: plugins (show other bugs)
Version: 22.04.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-16 13:44 UTC by Hanabishi
Modified: 2022-09-27 21:37 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 22.08.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hanabishi 2022-07-16 13:44:28 UTC
SUMMARY
This issue is referred to https://invent.kde.org/utilities/ark/-/merge_requests/90

Ark doesn't work for me with original 7-Zip, for some reason.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: ArchLinux
KDE Plasma Version: 5.25.3
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5

ADDITIONAL INFORMATION

Debug output:
```
ark.main: Entering application loop
ark.part: Attempting to open archive "/tmp/test.7z"
ark.kerfuffle: Going to create archive "/tmp/test.7z"
ark.kerfuffle: Checking plugin "kerfuffle_cli7z"
ark.kerfuffle: Created read-only interface for "/tmp/test.7z"
ark.kerfuffle: Created read-write interface for "/tmp/test.7z"
ark.cli7z: Loaded cli_7z plugin
ark.cli7z: Setting up parameters...
ark.cli7z: Checking 7z variant...
ark.cli7z: Detected upstream 7-Zip variant.
ark.kerfuffle: Successfully loaded plugin "kerfuffle_cli7z"
ark.kerfuffle: Created archive instance
ark.kerfuffle: Created job instance
ark.kerfuffle: Executing "/usr/bin/7z" ("l", "-slt", "/tmp/test.7z") within directory "/tmp"
ark.kerfuffle: Process finished, exitcode: 0 exitstatus: QProcess::NormalExit
ark.kerfuffle: Job finished, result: true , time: 25 ms
ark.part: Showing columns:  ()
ark.part: No entry listed by the plugin
```

7-Zip cli output with the same flags:
```
$ 7z l -slt /tmp/test.7z

7-Zip (a) 22.00 (x64) : Copyright (c) 1999-2022 Igor Pavlov : 2022-06-15
 64-bit locale=en_US.UTF-8 Threads:12, ASM

Scanning the drive for archives:
1 file, 454 bytes (1 KiB)

Listing archive: /tmp/test.7z

--
Path = /tmp/test.7z
Type = 7z
Physical Size = 454
Headers Size = 122
Method = LZMA2:12
Solid = -
Blocks = 1

----------
Path = README
Size = 467
Packed Size = 332
Modified = 2022-06-19 20:57:44.8489437
Attributes = A -rw-r--r--
CRC = BCA577FA
Encrypted = -
Method = LZMA2:12
Block = 0
```

Test suite also fails:
```
$ ctest --output-on-failure | grep -i 'fail'
 4/18 Test  #4: kerfuffle-deletetest .............***Failed    0.14 sec
FAIL!  : DeleteTest::testDelete(delete a single file (7z, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : DeleteTest::testDelete(delete multiple files (7z, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : DeleteTest::testDelete(delete a single file (zip, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : DeleteTest::testDelete(delete multiple files (zip, kerfuffle_cli7z)) Compared values are not the same
Totals: 8 passed, 4 failed, 0 skipped, 0 blacklisted, 108ms
 5/18 Test  #5: kerfuffle-loadtest ...............***Failed    0.19 sec
FAIL!  : LoadTest::testProperties(7z multivolume) Compared values are not the same
Totals: 21 passed, 1 failed, 1 skipped, 0 blacklisted, 159ms
 7/18 Test  #7: kerfuffle-addtest ................***Failed    1.15 sec
FAIL!  : AddTest::testAdding(without destination (7z, kerfuffle_cli7z)) 'newPaths.contains(path)' returned FALSE. ()
FAIL!  : AddTest::testAdding(without destination (zip, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : AddTest::testAdding(with destination, files (7z, kerfuffle_cli7z)) 'newPaths.contains(path)' returned FALSE. ()
FAIL!  : AddTest::testAdding(with destination, files (zip, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : AddTest::testAdding(with destination, directory (7z, kerfuffle_cli7z)) 'newPaths.contains(path)' returned FALSE. ()
FAIL!  : AddTest::testAdding(with destination, directory (zip, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : AddTest::testAdding(without destination, directory 2 (7z, kerfuffle_cli7z)) 'newPaths.contains(path)' returned FALSE. ()
FAIL!  : AddTest::testAdding(without destination, directory 2 (zip, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : AddTest::testAdding(with destination, directory 2 (7z, kerfuffle_cli7z)) 'newPaths.contains(path)' returned FALSE. ()
FAIL!  : AddTest::testAdding(with destination, directory 2 (zip, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : AddTest::testAdding(overwriting an existing entry (7z, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : AddTest::testAdding(overwriting an existing entry (zip, kerfuffle_cli7z)) Compared values are not the same
Totals: 20 passed, 12 failed, 0 skipped, 0 blacklisted, 1120ms
 8/18 Test  #8: kerfuffle-movetest ...............***Failed    0.99 sec
FAIL!  : MoveTest::testMoving(replace a single file (7z, kerfuffle_cli7z)) 'oldPaths.contains(entry->fullPath())' returned FALSE. ()
FAIL!  : MoveTest::testMoving(replace a single file (zip, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : MoveTest::testMoving(replace several files (7z, kerfuffle_cli7z)) 'oldPaths.contains(entry->fullPath())' returned FALSE. ()
FAIL!  : MoveTest::testMoving(replace several files (zip, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : MoveTest::testMoving(replace a root directory (7z, kerfuffle_cli7z)) 'oldPaths.contains(entry->fullPath())' returned FALSE. ()
FAIL!  : MoveTest::testMoving(replace a root directory (zip, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : MoveTest::testMoving(replace a root directory 2 (7z, kerfuffle_cli7z)) 'oldPaths.contains(entry->fullPath())' returned FALSE. ()
FAIL!  : MoveTest::testMoving(replace a root directory 2 (zip, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : MoveTest::testMoving(replace a directory (7z, kerfuffle_cli7z)) 'oldPaths.contains(entry->fullPath())' returned FALSE. ()
FAIL!  : MoveTest::testMoving(replace a directory (zip, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : MoveTest::testMoving(replace several directories (7z, kerfuffle_cli7z)) 'oldPaths.contains(entry->fullPath())' returned FALSE. ()
FAIL!  : MoveTest::testMoving(replace several directories (zip, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : MoveTest::testMoving(replace several entries (7z, kerfuffle_cli7z)) 'oldPaths.contains(entry->fullPath())' returned FALSE. ()
FAIL!  : MoveTest::testMoving(replace several entries (zip, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : MoveTest::testMoving(move a directory to the root (7z, kerfuffle_cli7z)) 'oldPaths.contains(entry->fullPath())' returned FALSE. ()
FAIL!  : MoveTest::testMoving(move a directory to the root (zip, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : MoveTest::testMoving(rename a file in the root (bug #368530) (7z, kerfuffle_cli7z)) 'oldPaths.contains(entry->fullPath())' returned FALSE. ()
FAIL!  : MoveTest::testMoving(rename a file in the root (bug #368530) (zip, kerfuffle_cli7z)) Compared values are not the same
Totals: 29 passed, 18 failed, 0 skipped, 0 blacklisted, 951ms
 9/18 Test  #9: kerfuffle-copytest ...............***Failed    1.75 sec
FAIL!  : CopyTest::testCopying(copy a single file (7z, kerfuffle_cli7z)) 'oldPaths.contains(entry->fullPath())' returned FALSE. ()
FAIL!  : CopyTest::testCopying(copy a single file (zip, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : CopyTest::testCopying(copy several files (7z, kerfuffle_cli7z)) 'oldPaths.contains(entry->fullPath())' returned FALSE. ()
FAIL!  : CopyTest::testCopying(copy several files (zip, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : CopyTest::testCopying(copy a root directory (7z, kerfuffle_cli7z)) 'oldPaths.contains(entry->fullPath())' returned FALSE. ()
FAIL!  : CopyTest::testCopying(copy a root directory (zip, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : CopyTest::testCopying(copy a root directory 2 (7z, kerfuffle_cli7z)) 'oldPaths.contains(entry->fullPath())' returned FALSE. ()
FAIL!  : CopyTest::testCopying(copy a root directory 2 (zip, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : CopyTest::testCopying(copy a root directory 3 (7z, kerfuffle_cli7z)) 'oldPaths.contains(entry->fullPath())' returned FALSE. ()
FAIL!  : CopyTest::testCopying(copy a root directory 3 (zip, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : CopyTest::testCopying(copy a directory (7z, kerfuffle_cli7z)) 'oldPaths.contains(entry->fullPath())' returned FALSE. ()
FAIL!  : CopyTest::testCopying(copy a directory (zip, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : CopyTest::testCopying(copy several directories (7z, kerfuffle_cli7z)) 'oldPaths.contains(entry->fullPath())' returned FALSE. ()
FAIL!  : CopyTest::testCopying(copy several directories (zip, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : CopyTest::testCopying(copy several entries (7z, kerfuffle_cli7z)) 'oldPaths.contains(entry->fullPath())' returned FALSE. ()
FAIL!  : CopyTest::testCopying(copy several entries (zip, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : CopyTest::testCopying(copy a directory inside itself (7z, kerfuffle_cli7z)) 'oldPaths.contains(entry->fullPath())' returned FALSE. ()
FAIL!  : CopyTest::testCopying(copy a directory inside itself (zip, kerfuffle_cli7z)) Compared values are not the same
FAIL!  : CopyTest::testCopying(copy a directory to the root (7z, kerfuffle_cli7z)) 'oldPaths.contains(entry->fullPath())' returned FALSE. ()
FAIL!  : CopyTest::testCopying(copy a directory to the root (zip, kerfuffle_cli7z)) Compared values are not the same
Totals: 32 passed, 20 failed, 0 skipped, 0 blacklisted, 1712ms
16/18 Test #16: plugins-cli7ztest ................***Failed    0.14 sec
FAIL!  : Cli7zTest::testArchive(archive with one top-level folder) Compared values are not the same
XFAIL  : Cli7zTest::testList(normal-file-1602) Something changed since Qt 5.11, needs investigation.
XFAIL  : Cli7zTest::testList(encrypted-1602) Something changed since Qt 5.11, needs investigation.
XFAIL  : Cli7zTest::testList(multi-volume-1602) Something changed since Qt 5.11, needs investigation.
XFAIL  : Cli7zTest::testList(zip-with-AES256-encryption) Something changed since Qt 5.11, needs investigation.
XFAIL  : Cli7zTest::testList(normal-file-1514) Something changed since Qt 5.11, needs investigation.
XFAIL  : Cli7zTest::testList(encrypted-1514) Something changed since Qt 5.11, needs investigation.
XFAIL  : Cli7zTest::testList(normal-file-1509) Something changed since Qt 5.11, needs investigation.
XFAIL  : Cli7zTest::testList(encrypted-1509) Something changed since Qt 5.11, needs investigation.
XFAIL  : Cli7zTest::testList(normal-file-9381) Something changed since Qt 5.11, needs investigation.
XFAIL  : Cli7zTest::testList(encrypted-9381) Something changed since Qt 5.11, needs investigation.
FAIL!  : Cli7zTest::testRDAAttributes() Compared values are not the same
Totals: 23 passed, 2 failed, 0 skipped, 0 blacklisted, 107ms
67% tests passed, 6 tests failed out of 18
The following tests FAILED:
	  4 - kerfuffle-deletetest (Failed)
	  5 - kerfuffle-loadtest (Failed)
	  7 - kerfuffle-addtest (Failed)
	  8 - kerfuffle-movetest (Failed)
	  9 - kerfuffle-copytest (Failed)
	 16 - plugins-cli7ztest (Failed)
Errors while running CTest
```
Comment 2 Elvis Angelaccio 2022-09-27 21:37:43 UTC
Git commit 6187ddc4bed6b9503406c3b68ddfeec0358e7d99 by Elvis Angelaccio, on behalf of Hanabishi Recca.
Committed on 27/09/2022 at 21:35.
Pushed by elvisangelaccio into branch 'release/22.08'.

Fix incompatibility with original 7-Zip

It is wrong to expect strictly z here, the letter can be different and depends on 7-Zip build type.
FIXED-IN: 22.08.2

M  +1    -1    plugins/cli7zplugin/cliplugin.cpp

https://invent.kde.org/utilities/ark/commit/6187ddc4bed6b9503406c3b68ddfeec0358e7d99