Page MenuHomeFreeBSD

D58959.id.diff
No OneTemporary

D58959.id.diff

diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh
--- a/tools/tools/nanobsd/defaults.sh
+++ b/tools/tools/nanobsd/defaults.sh
@@ -667,6 +667,28 @@
pkg_cmd repo "$(nano_pkg_cachedir)"
}
+nano_pkg_disable_repos() {
+ (
+ cd "$NANO_WORLDDIR"
+
+ rm -rf var/db/pkg/repos/FreeBSD-local
+
+ # XXX: Is it better to just rewrite the entire file?
+ sed -i "" -E \
+ -e "s/([[:space:]]*enabled[[:space:]]*:[[:space:]]*)(yes|true|on)/\1no/" \
+ -e "s/To disable a repository/To enable a repository/" \
+ -e "s/FreeBSD-ports: \{ enabled: no \}/FreeBSD-ports: { enabled: yes }/" \
+ -e "s/FreeBSD-ports-kmods: \{ enabled: no \}/FreeBSD-ports-kmods: { enabled: yes }/" \
+ -e "s/Note that the FreeBSD-base repository is disabled by default\./Note that all repositories are disabled by default./" \
+ etc/pkg/FreeBSD.conf
+
+ if $do_precompiled; then
+ tgt_pkg_update_file_sha256 etc/pkg/FreeBSD.conf
+ tgt_pkg_update_config_files_content etc/pkg/FreeBSD.conf
+ fi
+ )
+}
+
#
# Validate NANO_PKGBASE_LIST requirements, optionally clean the package cache,
# write the pkg repo config, and fetch pkgbase packages
@@ -1261,6 +1283,11 @@
# to have the symlink in error though.
tgt_dir2symlink usr/local/etc ../../etc/local 0755
+ # Disable all package repositories
+ if [ -z "$NANO_NOPKGBASE" ]; then
+ nano_pkg_disable_repos
+ fi
+
for d in var etc; do
# Link /$d under /conf
# we use hard links so we have them both places.

File Metadata

Mime Type
text/plain
Expires
Mon, Aug 24, 8:43 PM (8 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37204605
Default Alt Text
D58959.id.diff (1 KB)

Event Timeline