Attachment 'wanna-build.patch'

Download

   1 diff -ur a/bin/wanna-build b/bin/wanna-build
   2 --- a/bin/wanna-build	2012-07-21 00:22:21.860008495 +0300
   3 +++ b/bin/wanna-build	2012-08-02 15:34:35.048008604 +0300
   4 @@ -1459,9 +1459,10 @@
   5  sub log_ta {
   6  	my $pkg = shift;
   7  	my $action = shift;
   8 -        my $dist = $distribution;
   9 +	my $dist = $distribution;
  10  	my $str;
  11  	my $prevstate;
  12 +	my $state_time = $pkg->{'state_time'} // 0;
  13  
  14  	$prevstate = $pkg->{'previous_state'};
  15  	$str = "$action($dist): $pkg->{'package'}_$pkg->{'version'} ".
  16 @@ -1483,6 +1484,13 @@
  17  		$pkg->{'version'}, $action, $prevstate, $pkg->{'state'},
  18  		$real_user, $user, 'now()') or die $dbh->errstr;
  19  
  20 +	$dbh->do(
  21 +		'INSERT INTO '.pkg_history_table_name().
  22 +		' (package,distribution,version,timestamp,result,build_time) '.
  23 +		' values(?,?,?,now(),?,?)', undef,
  24 +		$pkg->{'package'}, $distribution, $pkg->{'version'}, $pkg->{'state'}, $state_time)
  25 +		or die $dbh->errstr;
  26 +
  27  	if (!($prevstate eq 'Failed' && $pkg->{'state'} eq 'Failed')) {
  28  		$str .= " (with --override)"
  29  			if $opt_override;
  30 @@ -1490,7 +1498,6 @@
  31  	}
  32  }
  33  
  34 -
  35  sub send_mail {
  36  	my $to = shift;
  37  	my $subject = shift;
  38 diff -ur a/triggers/common b/triggers/common
  39 --- a/triggers/common	2012-07-21 00:22:21.864008495 +0300
  40 +++ b/triggers/common	2012-07-21 00:29:00.988008497 +0300
  41 @@ -6,8 +6,6 @@
  42  PATH="/bin:/usr/bin:/org/wanna-build/bin:/org/buildd.debian.org/bin:/org/wanna-build/triggers"
  43  ARCHIVE_MAIN="/org/wanna-build/tmp/archive/debian"
  44  ARCHIVE_BASE="/org/wanna-build/tmp/archive/${ARCHIVE}"
  45 -PAS_BASE="/org/buildd.debian.org/web/quinn-diff"
  46 -PAS_FILE="$PAS_BASE/$SUITE/Packages-arch-specific"
  47  LOCKFILE="${ARCHIVE_BASE}/lock"
  48  ARCHS_lenny="alpha amd64 arm armel hppa i386 ia64 mips mipsel powerpc s390 sparc"
  49  ARCHS_squeeze="amd64 armel i386 ia64 mips mipsel powerpc s390 sparc kfreebsd-amd64 kfreebsd-i386"
  50 @@ -77,7 +75,7 @@
  51      done
  52      [ -f Packages.${SUITE}.i386.non-free ] && PNF="Packages.${SUITE}.%ARCH%.non-free" || PNF=""
  53      [ -f Sources.${SUITE}.non-free ] && SNF="Sources.${SUITE}.non-free" || SNF=""
  54 -    parallel -l 5 -i wanna-build -v --Pas ${PAS_FILE} --merge-v3 -A "{}" --dist=$WB_SUITE Packages.${SUITE}.%ARCH% $PNF . Sources.${SUITE} $SNF . Packages.${SUITE}.%ARCH% Packages.${SUITE}.%ARCH%.build-essential -- ${ARCHS} || true
  55 +    parallel -l 5 wanna-build -v --merge-v3 -A "{}" --dist=$WB_SUITE Packages.${SUITE}.%ARCH% $PNF . Sources.${SUITE} $SNF . Packages.${SUITE}.%ARCH% Packages.${SUITE}.%ARCH%.build-essential -- ${ARCHS} || true
  56  
  57      echo "`date`: ${ARCHIVE}/${SUITE} done"
  58  }
  59 @@ -107,9 +105,7 @@
  60      done
  61      [ -f Packages.${SUITE}.i386.non-free ] && PNF="Packages.${SUITE}.%ARCH%.non-free" || PNF=""
  62      [ -f Sources.${SUITE}.non-free ] && SNF="Sources.${SUITE}.non-free" || SNF=""
  63 -    echo parallel -l 5 -i wanna-build -v --Pas ${PAS_FILE} --merge-v3 -A "{}" --dist=$WB_SUITE Packages.${SUITE}.%ARCH% $PNF . Sources.${SUITE} $SNF . \
  64 -        Packages.${SUITE}.%ARCH%-all . Sources.${SUITE}-all $SNF -- ${ARCHS} 
  65 -    parallel -l 5 -i wanna-build -v --Pas ${PAS_FILE} --merge-v3 -A "{}" --dist=$WB_SUITE Packages.${SUITE}.%ARCH% $PNF . Sources.${SUITE} $SNF . \
  66 +    parallel -l 5 wanna-build -v --merge-v3 -A "{}" --dist=$WB_SUITE Packages.${SUITE}.%ARCH% $PNF . Sources.${SUITE} $SNF . \
  67          Packages.${SUITE}.%ARCH%-all . Sources.${SUITE}-all $SNF -- ${ARCHS} || true
  68  
  69      echo "`date`: ${ARCHIVE}/${SUITE} done"
  70 @@ -144,7 +140,7 @@
  71      done
  72      [ -f Packages.${SUITE}.i386.non-free ] && PNF="Packages.${SUITE}.%ARCH%.non-free" || PNF=""
  73      [ -f Sources.${SUITE}.non-free ] && SNF="Sources.${SUITE}.non-free" || SNF=""
  74 -    parallel -l 5 -i wanna-build -v --Pas ${PAS_FILE} --merge-v3 -A "{}" --dist=$WB_SUITE Packages.${SUITE}.%ARCH% $PNF . Sources.${SUITE} $SNF . \
  75 +    parallel -l 5 wanna-build -v --merge-v3 -A "{}" --dist=$WB_SUITE Packages.${SUITE}.%ARCH% $PNF . Sources.${SUITE} $SNF . \
  76          Packages.${SUITE}.%ARCH%-all -- ${ARCHS} || true
  77  
  78      echo "`date`: ${ARCHIVE}/${SUITE} done"

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2012-07-20 16:43:11, 1.6 KB) [[attachment:trigger.local]]
  • [get | view] (2012-08-02 12:45:06, 3.9 KB) [[attachment:wanna-build.patch]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.