debian-forge-composer/internal/manifest
Tomáš Hozza f8b39cd34e manifest/os: fix SUPPRESSED_ERROR issue reported by Coverity
Fix the following error reported by Coverity:
```
Defect type: SUPPRESSED_ERROR
1. osbuild-composer-75/_build/src/github.com/osbuild/osbuild-composer/internal/manifest/os.go:546: suppressed_error: The error returned by the function "GetVerStrFromPackageSpecList(p.packageSpecs, "dracut-config-rescue")" is not explicitly checked.
2. osbuild-composer-75/_build/src/github.com/osbuild/osbuild-composer/internal/manifest/os.go:546: remediation: Explicitly check the return error.
   544|   				}
   545|
   546|-> 				rescueVer, _ := rpmmd.GetVerStrFromPackageSpecList(p.packageSpecs, "dracut-config-rescue")
   547|   				hasRescue := rescueVer != ""
   548|   				bootloader = osbuild.NewGrub2LegacyStage(
```

Change the code to check if the called function returned an error or
not. If not error is returned, then the function returns a package
version string.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-03-01 20:20:52 +01:00
..
anaconda.go manifest: add only necessary repositories to each pipeline 2023-02-23 16:22:42 +01:00
build.go manifest: add only necessary repositories to each pipeline 2023-02-23 16:22:42 +01:00
coi_iso_tree.go ignition: drop embedded provisioning url 2023-02-07 13:30:22 +01:00
commit.go Separate ostree ref from parent spec in Pipelines and ImageKinds 2022-10-11 10:00:22 +02:00
commit_deployment.go ignition: enable systemd firstboot condition through kargs 2023-02-28 18:35:45 +01:00
commit_server_tree.go internal: FIXME notes for container package set 2023-02-23 16:22:42 +01:00
coreos_installer.go manifest: add only necessary repositories to each pipeline 2023-02-23 16:22:42 +01:00
efi_boot_tree.go manifest: always add inst.stage2 kernel option for Anaconda 2022-12-13 07:49:32 +00:00
iso.go manifest: add any pipeline to ISO pipeline 2022-12-11 12:37:37 +00:00
iso_rootfs.go osbuild/mkdir: rename Path struct to MkdirStagePath 2023-01-19 11:15:33 +01:00
iso_tree.go osbuild/mkdir: rename Path struct to MkdirStagePath 2023-01-19 11:15:33 +01:00
manifest.go manifest: helper function for collecting pipeline repos 2023-02-23 16:22:42 +01:00
oci_container.go osbuild: simplify and unify tree stage inputs 2022-09-29 18:09:38 +02:00
os.go manifest/os: fix SUPPRESSED_ERROR issue reported by Coverity 2023-03-01 20:20:52 +01:00
os_test.go manifest: Add tests for subscriptions 2023-02-09 09:41:15 +01:00
pipeline.go manifest: support for container embedding 2022-11-28 17:20:49 +01:00
qcow2.go artifact: this represents the artifacts a manifest exports 2022-07-22 16:04:07 +02:00
raw.go manifest: make the partition tool for raw images configurable 2023-01-25 20:37:12 +01:00
raw_ostree.go osbuild: simplify and unify tree stage inputs 2022-09-29 18:09:38 +02:00
tar.go manifest: support all tar options in tar pipeline 2022-11-28 17:20:49 +01:00
vmdk.go artifact: this represents the artifacts a manifest exports 2022-07-22 16:04:07 +02:00
vpc.go manifest: support specifying force_size for VPC 2023-01-25 20:37:12 +01:00
xz.go osbuild: rework XZ stage inputs 2023-01-30 11:24:08 +01:00