Compare commits

...

7 Commits

Author SHA1 Message Date
Ettore Di Giacinto 5f75f6e64b builder: do not emerge preserved rebuild if PRETEND is set 2017-03-20 11:19:17 +01:00
Ettore Di Giacinto 9fd7ce2582 builder: PRETEND avoids also package removals. 2017-03-20 11:17:59 +01:00
Ettore Di Giacinto a62baaf0ea builder: PRETEND, add -p to equo/emerge arguments 2017-03-19 11:50:09 +01:00
Ettore Di Giacinto bf78080418 Revert "builder: add PRETEND environment variable"
This reverts commit 575ec04147.
2017-03-18 13:54:12 +01:00
Ettore Di Giacinto 218dfa9dcd sabayon-buildpackages: add PRETEND support 2017-03-15 14:12:12 +01:00
Ettore Di Giacinto 575ec04147 builder: add PRETEND environment variable 2017-03-15 11:50:41 +01:00
Ben Roberts 903aa0fa0d add SYS_PTRACE capability to docker build, to prevent sandbox ptrace errors 2016-11-02 11:21:03 +00:00
2 changed files with 14 additions and 4 deletions
+12 -3
View File
@@ -40,6 +40,7 @@ my $remote_overlay = $ENV{REMOTE_OVERLAY};
my $qualityassurance_checks = $ENV{QA_CHECKS} // 0;
my $remote_conf_portdir = $ENV{REMOTE_CONF_PORTDIR};
my $remote_portdir = $ENV{REMOTE_PORTDIR};
my $pretend = $ENV{PRETEND} // 0;
my $make_conf = $ENV{MAKE_CONF};
@@ -523,7 +524,8 @@ if ($use_equo) {
safe_call("equo i $equo_install_args --bdeps $_")
for ( @packages_deps, @equo_install )
; ## bail out here, if installs fails. emerge will compile a LOT of stuff
if ( @equo_remove > 0 ) {
if ( @equo_remove > 0 and !$pretend) {
say "Removing with equo: @equo_remove";
system("equo rm --nodeps $_") for (@equo_remove);
}
}
@@ -548,12 +550,19 @@ if ( $qualityassurance_checks == 1 ) {
say "*** Ready to compile, finger crossed ***";
if($pretend){
say "----> PRETEND mode <----";
$equo_install_args.=" -p";
$emerge_defaults_args.=" -p"
}
system("emerge --info")
; #always give detailed information about the building environment, helpful to debug
my $rt;
if ( $emerge_remove and $emerge_remove ne "" ) {
if ( $emerge_remove and $emerge_remove ne "" and !$pretend) {
say "Removing with emerge: $emerge_remove";
system("emerge -C $_") for split( / /, $emerge_remove );
}
@@ -570,7 +579,7 @@ my $return = $rt >> 8;
# best effort -B
compile_packs( "injected_targets", @injected_packages );
if ($preserved_rebuild) {
if ($preserved_rebuild and !$pretend) {
system("emerge -j $jobs --buildpkg \@preserved-rebuild");
system("revdep-rebuild");
+2 -1
View File
@@ -8,7 +8,7 @@ MAKE_CONF="${MAKE_CONF:-$SAB_WORKSPACE/specs/make.conf}"
OUTPUT_DIR="${OUTPUT_DIR:-$SAB_WORKSPACE/portage_artifacts/}"
LOCAL_OVERLAY="${LOCAL_OVERLAY:-$SAB_WORKSPACE/local_overlay}"
ENTROPY_REPOSITORY="${ENTROPY_REPOSITORY:-main}" # Can be weekly, main, testing
DOCKER_OPTS="${DOCKER_OPTS:--ti --rm}"
DOCKER_OPTS="${DOCKER_OPTS:--ti --rm --cap-add=SYS_PTRACE}"
. /sbin/sabayondevkit-functions.sh
@@ -56,6 +56,7 @@ docker_volumes=( -v "$OUTPUT_DIR:/usr/portage/packages" )
[ -z "$REMOTE_CONF_PORTDIR" ] || docker_env+=(-e "REMOTE_CONF_PORTDIR=$REMOTE_CONF_PORTDIR")
[ -z "$REMOTE_PORTDIR" ] || docker_env+=(-e "REMOTE_PORTDIR=$REMOTE_PORTDIR")
[ -z "$ETP_NOCACHE" ] || docker_env+=(-e "ETP_NOCACHE=$ETP_NOCACHE")
[ -z "$PRETEND" ] || docker_env+=(-e "PRETEND=$PRETEND")
[ -d "$LOCAL_OVERLAY" ] && docker_volumes+=(-v "$LOCAL_OVERLAY:/usr/local/local_portage")
if [ -e $MAKE_CONF ]; then