Page MenuHomeFreeBSD

bsdinstall: Stop setting a specific repo when using --repo-conf-dir
Needs RevisionPublic

Authored by brd on Mon, Oct 13, 7:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 7, 8:38 AM
Unknown Object (File)
Mon, Nov 3, 7:24 PM
Unknown Object (File)
Sat, Nov 1, 6:00 PM
Unknown Object (File)
Fri, Oct 31, 8:32 PM
Unknown Object (File)
Fri, Oct 31, 2:32 AM
Unknown Object (File)
Wed, Oct 29, 9:44 AM
Unknown Object (File)
Wed, Oct 29, 7:13 AM
Unknown Object (File)
Wed, Oct 29, 7:04 AM
Subscribers

Details

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 67760
Build 64643: arc lint + arc unit

Event Timeline

brd requested review of this revision.Mon, Oct 13, 7:27 PM

What is the goal of this change? Do you want to make it possible for the user to set a custom BSDINSTALL_PKG_REPOS_DIR without requiring them to name their repository FreeBSD-base? I think it would be more robust to add a BSDINSTALL_BASE_REPO_NAME environment variable instead to support that use-case.

Restricting the pkg commands to a single repository seems more robust to me and I don't see a reason to regress that.

ivy requested changes to this revision.Tue, Oct 14, 11:24 AM
ivy added a subscriber: ivy.

i can see two use cases for this:

  • a repo built from src doesn't have pkg(8), but we can get it from the ports repository
  • the repository might not be called FreeBSD-base

but i don't believe this is the right fix for either issue. in the first case, i'd be okay with a flag like --all-repos to optionally disable the repo restriction. for the second, as Isaac says, a way to set the repo name.

involving ports by default in bsdinstall is just too dangerous, pkg(8) can still sometimes do strange things.

This revision now requires changes to proceed.Tue, Oct 14, 11:24 AM

I build an image populated with another custom repo and this makes it easier. It allows for just dropping the config and repo into /usr/freebsd-packages next to the base repo.

Since the directory only contains the base repo and --repo-conf-dir is set this doesn't pose any risk?

sorry for the delay: i see your point but i'm still not entirely comfortable with this change. are we sure that BSDINSTALL_PKG_REPOS_DIR will only contain the base repository? what if the repo dir already exists in the target and has other config files? (i'm not sure if this is a supported situation for bsdinstall pkgbase, but...)

would a better fix not be to just name your custom repository FreeBSD-base, since this is the canonical name for the base repository?