Skip to content

Commit 9035da2

Browse files
MiahaCybersecMiaha Cybersec
authored and
Miaha Cybersec
committed
docs: remove outdated todo comments (project-copacetic#743)
Signed-off-by: Miaha Cybersec <[email protected]>
1 parent 4def752 commit 9035da2

File tree

4 files changed

+1
-18
lines changed

4 files changed

+1
-18
lines changed

pkg/patch/patch.go

-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ func patchWithContext(ctx context.Context, ch chan error, image, reportFile, pat
212212
}
213213

214214
// Export the patched image state to Docker
215-
// TODO: Add support for other output modes as buildctl does.
216215
patchedImageState, errPkgs, err := manager.InstallUpdates(ctx, updates, ignoreError)
217216
if err != nil {
218217
ch <- err

pkg/pkgmgr/apk.go

-5
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,7 @@ func (am *apkManager) InstallUpdates(ctx context.Context, manifest *unversioned.
157157
// Patch a regular alpine image with:
158158
// - sh and apk installed on the image
159159
// - valid apk db state on the image
160-
//
161-
// TODO: support "distroless" Alpine images (e.g. APKO images)
162-
// Still assumes that APK exists in the target image and is pathed, which can be addressed by
163-
// mounting a copy of apk-tools-static into the image and invoking apk-static directly.
164160
func (am *apkManager) upgradePackages(ctx context.Context, updates unversioned.UpdatePackages, ignoreErrors bool) (*llb.State, []byte, error) {
165-
// TODO: Add support for custom APK config
166161
apkUpdated := am.config.ImageState.Run(llb.Shlex("apk update"), llb.WithProxy(utils.GetProxy()), llb.IgnoreCache).Root()
167162

168163
// If updating all packages, check for upgrades before proceeding with patch

pkg/pkgmgr/dpkg.go

+1-9
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ func getAPTImageName(manifest *unversioned.UpdateManifest, osVersion string) str
9292
osType = manifest.Metadata.OS.Type
9393
}
9494

95-
// TODO: support qualifying image name with designated repository
9695
log.Debugf("Using %s:%s as basis for tooling image", osType, version)
9796
return fmt.Sprintf("%s:%s", osType, version)
9897
}
@@ -302,15 +301,8 @@ func GetPackageInfo(file string) (string, string, error) {
302301
// - sh and apt installed on the image
303302
// - valid dpkg status on the image
304303
//
305-
// Images Images with neither (i.e. Google Debian Distroless) should be patched with unpackAndMergeUpdates
306-
//
307-
// TODO: Support Debian images with valid dpkg status but missing tools. No current examples exist in test set
308-
// i.e. extra RunOption to mount a copy of busybox-static or full apt install into the image and invoking that.
304+
// Images with neither (i.e. Google Debian Distroless) should be patched with unpackAndMergeUpdates.
309305
func (dm *dpkgManager) installUpdates(ctx context.Context, updates unversioned.UpdatePackages, ignoreErrors bool) (*llb.State, []byte, error) {
310-
// TODO: Add support for custom APT config and gpg key injection
311-
// Since this takes place in the target container, it can interfere with install actions
312-
// such as the installation of the updated debian-archive-keyring package, so it's probably best
313-
// to separate it out to an explicit container edit command or opt-in before patching.
314306
aptUpdated := dm.config.ImageState.Run(
315307
llb.Shlex("apt update"),
316308
llb.WithProxy(utils.GetProxy()),

pkg/pkgmgr/rpm.go

-3
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,6 @@ func parseManifestFile(file string) (map[string]string, error) {
388388
// Patch a regular RPM-based image with:
389389
// - sh and an appropriate tool installed on the image (yum, dnf, microdnf)
390390
// - valid rpm database on the image
391-
//
392-
// TODO: Support RPM-based images with valid rpm status but missing tools. (e.g. calico images > v3.21.0)
393-
// i.e. extra RunOption to mount a copy of rpm tools installed into the image and invoking that.
394391
func (rm *rpmManager) installUpdates(ctx context.Context, updates unversioned.UpdatePackages, ignoreErrors bool) (*llb.State, []byte, error) {
395392
pkgs := ""
396393

0 commit comments

Comments
 (0)