summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuta SATOH <nigoro.dev@gmail.com>2016-03-20 14:40:20 +0900
committerYuta SATOH <nigoro.dev@gmail.com>2016-03-20 14:40:20 +0900
commitdea37f9a5a9526120f47ae444978411049017d8c (patch)
tree11432501386933fcbcce094bcf69030b74cd6011
parentsys-freebsd: fix QA. (diff)
downloadgentoo-bsd-dea37f9a5a9526120f47ae444978411049017d8c.tar.gz
gentoo-bsd-dea37f9a5a9526120f47ae444978411049017d8c.tar.bz2
gentoo-bsd-dea37f9a5a9526120f47ae444978411049017d8c.zip
automatic_updater.sh: added create,remove p.mask.
-rwxr-xr-xscripts/automatic_updater.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/automatic_updater.sh b/scripts/automatic_updater.sh
index 0a21d47..1fedb5c 100755
--- a/scripts/automatic_updater.sh
+++ b/scripts/automatic_updater.sh
@@ -39,6 +39,16 @@ update_portage(){
PYTHON_TARGETS="python2_7" "portage-${dl_portage_ver}"/bin/emerge --nodeps sys-apps/portage
}
+create_pmask(){
+ if [[ -f /etc/portage/package.mask ]] ; then
+ mv /etc/portage/package.mask /etc/portage/package.mask.file_tmp
+ mkdir -p /etc/portage/package.mask
+ mv /etc/portage/package.mask.file_tmp /etc/portage/package.mask/local
+ fi
+ [[ ! -d /etc/portage/package.mask ]] && mkdir -p /etc/portage/package.mask
+ echo '>=sys-apps/findutils-4.6' >> /etc/portage/package.mask/force-upgrade
+}
+
update_minimal(){
emerge --nodeps sys-freebsd/freebsd-mk-defs
emerge -u sys-apps/findutils --exclude sys-freebsd/*
@@ -74,6 +84,10 @@ update_gcc(){
emerge sys-devel/binutils --exclude sys-freebsd/*
}
+remove_pmask(){
+ [[ -e /etc/portage/package.mask/force-upgrade ]] && rm /etc/portage/package.mask/force-upgrade
+}
+
update_kernel(){
emerge -C freebsd-sources sys-freebsd/virtio-kmod sys-fs/fuse4bsd && :
emerge --nodeps freebsd-sources
@@ -130,10 +144,12 @@ case "$TARGETMODE" in
"kernel" )
set_profile
move_makeconf
+ create_pmask
update_portage
update_minimal
update_gcc
update_kernel
+ remove_pmask
;;
"kernelonly" ) update_kernel ;;
"freebsd_userland" )