Page MenuHomeFreeBSD

release: Make sure 'pkg update' is run with ASSUME_ALWAYS_YES set
Needs RevisionPublic

Authored by dfr on May 29 2025, 11:11 AM.
Tags
None
Referenced Files
F122726606: D50596.diff
Mon, Jul 7, 6:31 PM
Unknown Object (File)
Fri, Jun 27, 10:57 AM
Unknown Object (File)
Fri, Jun 27, 1:57 AM
Unknown Object (File)
Thu, Jun 19, 5:27 AM
Unknown Object (File)
Thu, Jun 19, 5:22 AM
Unknown Object (File)
Thu, Jun 19, 4:03 AM
Unknown Object (File)
Thu, Jun 19, 2:47 AM
Unknown Object (File)
Sun, Jun 15, 5:26 PM
Subscribers

Details

Reviewers
dch
cperciva
Summary

Both 'pkg bootstrap' and 'pkg update' need to have this set to avoid
image builds terminating with an error due to a yes/no prompt.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 64528
Build 61412: arc lint + arc unit

Event Timeline

dfr requested review of this revision.May 29 2025, 11:11 AM

I would like to get this change into 14.3 if possible - it works around a confusing error message caused by 'pkg update' attempting to get a yes/no response.

Now that we have images available from both docker.io and ghcr.io, it might also be a good idea to change the FROM statement to one of these options which would allow the example podman command in share/examples/oci/README to work without manual steps to copy a suitable image to local storage and tag it correctly.

dch requested changes to this revision.Jun 6 2025, 2:14 PM

Sorry I managed to be in Germany for the week when this landed...
I did some testing and the ASSUME... stuff is no longer needed AFAICT.

pkg bootstrap -yr FreeBSD && pkg update -f

Is this simpler, or does it still sometimes break under some scenarios?

This revision now requires changes to proceed.Jun 6 2025, 2:14 PM

BTW when running this against 14.3-RC1 I needed to add a tiny sleep 3
at the end to accommodate pkg(8) still doing whatever pkg does:

The cleanup will free 32 MiB
Deleting files: .......... done
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        pkg: 2.1.2

Number of packages to be removed: 1

The operation will free 47 MiB.
[6d08abef1cdc] [1/1] Deinstalling pkg-2.1.2...
[6d08abef1cdc] [1/1] Deleting files for pkg-2.1.2: .......... done
2025-06-06T14:18:40000326901Z: delete: container not in "stopped" or "created" state (currently "running")
error running container: deleting container: exit status 1
Error: building at STEP "RUN pkg clean -ay && pkg delete -fy pkg && rm -rf /var/db/pkg/repos": while running runtime: exit status 1
dch@wintermute /tmp>