← Back to issue list

7zip sources are broken and undocumented

View original Github issue

Metadata

Project
craft-parts
Number
#1443
Type
issue
State
closed
Author
mr-cal
Labels
Status: Triaged Type: Documentation Type: Bug
Created
Updated
Closed

Current evaluation

Closed after being assigned to a contributor. The bug was fixed by correcting the source type mapping to properly install the 7z package and adding missing documentation.

Suggested action:

No scores available.

Issue body

### Bug Description 1. 7z sources don't work in the crafts. I tested on Rockcraft 1.16 and Snapcraft 8.13. 2. 7z sources aren't documented ([example](https://canonical-craft-parts.readthedocs-hosted.com/latest/common/craft-parts/reference/part_properties/#source-type)) It could be the [source-type here](https://github.com/canonical/craft-parts/blob/c5bf8edf35b0739081cd354c1c695496f5a4be2b/craft_parts/packages/deb.py#L409) is `7zip` instead of `7z`, so the package doesn't get installed. ### To Reproduce Run snapcraft with the following yaml and with a 7z file named `test.7z`: ### part yaml ```shell name: 7z base: core22 version: "0.1" summary: test the 7z source description: | This is a basic snap containing a 7z source. grade: devel confinement: devmode parts: 7z: plugin: dump source: test.7z ``` ### Relevant log output ```shell 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:19.846 process sevenz:5 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:19.846 add action sevenz:5(0) 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:19.846 get repository attribute: attr=get_packages_for_source_type, repository:<class 'craft_parts.packages.deb.Ubuntu'> 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:19.847 Installing build-packages 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:19.847 get repository attribute: attr=install_packages, repository:<class 'craft_parts.packages.deb.Ubuntu'> 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:19.847 Installing build-snaps 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.389 verify plugin environment for part 'sevenz' 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.390 Checking if 'version' exists. 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.390 Getting value for 'version'. 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.390 Got '0.1' (updated=False) for 'version'. 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.390 'version' exists. 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.390 Getting value for 'version'. 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.390 Got '0.1' (updated=False) for 'version'. 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.390 Checking if 'grade' exists. 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.390 Getting value for 'grade'. 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.390 Got 'devel' (updated=False) for 'grade'. 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.390 'grade' exists. 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.390 Getting value for 'grade'. 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.390 Got 'devel' (updated=False) for 'grade'. 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.391 set repository attribute: attr=stage_packages_filters, value=None, repo:<class 'craft_parts.packages.deb.Ubuntu'> 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.391 Pulling sevenz 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.391 execute action sevenz:Action(part_name='sevenz', step=Step.PULL, action_type=ActionType.RUN, reason=None, project_vars=ProjectVarInfo(root={}), properties=ActionProperties(changed_files=None, changed_dirs=None)) 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.391 remove directory /root/parts/sevenz/src 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.393 7z: No such file or directory 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.398 Traceback (most recent call last): 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.398 File "/snap/snapcraft/16570/lib/python3.12/site-packages/snapcraft/application.py", line 472, in main 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.398 return app.run() 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.398 ^^^^^^^^^ 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.398 File "/snap/snapcraft/16570/lib/python3.12/site-packages/craft_application/application.py", line 663, in run 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.398 return_code = self._run_inner() 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.398 ^^^^^^^^^^^^^^^^^ 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.398 File "/snap/snapcraft/16570/lib/python3.12/site-packages/snapcraft/application.py", line 183, in _run_inner 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.398 return_code = super()._run_inner() 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.398 ^^^^^^^^^^^^^^^^^^^^ 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.398 File "/snap/snapcraft/16570/lib/python3.12/site-packages/craft_application/application.py", line 606, in _run_inner 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.398 dispatcher = self._get_dispatcher() 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.398 ^^^^^^^^^^^^^^^^^^^^^^ 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.398 File "/snap/snapcraft/16570/lib/python3.12/site-packages/snapcraft/application.py", line 410, in _get_dispatcher 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.398 self._check_for_classic_fallback() 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.398 File "/snap/snapcraft/16570/lib/python3.12/site-packages/snapcraft/application.py", line 322, in _check_for_classic_fallback 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.398 raise errors.ClassicFallback() 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.398 snapcraft.errors.ClassicFallback 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.398 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.398 During handling of the above exception, another exception occurred: 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 Traceback (most recent call last): 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 File "/snap/snapcraft/16570/lib/python3.12/site-packages/snapcraft/parts/parts.py", line 215, in run 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 aex.execute(action, stdout=stream, stderr=stream) 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 File "/snap/snapcraft/16570/lib/python3.12/site-packages/craft_parts/executor/executor.py", line 353, in execute 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 self._executor.execute(actions, stdout=stdout, stderr=stderr) 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 File "/snap/snapcraft/16570/lib/python3.12/site-packages/craft_parts/executor/executor.py", line 153, in execute 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 self._run_action(act, stdout=stdout, stderr=stderr) 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 File "/snap/snapcraft/16570/lib/python3.12/site-packages/craft_parts/executor/executor.py", line 246, in _run_action 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 handler.run_action(action, stdout=stdout, stderr=stderr) 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 File "/snap/snapcraft/16570/lib/python3.12/site-packages/craft_parts/executor/part_handler.py", line 313, in run_action 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 state = handler(step_info, stdout=stdout, stderr=stderr) 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 File "/snap/snapcraft/16570/lib/python3.12/site-packages/craft_parts/executor/part_handler.py", line 338, in _run_pull 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 self._run_step( 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 File "/snap/snapcraft/16570/lib/python3.12/site-packages/craft_parts/executor/part_handler.py", line 679, in _run_step 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 return step_handler.run_builtin() 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 ^^^^^^^^^^^^^^^^^^^^^^^^^^ 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 File "/snap/snapcraft/16570/lib/python3.12/site-packages/craft_parts/executor/step_handler.py", line 141, in run_builtin 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 return handler() 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 ^^^^^^^^^ 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 File "/snap/snapcraft/16570/lib/python3.12/site-packages/craft_parts/executor/step_handler.py", line 145, in _builtin_pull 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 self._source_handler.pull() 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 File "/snap/snapcraft/16570/lib/python3.12/site-packages/craft_parts/sources/base.py", line 277, in pull 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 self.provision(self.part_src_dir, src=source_file) 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 File "/snap/snapcraft/16570/lib/python3.12/site-packages/craft_parts/sources/sevenzip_source.py", line 55, in provision 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 self._run_output(["7z", "x", f"-o{dst}", str(sevenzip_file)]) 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 File "/snap/snapcraft/16570/lib/python3.12/site-packages/craft_parts/sources/base.py", line 209, in _run_output 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 return subprocess.check_output(command, text=True).strip() 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 File "/snap/snapcraft/current/usr/lib/python3.12/subprocess.py", line 466, in check_output 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 File "/snap/snapcraft/current/usr/lib/python3.12/subprocess.py", line 548, in run 2026-02-03 15:00:21.009 :: 2026-02-03 15:00:20.399 with Popen(*popenargs, **kwargs) as process: 2026-02-03 15:00:21.010 :: 2026-02-03 15:00:20.399 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2026-02-03 15:00:21.010 :: 2026-02-03 15:00:20.399 File "/snap/snapcraft/current/usr/lib/python3.12/subprocess.py", line 1026, in __init__ 2026-02-03 15:00:21.010 :: 2026-02-03 15:00:20.399 self._execute_child(args, executable, preexec_fn, close_fds, 2026-02-03 15:00:21.010 :: 2026-02-03 15:00:20.399 File "/snap/snapcraft/current/usr/lib/python3.12/subprocess.py", line 1955, in _execute_child 2026-02-03 15:00:21.010 :: 2026-02-03 15:00:20.399 raise child_exception_type(errno_num, err_msg, err_filename) 2026-02-03 15:00:21.010 :: 2026-02-03 15:00:20.399 FileNotFoundError: [Errno 2] No such file or directory: '7z' ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Closed after being assigned to a contributor. The bug was fixed by correcting the source type mapping to properly install the 7z package and adding missing documentation.
qwen/qwen3.6-35b-a3b Reported broken 7z source extraction and missing documentation caused by a source-type mismatch. Triage confirmed a 7zip versus 7z package naming discrepancy. The report was assigned to a contributor for resolution and subsequently closed.
qwen/qwen3.6-35b-a3b Broken 7z source handling and missing documentation were triaged and assigned to a developer. The report was closed and superseded by internal Jira ticket CRAFT-5001 to track the upcoming fix and documentation updates.
qwen3.6-35b-a3b-mtp-q6 Reported as broken and undocumented. Root cause identified as a source type mismatch (7zip vs 7z) and transitional package behavior in Ubuntu 24.04+. Closed after assignment to @canon-cat for investigation and fix.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1514 fix: 7z(ip) sources support (#1443) craft-parts closed Closed without merging due to a failing Canonical CLA check. The contribution mapping 7z source types received no reviews and was abandoned.
76%