Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 890206ba80 | |||
| 79567a647b | |||
| 0769169cc6 | |||
| 03b7b4fd18 |
@@ -14,7 +14,7 @@ Script for builder boxes maintenance.
|
|||||||
--obsolete Upgrades ONLY the packages that are listed obsolete in eix-test-obsolete.
|
--obsolete Upgrades ONLY the packages that are listed obsolete in eix-test-obsolete.
|
||||||
--all Tries to upgrade all package without any euristics
|
--all Tries to upgrade all package without any euristics
|
||||||
--category Tries to upgrade/install all the packages in the specified category
|
--category Tries to upgrade/install all the packages in the specified category
|
||||||
e.g. sabayon-maint-helper "app-office"
|
e.g. sabayon-maint-helper 'app-office'
|
||||||
|
|
||||||
Some options could be set also as environment variables:
|
Some options could be set also as environment variables:
|
||||||
EMERGE_DEFAULT_ARGS Default emerge options
|
EMERGE_DEFAULT_ARGS Default emerge options
|
||||||
@@ -41,12 +41,10 @@ parse_args() {
|
|||||||
--installed)
|
--installed)
|
||||||
echo "Trying to upgrade all the installed packages"
|
echo "Trying to upgrade all the installed packages"
|
||||||
rebuild_all
|
rebuild_all
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
--obsolete)
|
--obsolete)
|
||||||
echo "Upgrading the packages that are marked as obsolete"
|
echo "Upgrading the packages that are marked as obsolete"
|
||||||
build_obsolete
|
build_obsolete
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
--all)
|
--all)
|
||||||
echo "Upgrading/Installing everything available to install"
|
echo "Upgrading/Installing everything available to install"
|
||||||
@@ -55,6 +53,7 @@ parse_args() {
|
|||||||
--category)
|
--category)
|
||||||
echo "Upgrading/Installing everything inside the '$2' category"
|
echo "Upgrading/Installing everything inside the '$2' category"
|
||||||
build_category_installed "$2"
|
build_category_installed "$2"
|
||||||
|
shift
|
||||||
;;
|
;;
|
||||||
--)
|
--)
|
||||||
help_msg
|
help_msg
|
||||||
@@ -82,7 +81,13 @@ main() {
|
|||||||
|
|
||||||
[ -z "$@" ] && help_msg && exit 1
|
[ -z "$@" ] && help_msg && exit 1
|
||||||
|
|
||||||
parse_args "$@"
|
(
|
||||||
|
echo "Acquiring lock"
|
||||||
|
flock -x -w 10 200 || ( echo "Failed acquiring lock in 10 seconds" && exit 1 )
|
||||||
|
|
||||||
|
parse_args "$@"
|
||||||
|
|
||||||
|
) 200>/var/lock/.repomaint
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ build_sync() {
|
|||||||
git stash
|
git stash
|
||||||
git fetch --all
|
git fetch --all
|
||||||
git checkout master
|
git checkout master
|
||||||
git reset --heard origin/master
|
git reset --hard origin/master
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ build_obsolete() {
|
|||||||
for i in $(EIX_LIMIT=0 eix-test-obsolete | grep '\[U\]' | awk '{ print $2 }' | xargs echo | uniq);
|
for i in $(EIX_LIMIT=0 eix-test-obsolete | grep '\[U\]' | awk '{ print $2 }' | xargs echo | uniq);
|
||||||
do
|
do
|
||||||
echo "Build $i"
|
echo "Build $i"
|
||||||
emerge ${EMERGE_DEFAULT_ARGS:---accept-properties=-interactive --verbose --oneshot --nospinner --quiet-build=y --quiet-fail --fail-clean=y --complete-graph --buildpkg --noreplace} $i
|
emerge ${EMERGE_DEFAULT_ARGS:---accept-properties=-interactive -u --verbose --oneshot --nospinner --quiet-build=y --quiet-fail --fail-clean=y --complete-graph --buildpkg --noreplace} $i
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ build_category_installed() {
|
|||||||
for i in $(EIX_LIMIT=0 eix -I --only-names --pure-packages "$SEARCH/" | xargs echo | uniq);
|
for i in $(EIX_LIMIT=0 eix -I --only-names --pure-packages "$SEARCH/" | xargs echo | uniq);
|
||||||
do
|
do
|
||||||
echo "Building $i"
|
echo "Building $i"
|
||||||
emerge ${EMERGE_DEFAULT_ARGS:---accept-properties=-interactive --newuse --noreplace --changed-use --update --verbose --oneshot --nospinner --quiet-build=y --quiet-fail --fail-clean=y --complete-graph --buildpkg} $i
|
emerge ${EMERGE_DEFAULT_ARGS:---accept-properties=-interactive -u --newuse --noreplace --changed-use --update --verbose --oneshot --nospinner --quiet-build=y --quiet-fail --fail-clean=y --complete-graph --buildpkg} $i
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user