Hello community,

here is the log from the commit of package build for openSUSE:Factory checked 
in at 2012-12-05 13:47:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/build (Old)
 and      /work/SRC/openSUSE:Factory/.build.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "build", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/build/build.changes      2012-10-08 
20:27:30.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.build.new/build.changes 2012-12-05 
13:47:37.000000000 +0100
@@ -1,0 +2,6 @@
+Mon Nov 26 08:49:59 UTC 2012 - [email protected]
+
+- fixed deb building
+- collecting statistics during VM build
+
+-------------------------------------------------------------------

Old:
----
  master.diff
  obs-build-20120927.tar.gz

New:
----
  obs-build-20121123.tar.gz
  osc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ build-initvm.spec ++++++
--- /var/tmp/diff_new_pack.XeTSLD/_old  2012-12-05 13:47:38.000000000 +0100
+++ /var/tmp/diff_new_pack.XeTSLD/_new  2012-12-05 13:47:38.000000000 +0100
@@ -20,7 +20,7 @@
 Summary:        A Script to Build SUSE Linux RPMs
 License:        GPL-2.0+
 Group:          Development/Tools/Building
-Version:        20120927
+Version:        20121123
 Release:        0
 Source:         obs-build-%{version}.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ build.spec ++++++
--- /var/tmp/diff_new_pack.XeTSLD/_old  2012-12-05 13:47:38.000000000 +0100
+++ /var/tmp/diff_new_pack.XeTSLD/_new  2012-12-05 13:47:38.000000000 +0100
@@ -20,11 +20,10 @@
 Summary:        A Script to Build SUSE Linux RPMs
 License:        GPL-2.0+ and GPL-2.0
 Group:          Development/Tools/Building
-Version:        20120927
+Version:        20121123
 Release:        0
 #!BuildIgnore:  build-mkbaselibs
 Source:         obs-build-%{version}.tar.gz
-Patch0:         master.diff
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildArch:      noarch
 # Manual requires to avoid hard require to bash-static
@@ -88,7 +87,6 @@
 
 %prep
 %setup -q -n obs-build-%version
-%patch0 -p1
 
 %build
 

++++++ PKGBUILD ++++++
--- /var/tmp/diff_new_pack.XeTSLD/_old  2012-12-05 13:47:38.000000000 +0100
+++ /var/tmp/diff_new_pack.XeTSLD/_new  2012-12-05 13:47:38.000000000 +0100
@@ -1,5 +1,5 @@
 pkgname=build
-pkgver=2012.07.19
+pkgver=20121123
 pkgrel=1
 pkgdesc="Build packages in sandbox"
 arch=('i686' 'x86_64')
@@ -8,7 +8,7 @@
 groups=('base-devel')
 depends=('perl')
 source=(obs-build-${pkgver}.tar.gz)
-md5sums=('643d53f6327913eecf57fb6fa166db5e')
+md5sums=('2c66ccbe77cedb3f15d20816d6715440')
 
 package() {
   msg "Installing build ..."

++++++ build.dsc ++++++
--- /var/tmp/diff_new_pack.XeTSLD/_old  2012-12-05 13:47:38.000000000 +0100
+++ /var/tmp/diff_new_pack.XeTSLD/_new  2012-12-05 13:47:38.000000000 +0100
@@ -1,6 +1,6 @@
 Format: 1.0
 Source: build
-Version: 20120927
+Version: 20121123
 Binary: build
 Maintainer: Adrian Schroeter <[email protected]>
 Architecture: all

++++++ obs-build-20120927.tar.gz -> obs-build-20121123.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20120927/Build/Arch.pm 
new/obs-build-20121123/Build/Arch.pm
--- old/obs-build-20120927/Build/Arch.pm        2012-09-27 09:32:16.000000000 
+0200
+++ new/obs-build-20121123/Build/Arch.pm        2012-11-26 09:49:40.000000000 
+0100
@@ -26,7 +26,7 @@
   $str =~ s/^[ \t]+//;
   while ($str =~ /([\"\'])/) {
     my $q = $1;
-    $str =~ s/$q(.*?)$q/quote($1, $q, $vars)/e;
+    last unless $str =~ s/$q(.*?)$q/quote($1, $q, $vars)/e;
   }
   if ($str =~ /\$/) {
     $str =~ s/\$([a-zA-Z0-9_]+|\{([^\}]+)\})/$vars->{$2 || $1} ? join(' ', 
@{$vars->{$2 || $1}}) : "\$$1"/ge;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20120927/Build/Rpm.pm 
new/obs-build-20121123/Build/Rpm.pm
--- old/obs-build-20120927/Build/Rpm.pm 2012-09-27 09:32:16.000000000 +0200
+++ new/obs-build-20121123/Build/Rpm.pm 2012-11-26 09:49:40.000000000 +0100
@@ -1,5 +1,7 @@
 package Build::Rpm;
 
+our $unfilteredprereqs = 0;
+
 use strict;
 
 use Digest::MD5;
@@ -128,7 +130,7 @@
   my %m;
   $m{'0'} = $macname;
   $m{'**'} = join(' ', @args);
-  my %go = split(/(:?)/, $getopt);
+  my %go = (split(/(:?)/, $getopt, -1), undef);
   while (@args && $args[0] =~ s/^-//) {
     my $o = shift @args;
     last if $o eq '-';
@@ -286,7 +288,7 @@
          $line = 'MACRO';
          last;
        } elsif ($macname eq 'define' || $macname eq 'global') {
-         if ($line =~ /^\s*([0-9a-zA-Z_]+)(\([^\)]*\))?\s*(.*?)$/) {
+         if ($line =~ /^\s*([0-9a-zA-Z_]+)(?:\(([^\)]*)\))?\s*(.*?)$/) {
            my $macname = $1;
            my $macargs = $2;
            my $macbody = $3;
@@ -331,7 +333,7 @@
            $line = 'MACRO';
            last;
          }
-         if ($macros_args{$macname}) {
+         if (defined($macros_args{$macname})) {
            # macro with args!
            if (!defined($macdata)) {
              $line =~ /^\s*([^\n]*).*?$/;
@@ -441,7 +443,10 @@
       my @deps = $deps =~ 
/([^\s\[,]+)(\s+[<=>]+\s+[^\s\[,]+)?(\s+\[[^\]]+\])?[\s,]*/g;
       while (@deps) {
        my ($pack, $vers, $qual) = splice(@deps, 0, 3);
-       next if $pack =~ /\//;
+       if (!$unfilteredprereqs && $pack =~ /^\//) {
+         $ifdeps = 1;
+         next unless $config->{'fileprovides'}->{$pack};
+       }
        push @prereqs, $pack unless grep {$_ eq $pack} @prereqs;
       }
       next;
@@ -569,6 +574,7 @@
   "REQUIREVERSION" => 1050,
   "NOSOURCE"       => 1051,
   "NOPATCH"        => 1052,
+  "SOURCEPACKAGE"  => 1106,
   "PROVIDEFLAGS"   => 1112,
   "PROVIDEVERSION" => 1113,
   "DIRINDEXES"     => 1116,
@@ -721,7 +727,7 @@
       }
     }
   }
-  if ($forcebinary && $stags{1044} && !$res{$stags{1044}}) {
+  if ($forcebinary && $stags{1044} && !$res{$stags{1044}} && !($stags{1106} && 
$res{$stags{1106}})) {
     $res{$stags{1044}} = [ '(none)' ]; # like rpm does...
   }
 
@@ -832,7 +838,7 @@
 sub query {
   my ($handle, %opts) = @_;
 
-  my @tags = qw{NAME SOURCERPM NOSOURCE NOPATCH SIGTAG_MD5 PROVIDENAME 
PROVIDEFLAGS PROVIDEVERSION REQUIRENAME REQUIREFLAGS REQUIREVERSION};
+  my @tags = qw{NAME SOURCERPM NOSOURCE NOPATCH SIGTAG_MD5 PROVIDENAME 
PROVIDEFLAGS PROVIDEVERSION REQUIRENAME REQUIREFLAGS REQUIREVERSION 
SOURCEPACKAGE};
   push @tags, qw{EPOCH VERSION RELEASE ARCH};
   push @tags, qw{FILENAMES} if $opts{'filelist'};
   push @tags, qw{SUMMARY DESCRIPTION} if $opts{'description'};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20120927/Build.pm 
new/obs-build-20121123/Build.pm
--- old/obs-build-20120927/Build.pm     2012-09-27 09:32:16.000000000 +0200
+++ new/obs-build-20121123/Build.pm     2012-11-26 09:49:40.000000000 +0100
@@ -202,6 +202,8 @@
   $config->{'repotype'} = [];
   $config->{'patterntype'} = [];
   $config->{'fileprovides'} = {};
+  $config->{'constraint'} = [];
+  $config->{'expandflags'} = [];
   for my $l (@spec) {
     $l = $l->[1] if ref $l;
     next unless defined $l;
@@ -218,7 +220,7 @@
       }
       next;
     }
-    if ($l0 eq 'preinstall:' || $l0 eq 'vminstall:' || $l0 eq 'cbpreinstall:' 
|| $l0 eq 'cbinstall:' || $l0 eq 'required:' || $l0 eq 'support:' || $l0 eq 
'keep:' || $l0 eq 'prefer:' || $l0 eq 'ignore:' || $l0 eq 'conflict:' || $l0 eq 
'runscripts:') {
+    if ($l0 eq 'preinstall:' || $l0 eq 'vminstall:' || $l0 eq 'cbpreinstall:' 
|| $l0 eq 'cbinstall:' || $l0 eq 'required:' || $l0 eq 'support:' || $l0 eq 
'keep:' || $l0 eq 'prefer:' || $l0 eq 'ignore:' || $l0 eq 'conflict:' || $l0 eq 
'runscripts:' || $l0 eq 'expandflags') {
       my $t = substr($l0, 0, -1);
       for my $l (@l) {
        if ($l eq '!*') {
@@ -288,6 +290,13 @@
       push @macros, "%define _target_cpu ".(split('-', 
$config->{'target'}))[0] if $config->{'target'};
     } elsif ($l0 eq 'hostarch:') {
       $config->{'hostarch'} = join(' ', @l);
+    } elsif ($l0 eq 'constraint:') {
+      my $l = join(' ', @l);
+      if ($l eq '!*') {
+       $config->{'constraint'} = [];
+      } else {
+       push @{$config->{'constraint'}}, $l;
+      }
     } elsif ($l0 !~ /^[#%]/) {
       warn("unknown keyword in config: $l0\n");
     }
@@ -335,6 +344,13 @@
       }
     }
   }
+  for (@{$config->{'expandflags'} || []}) {
+    if (/^([^:]+):(.*)$/s) {
+      $config->{"expandflags:$1"} = $2;
+    } else {
+      $config->{"expandflags:$_"} = 1;
+    }
+  }
   return $config;
 }
 
@@ -382,15 +398,21 @@
 sub get_build {
   my ($config, $subpacks, @deps) = @_;
   my @ndeps = grep {/^-/} @deps;
-  my %keep = map {$_ => 1} (@deps, @{$config->{'keep'} || []}, 
@{$config->{'preinstall'}});
-  for (@{$subpacks || []}) {
-    push @ndeps, "-$_" unless $keep{$_};
+  my @extra = (@{$config->{'required'}}, @{$config->{'support'}});
+  if (@{$config->{'keep'} || []}) {
+    my %keep = map {$_ => 1} (@deps, @{$config->{'keep'} || []}, 
@{$config->{'preinstall'}});
+    for (@{$subpacks || []}) {
+      push @ndeps, "-$_" unless $keep{$_};
+    }
+  } else {
+    # new "empty keep" mode, filter subpacks from required/support
+    my %subpacks = map {$_ => 1} @{$subpacks || []};
+    @extra = grep {!$subpacks{$_}} @extra;
   }
   my %ndeps = map {$_ => 1} @ndeps;
   @deps = grep {!$ndeps{$_}} @deps;
   push @deps, @{$config->{'preinstall'}};
-  push @deps, @{$config->{'required'}};
-  push @deps, @{$config->{'support'}};
+  push @deps, @extra;
   @deps = grep {!$ndeps{"-$_"}} @deps;
   @deps = do_subst($config, @deps);
   @deps = grep {!$ndeps{"-$_"}} @deps;
@@ -402,13 +424,20 @@
 sub get_deps {
   my ($config, $subpacks, @deps) = @_;
   my @ndeps = grep {/^-/} @deps;
-  my %keep = map {$_ => 1} (@deps, @{$config->{'keep'} || []}, 
@{$config->{'preinstall'}});
-  for (@{$subpacks || []}) {
-    push @ndeps, "-$_" unless $keep{$_};
+  my @extra = @{$config->{'required'}};
+  if (@{$config->{'keep'} || []}) {
+    my %keep = map {$_ => 1} (@deps, @{$config->{'keep'} || []}, 
@{$config->{'preinstall'}});
+    for (@{$subpacks || []}) {
+      push @ndeps, "-$_" unless $keep{$_};
+    }
+  } else {
+    # new "empty keep" mode, filter subpacks from required
+    my %subpacks = map {$_ => 1} @{$subpacks || []};
+    @extra = grep {!$subpacks{$_}} @extra;
   }
   my %ndeps = map {$_ => 1} @ndeps;
   @deps = grep {!$ndeps{$_}} @deps;
-  push @deps, @{$config->{'required'}};
+  push @deps, @extra;
   @deps = grep {!$ndeps{"-$_"}} @deps;
   @deps = do_subst($config, @deps);
   @deps = grep {!$ndeps{"-$_"}} @deps;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20120927/build new/obs-build-20121123/build
--- old/obs-build-20120927/build        2012-09-27 09:32:16.000000000 +0200
+++ new/obs-build-20121123/build        2012-11-26 09:49:40.000000000 +0100
@@ -23,7 +23,7 @@
 
 # defaults for vm_img_mkfs
 vm_img_mkfs_ext4='mkfs.ext4 -m 0 -q -F'
-vm_img_tunefs_ext4='tune2fs -c 0 -O ^has_journal'
+vm_img_tunefs_ext4='tune2fs -c 0 -O ^has_journal -o nobarrier,discard'
 vm_img_mkfs_ext3='mkfs.ext3 -m 0 -q -F'
 vm_img_tunefs_ext3='tune2fs -c 0 -o journal_data_writeback'
 vm_img_mkfs_ext2='mkfs.ext2 -m 0 -q -F'
@@ -69,7 +69,7 @@
 VM_INITRD=
 VMDISK_ROOTSIZE=4096
 VMDISK_SWAPSIZE=1024
-VMDISK_FILESYSTEM=ext3
+VMDISK_FILESYSTEM=ext4
 # settings are for speed and not data safety, we format anyway on next run
 VMDISK_MOUNT_OPTIONS=__default
 VMDISK_CLEAN=
@@ -603,6 +603,44 @@
 
 }
 
+background_monitor_process()
+{
+  max=0
+  max_mem=0
+  while sleep 5; do
+
+    # memory usage
+    if [ -e /proc/meminfo ]; then
+      memtotal=0
+      while read key value unit; do
+        case $key in
+          MemTotal:|SwapTotal:)
+            memtotal=$(( $memtotal + $value ))
+            ;;
+          MemFree:|SwapFree:|SwapCached:|Cached:|Buffers:)
+            memtotal=$(( $memtotal - $value ))
+            ;;
+        esac
+      done < /proc/meminfo
+
+      if [ ${memtotal} -gt $max_mem ]; then
+        max_mem="${memtotal}"
+        echo -n $(( $max_mem / 1024 )) > /.build/_statistics.memory
+      fi
+    fi
+
+    # disk storage usage
+    if [ -x /usr/bin/df ]; then
+      c=(`/usr/bin/df -m $1 | tail -n 1`)
+
+      if [ ${c[2]} -gt $max ]; then
+        max="${c[2]}"
+        echo -n $max > /.build/_statistics.df
+      fi
+    fi
+  done
+}
+
 detect_vm_2nd_stage()
 {
     if ! test "$0" = "/.build/build" ; then
@@ -658,6 +696,9 @@
     fi
     HOST="$MYHOSTNAME"
 
+    # fork a process monitoring max filesystem fillment during build
+    background_monitor_process / >& /dev/null &
+
     return 0
 }
 
@@ -759,8 +800,7 @@
     export VM_KERNEL=/boot/vmlinux
     export VM_INITRD=/boot/initrd
     if [ -z "$RUNNING_IN_VM" -a "$VM_TYPE" = "kvm" ];then
-           cat /proc/mounts | grep "/hugetlbfs" &>/dev/null
-           if [ "$?" != "0" ];then
+           if ! grep "/hugetlbfs" /proc/mounts; then
                echo "hugetlbfs is not mounted"
                exit 1
            fi
@@ -770,13 +810,11 @@
                echo "please adjust nr_hugepages"
                exit 1
            fi
-           grep kvm_rma_count /proc/cmdline &>/dev/null
-           if [ "$?" != "0" ];then
+           if ! grep -q kvm_rma_count /proc/cmdline; then
                echo "put kvm_rma_count=<VM number> to your boot options"
                exit 1
            fi
-           grep kvm_hpt_count /proc/cmdline &>/dev/null
-           if [ "$?" != "0" ];then
+           if ! grep -q kvm_hpt_count /proc/cmdline; then
                echo "put kvm_hpt_count=<VM number> to your boot options"
                exit 1
            fi
@@ -802,7 +840,6 @@
 
 if detect_vm_2nd_stage ; then
     set "/.build-srcdir/$SPECFILE"
-
 fi
 
 export PATH=$BUILD_DIR:/sbin:/usr/sbin:$PATH
@@ -1841,6 +1878,7 @@
            .preinstallimage*) continue ;;
            .srcfiles*) continue ;;
            .pkgs) continue ;;
+           .rpm-cache) continue ;;
            installed-pkg) continue ;;
            proc|sys) continue ;;
          esac
@@ -2277,10 +2315,12 @@
     for SRPM in $BUILD_ROOT/$TOPDIR/SRPMS/*src.rpm ; do
        test -f "$SRPM" && PNAME=`rpm --nodigest --nosignature -qp --qf 
"%{NAME}" $SRPM`
     done
+    mount -n -tproc none $BUILD_ROOT/proc 2> /dev/null
     for CHECKSCRIPT in $BUILD_ROOT/usr/lib/build/checks/* ; do
        echo "... running `basename $CHECKSCRIPT`"
        $CHECKSCRIPT || cleanup_and_exit 1
     done
+    umount -n $BUILD_ROOT/proc 2>/dev/null || true
 fi
 
 RPMS=`find $BUILD_ROOT/$TOPDIR/RPMS -type f -name "*.rpm" 2>/dev/null || true`
@@ -2299,11 +2339,13 @@
     rpmlint_logfile=$TOPDIR/OTHER/rpmlint.log
     rm -f "$BUILD_ROOT$rpmlint_logfile"
     ret=0
+    mount -n -tproc none $BUILD_ROOT/proc 2> /dev/null
     chroot $BUILD_ROOT su -s /opt/testing/bin/rpmlint "$BUILD_USER" -- \
            --info ${LINT_RPM_FILE_LIST[*]#$BUILD_ROOT} \
            ${SRPM_FILE_LIST[*]#$BUILD_ROOT} > "$BUILD_ROOT$rpmlint_logfile" || 
ret=1
            cat "$BUILD_ROOT$rpmlint_logfile"
            echo
+    umount -n $BUILD_ROOT/proc 2>/dev/null || true
     if test "$ret" = 1; then
        cleanup_and_exit 1
     fi
@@ -2331,6 +2373,7 @@
                exitcode=2
            fi
        fi
+        umount -n $BUILD_ROOT/proc 2>/dev/null || true
     fi
     if test ! -e $BUILD_ROOT/.build/.same_result_marker \
        -a -x "$BUILD_ROOT/usr/bin/makedeltarpm" \
@@ -2342,6 +2385,28 @@
 fi
 
 if test -n "$RUNNING_IN_VM" -a -n "$VM_SWAP"; then
+    echo "... saving built statistics"
+    echo "# statistics about used resources during build" > 
$TOPDIR/OTHER/_statistics
+    if [ -e /.build/_statistics.df ]; then
+      echo -n "MAX_mb_used_on_disk: " >> $TOPDIR/OTHER/_statistics
+      cat /.build/_statistics.df >> $TOPDIR/OTHER/_statistics
+      rm /.build/_statistics.df
+    fi
+    if [ -e /.build/_statistics.memory ]; then
+      echo -n "MAX_mb_used_memory: " >> $TOPDIR/OTHER/_statistics
+      cat /.build/_statistics.memory >> $TOPDIR/OTHER/_statistics
+      rm /.build/_statistics.memory
+    fi
+    mount -n sys /sys -t sysfs
+    device="sda"
+    [ -e /dev/vda ] && device="vda"
+    disk=(`cat /sys/block/${device}/stat`)
+    echo "IO_requests_read: ${disk[0]}"  >> $TOPDIR/OTHER/_statistics
+    echo "IO_sectors_read: ${disk[2]}"   >> $TOPDIR/OTHER/_statistics
+    echo "IO_requests_write: ${disk[4]}" >> $TOPDIR/OTHER/_statistics
+    echo "IO_sectors_write: ${disk[6]}"  >> $TOPDIR/OTHER/_statistics
+    umount /sys
+
     echo "... saving built packages"
     swapoff "$VM_SWAP"
     args="--padstart 512 --padend 512 -v"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20120927/build_kiwi.sh 
new/obs-build-20121123/build_kiwi.sh
--- old/obs-build-20120927/build_kiwi.sh        2012-09-27 09:32:16.000000000 
+0200
+++ new/obs-build-20121123/build_kiwi.sh        2012-11-26 09:49:40.000000000 
+0100
@@ -187,10 +187,21 @@
                    cat > $BUILD_ROOT/kiwi_post.sh << EOF
 echo "compressing vmx images... "
 cd /$TOPDIR/KIWI-vmx
+for suffix in "ovf" "qcow2"; do
+  if [ -e "$imageout.\$suffix" ]; then
+       mv "$imageout.\$suffix" "/$TOPDIR/KIWI/$imageout$buildnum.\$suffix"
+       pushd /$TOPDIR/KIWI
+       if [ -x /usr/bin/sha256sum ]; then
+           echo "Create sha256 \$suffix file..."
+           /usr/bin/sha256sum "$imageout$buildnum.\$suffix" > 
"$imageout$buildnum.\$suffix.sha256"
+        fi
+       popd
+  fi
+done
 # This option has a number of format parameters
 VMXFILES=""
 SHAFILES=""
-for i in "$imageout.vmx" "$imageout.vmdk" "$imageout-disk*.vmdk" 
"$imageout.ovf" "$imageout.qcow2"; do
+for i in "$imageout.vmx" "$imageout.vmdk" "$imageout-disk*.vmdk"; do
        test -e \$i && VMXFILES="\$VMXFILES \$i"
 done
 # take raw files as fallback
@@ -268,7 +279,8 @@
                    cat > $BUILD_ROOT/kiwi_post.sh << EOF
 cd /$TOPDIR/KIWI-tbz
 for i in *.tbz; do
-       file=\$(readlink -f "\$i")
+        file=\$(readlink -f "\$i")
+        [ -z "\$file" ] && echo readlink failed for $i
        mv "\$file" "/$TOPDIR/KIWI/\${i%.tbz}$buildnum.tbz"
 done
 if [ -x /usr/bin/sha256sum ]; then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20120927/common_functions 
new/obs-build-20121123/common_functions
--- old/obs-build-20120927/common_functions     2012-09-27 09:32:16.000000000 
+0200
+++ new/obs-build-20121123/common_functions     2012-11-26 09:49:40.000000000 
+0100
@@ -45,8 +45,9 @@
 is_emulator_arch()
 {
     local arch
+    local qarch=":$BUILD_ARCH:"
     for arch in $EMULATOR_ARCHS; do
-       if test "$BUILD_ARCH" = "$arch" -a "$BUILD_HOST_ARCH" != "$arch"; then
+       if test "$qarch" != "${qarch/:$arch:/}" -a "$BUILD_HOST_ARCH" != 
"$arch"; then
            return 0
        fi
     done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20120927/createrepomddeps 
new/obs-build-20121123/createrepomddeps
--- old/obs-build-20120927/createrepomddeps     2012-09-27 09:32:16.000000000 
+0200
+++ new/obs-build-20121123/createrepomddeps     2012-11-26 09:49:40.000000000 
+0100
@@ -34,9 +34,13 @@
   repomd => {
     data => {
       _start => \&repomd_handle_data_start,
+      _end => \&repomd_handle_data_end,
       location => {
        _start => \&repomd_handle_location,
       },
+      size => {
+       _text => \&repomd_handle_size,
+      },
     },
   },
 };
@@ -72,28 +76,44 @@
 # [ [tag, \%], ... ]
 my @cursor = ();
 
+my %datafile;
 sub repomd_handle_data_start
 {
   my $p = shift;
   my $el = shift;
 
   my $attr = map_attrs(@_);
+  %datafile = ();
   if($attr->{'type'} ne 'primary') {
     pop @cursor;
   }
 }
 
+sub repomd_handle_data_end
+{
+  my $p = shift;
+  my $el = shift;
+  push @primaryfiles, { %datafile } if exists $datafile{'location'};
+}
+
+
 sub repomd_handle_location
 {
   my $p = shift;
   my $el = shift;
 
   my $attr = map_attrs(@_);
-  if(exists $attr->{'href'}) {
-    push @primaryfiles, { location => $attr->{'href'} };
-  }
+  $datafile{'location'} = $attr->{'href'} if defined $attr->{'href'};
 }
 
+sub repomd_handle_size
+{
+  my $p = shift;
+  my $el = shift;
+  $datafile{'size'} = $el;
+}
+
+
 sub generic_handle_start
 {
   my $p = shift;
@@ -421,15 +441,21 @@
     @cursor = ([undef, $primaryparser]);
 
     my $u = $dir . $f->{'location'};
-    if ($url =~ /^http[s]?:\/\/([^\/]*)\/?/) {
-        if (system($INC[0].'/download', $dir . "repodata/", $baseurl . 
"repodata/" . basename($u))) {
-         die("download failed\n");
-       }
-    }
     if ($] > 5.007) {
        require Encode;
        utf8::downgrade($u);
     }
+    my $cached;
+    if (-e $u) {
+      $cached = 1;
+      $cached = 0 if exists($f->{'size'}) && $f->{'size'} != (-s _);
+      $cached = 0 if !exists($f->{'size'}) && $u !~ /[0-9a-f]{32}-primary/;
+    }
+    if ($url =~ /^http[s]?:\/\/([^\/]*)\/?/ and !$cached) {
+        if (system($INC[0].'/download', $dir . "repodata/", $baseurl . 
"repodata/" . basename($u))) {
+         die("download failed\n");
+       }
+    }
     my $fh;
     open($fh, '<', $u) or die "Error opening $u: $!\n";
     if ($u =~ /\.gz$/) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20120927/debtransform 
new/obs-build-20121123/debtransform
--- old/obs-build-20120927/debtransform 2012-09-27 09:32:16.000000000 +0200
+++ new/obs-build-20121123/debtransform 2012-11-26 09:49:40.000000000 +0100
@@ -280,12 +280,6 @@
     system( ( "debtransformzip", "$dir/$old", "$tmptar" )) == 0 || die("cannot 
transform .zip to .tar.gz");
 }
 
-my $tardir = $tarfile;
-$tardir =~ s/\.orig\.tar/\.tar/;
-$tardir =~ s/\.tar.*?$//;
-my @tarfilecontent = listtar($tarfile, 0);
-my $origtarfile = { 'name', $tarfile, 'content', \@tarfilecontent, 'version', 
$tags->{'VERSION'}, 'tardir', $tardir};
-
 my @files;
 my $v = $version;
 $v =~ s/-[^-]*$//;
@@ -299,6 +293,13 @@
 }
 push @files, addfile("$out/$ntarfile");
 
+my $tarpath = "$out/$ntarfile";
+my $tardir = $tarfile;
+$tardir =~ s/\.orig\.tar/\.tar/;
+$tardir =~ s/\.tar.*?$//;
+my @tarfilecontent = listtar($tarpath, 0);
+my $origtarfile = { 'name', $tarpath, 'content', \@tarfilecontent, 'version', 
$tags->{'VERSION'}, 'tardir', $tardir};
+
 open(DIFF, '>', "$out/${name}_$version.diff") || 
die("$out/${name}_$version.diff: $!\n");
 
 undef $changelog if $dir{'debian.changelog'};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20120927/download 
new/obs-build-20121123/download
--- old/obs-build-20120927/download     2012-09-27 09:32:16.000000000 +0200
+++ new/obs-build-20121123/download     2012-11-26 09:49:40.000000000 +0100
@@ -1,6 +1,8 @@
 #!/usr/bin/perl -w
 
+use Net::SSL ();
 BEGIN {
+  $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0,
   unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
 }
 
@@ -17,7 +19,6 @@
 
 my $ua = LWP::UserAgent->new(
   agent => "openSUSE build script",
-  env_proxy => 1,
   timeout => 42);
 
 for my $url (@ARGV) {
@@ -29,10 +30,17 @@
     my $u = $repo->{'baseurl'};
     $u .= '/' unless substr($u, -1, 1) eq '/';
     $url =~ s/^zypp:\/\/[^\/]*\/*//;
-    $url = URI->new($u.$url)
+    $url = URI->new($u.$url);
+    if ($url->scheme eq 'dir') {
+      my $dest = "$dir/".basename($url->path);
+      unlink($dest);   # just in case
+      system('cp', $url->path, $dest) && die("cp $url->path $dest failed\n");
+      last;
+    }
   } else {
     $url = URI->new($url);
   }
+  $ua->env_proxy  if $url->scheme ne 'https';
   my $dest = "$dir/".basename($url->path);
   unlink($dest);       # just in case
   my $retry = 3;
@@ -40,7 +48,7 @@
     my $res = $ua->mirror($url, $dest);
     last if $res->is_success;
     # if it's a redirect we probably got a bad mirror and should just retry
-    die "reqesting $url failed: ".$res->status_line."\n" unless $retry && 
$res->previous;
+    die "requesting $url failed: ".$res->status_line."\n" unless $retry && 
$res->previous;
     warn "retrying $url\n";
   }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20120927/expanddeps 
new/obs-build-20121123/expanddeps
--- old/obs-build-20120927/expanddeps   2012-09-27 09:32:16.000000000 +0200
+++ new/obs-build-20121123/expanddeps   2012-11-26 09:49:40.000000000 +0100
@@ -276,4 +276,8 @@
   exit(1);
 }
 
+# make sure all preinstalls are in bdeps;
+# XXX: also add vmdeps?
+@bdeps = Build::unify(@bdeps, Build::get_preinstalls($cf));
+
 print_rpmlist(@bdeps);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20120927/init_buildsystem 
new/obs-build-20121123/init_buildsystem
--- old/obs-build-20120927/init_buildsystem     2012-09-27 09:32:16.000000000 
+0200
+++ new/obs-build-20121123/init_buildsystem     2012-11-26 09:49:40.000000000 
+0100
@@ -376,6 +376,11 @@
                rm -f $CACHE_FILE.id
                break
            fi
+           # always rebuild if we have remote repositories and --clean is given
+           if test -n "$CLEAN_BUILD" -a "$SRC" != "${SRC#*://}" ; then
+               rm -f $CACHE_FILE.id
+               break
+           fi
        done
     fi
     if ! test -f $CACHE_FILE.id ; then
@@ -507,7 +512,7 @@
   cleanup_and_exit 1
 }
 
-# modify $SRC
+# modifies $SRC
 downloadpkg()
 {
     local url="$1"
@@ -527,34 +532,37 @@
        cleanup_and_exit 1
     fi
 
-    if [ ! -e "$SRC" ]; then
-       local destdir="$cachedir/tmp"
-       mkdir -p "$destdir"
-       echo "downloading $url ... ";
-       $BUILD_DIR/download "$destdir" "$url" || cleanup_and_exit 1
-       local destfile="$destdir/${url##*/}"
-       if [ ! -e "$destfile" ]; then
-           echo "expected $destfile after download but it's missing" >&2
+    local destdir="$cachedir/tmp"
+    mkdir -p "$destdir"
+    echo "downloading $url ... ";
+    $BUILD_DIR/download "$destdir" "$url" || cleanup_and_exit 1
+    local destfile="$destdir/${url##*/}"
+    if [ ! -e "$destfile" ]; then
+       echo "expected $destfile after download but it's missing" >&2
+       cleanup_and_exit 1
+    fi
+    case $destfile in
+      *.rpm)
+       rpm -K "$destfile" > $destfile.v || { echo "rpm verify failed" >&2; rm 
-rf "$destdir"; cleanup_and_exit 1; }
+       if grep "NOT OK" $destfile.v; then
+           rm -rf "$destdir"
            cleanup_and_exit 1
        fi
-       case $destfile in
-         *.rpm)
-           rpm -K "$destfile" > $destfile.v || { echo "rpm verify failed" >&2; 
rm -rf "$destdir"; cleanup_and_exit 1; }
-           if grep "NOT OK" $destfile.v; then
-               rm -rf "$destdir"
-               cleanup_and_exit 1
-           fi
-           rm -f "$destfile.v"
-           ;;
-       esac
-       mv "$destfile" "$SRC" || cleanup_and_exit 1
-    fi
+       rm -f "$destfile.v"
+       ;;
+    esac
+    mv "$destfile" "$SRC" || cleanup_and_exit 1
 }
 
 getcachedir()
 {
-    url=$1
+    local url=$1
     case $url in
+      zypp://*)
+       url=${url#zypp:/}
+       echo "/var/cache/zypp/packages/${url%/*}"
+       return 0;
+       ;;
       *.pkg.tar.?z) url="arch@$url" ;;
     esac
     for repo in "${repos[@]}" ; do
@@ -712,6 +720,7 @@
     PACKAGES_FROM_PREINSTALLIMAGE=
     GUESSED_DIST=unknown
     mkdir -p $BUILD_ROOT/.init_b_cache/rpms
+    rm -f $BUILD_ROOT/.init_b_cache/rpmlist.download
     while read PKG SRC ; do
        if test "$PKG" = "preinstall:" ; then
            PACKAGES_TO_PREINSTALL=$SRC
@@ -766,24 +775,69 @@
            PACKAGES_TO_INSTALL="$PACKAGES_TO_INSTALL $PKG"
            continue
        fi
+       PACKAGES_TO_INSTALL="$PACKAGES_TO_INSTALL $PKG"
        if [ "${SRC#/}" = "$SRC" ]; then
-           url="$SRC"
-           case "$url" in
+           case "$SRC" in
                zypp://* | http://* | https://* | ftp://* | ftps://*)
-                   downloadpkg "$url"
+                   echo "$PKG $SRC" 
>>$BUILD_ROOT/.init_b_cache/rpmlist.download
+                   continue
                    ;;
                *)
-                   echo "unsupported url for '$PKG': $url" >&2
+                   echo "unsupported url for '$PKG': $SRC" >&2
                    cleanup_and_exit 1
                    ;;
            esac
-           # downloadpkg modified $SRC, so it has a right name for use
        fi
        SRCSUF=${SRC/%.pkg.tar.?z/.arch}
        ln -s "$SRC" "$BUILD_ROOT/.init_b_cache/rpms/$PKG.${SRCSUF##*.}"
-       PACKAGES_TO_INSTALL="$PACKAGES_TO_INSTALL $PKG"
     done < $RPMLIST
 
+    # check if we really can use cached versions for packages on the download 
list
+    if test -s $BUILD_ROOT/.init_b_cache/rpmlist.download ; then
+       rm -f $BUILD_ROOT/.init_b_cache/rpmlist.download2
+        while read PKG SRC ; do
+           cachepkg="${SRC##*/}"
+           cachepkg="${cachepkg/%.pkg.tar.?z/.arch}"
+           cachedir="$(getcachedir "$SRC")"
+           if test -s "$cachedir/$cachepkg" ; then
+               if test -s "$BUILD_ROOT/.init_b_cache/rpms/$PKG.id" -a 
"${SRC%.rpm}" != "$SRC" ; then
+                   PKGID=`rpm -qp --qf "$RPMIDFMT" $RPMCHECKOPTS_HOST 
"$cachedir/$cachepkg"`
+                   read cachepkgid < $BUILD_ROOT/.init_b_cache/rpms/$PKG.id
+                   if test "$cachepkgid" = "$PKGID" ; then
+                       SRC="$cachedir/$cachepkg"
+                   else
+                       rm -f "$cachedir/$cachepkg"
+                   fi
+               else
+                   $SRC="$cachedir/$cachepkg"
+               fi
+           fi
+           if test "${SRC#/}" = "$SRC" ; then
+               echo "$PKG $SRC" >>$BUILD_ROOT/.init_b_cache/rpmlist.download2
+           else
+               SRCSUF=${SRC/%.pkg.tar.?z/.arch}
+               ln -s "$SRC" "$BUILD_ROOT/.init_b_cache/rpms/$PKG.${SRCSUF##*.}"
+           fi
+       done < $BUILD_ROOT/.init_b_cache/rpmlist.download
+       rm -f $BUILD_ROOT/.init_b_cache/rpmlist.download
+       test -s $BUILD_ROOT/.init_b_cache/rpmlist.download2 && mv 
$BUILD_ROOT/.init_b_cache/rpmlist.download2 
$BUILD_ROOT/.init_b_cache/rpmlist.download
+    fi
+
+    # now do the download of missing packages
+    if test -s $BUILD_ROOT/.init_b_cache/rpmlist.download ; then
+        PACKAGES_TO_DOWNLOAD=`cat ${RPMLIST}.download|awk '{print $2}'`
+        progress_setup PACKAGES_TO_DOWNLOAD
+        while read PKG SRC ; do
+            progress_step PACKAGES_TO_DOWNLOAD
+            downloadpkg "$SRC"
+           # downloadpkg modified $SRC, so it has a right name for use
+           SRCSUF=${SRC/%.pkg.tar.?z/.arch}
+           ln -s "$SRC" "$BUILD_ROOT/.init_b_cache/rpms/$PKG.${SRCSUF##*.}"
+        done < $BUILD_ROOT/.init_b_cache/rpmlist.download
+        rm -f $BUILD_ROOT/.init_b_cache/rpmlist.download
+        printf "\n"
+    fi
+
     test -n "$PACKAGES_TO_CBPREINSTALL" && echo "cbpreinstall: 
$PACKAGES_TO_CBPREINSTALL"
     test -n "$PACKAGES_TO_CBINSTALL" && echo "cbinstall   : 
$PACKAGES_TO_CBINSTALL"
     # compatibility...
@@ -852,6 +906,7 @@
        progress_step PACKAGES_TO_PREINSTALL_FILTERED
        preinstall ${PKG##*/}
     done
+    printf "\n"
     if test -n "$PREPARE_VM" ; then
         PACKAGES_TO_VMINSTALL_FILTERED=`reorder 
$PACKAGES_TO_VMINSTALL_FILTERED`
        progress_setup PACKAGES_TO_VMINSTALL_FILTERED
@@ -1006,17 +1061,19 @@
 
 test -x $BUILD_ROOT/sbin/ldconfig && chroot $BUILD_ROOT /sbin/ldconfig 2>&1
 
-typeset -ri suse_version=$(chroot $BUILD_ROOT /bin/rpm --eval 
'%{?suse_version}' 2>/dev/null)
+typeset -ri suse_version=$(chroot $BUILD_ROOT rpm --eval '%{?suse_version}' 
2>/dev/null)
 typeset -i num cumulate=-1
 typeset -a CUMULATED_LIST=()
 typeset -a CUMULATED_PIDS=()
 typeset -a CUMULATED_HMD5=()
 
+DO_CUMULATE=
 if ((suse_version > 1220)) ; then
-    MAIN_LIST="$PACKAGES_TO_INSTALL $PACKAGES_TO_CBINSTALL CUMULATED"
-else
-    MAIN_LIST="$PACKAGES_TO_INSTALL $PACKAGES_TO_CBINSTALL"
+    DO_CUMULATE=true
 fi
+
+MAIN_LIST="$PACKAGES_TO_INSTALL $PACKAGES_TO_CBINSTALL"
+test -n "$DO_CUMULATE" && MAIN_LIST="$MAIN_LIST CUMULATED"
 progress_setup MAIN_LIST
 for PKG in $MAIN_LIST; do
     test -f $BUILD_ROOT/installed-pkg/$PKG && continue
@@ -1060,7 +1117,7 @@
        ;;
     esac
     if test -e "$BUILD_ROOT/.init_b_cache/rpms/$PKG.$PSUF" -a ! -s 
"$BUILD_ROOT/.init_b_cache/rpms/$PKG.$PSUF" ; then
-       # preinstallimage package, make sure it's 
+       # preinstallimage package, make sure it's in the image
        if ! test -e $BUILD_ROOT/.preinstall_image/$PKG ; then
            echo "Package $PKG is missing from the preinstall image"
            cleanup_and_exit 1
@@ -1181,7 +1238,7 @@
            test -e "$i" && ADDITIONAL_PARAMS="$ADDITIONAL_PARAMS --justdb"
        done
     fi
-    if ((suse_version > 1220)) ; then
+    if test -n "$DO_CUMULATE" -a "$ADDITIONAL_PARAMS" = 
"${ADDITIONAL_PARAMS%--justdb}"; then
        echo "cumulate ${PKGID%% *}"
        let cumulate++
        CUMULATED_LIST[$cumulate]=".init_b_cache/$PKG.rpm"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-build-20120927/test-debtransform/1/debian.changelog 
new/obs-build-20121123/test-debtransform/1/debian.changelog
--- old/obs-build-20120927/test-debtransform/1/debian.changelog 1970-01-01 
01:00:00.000000000 +0100
+++ new/obs-build-20121123/test-debtransform/1/debian.changelog 2012-11-26 
09:49:40.000000000 +0100
@@ -0,0 +1,24 @@
+grandorgue (0.3.0.6.10) unstable; urgency=low
+
+  * OBS build
+
+ -- Martin Koegler <[email protected]>  Sat, 16 Jun 2012 13:08:51 
+0200
+
+grandorgue (0.3.0.6.11) unstable; urgency=low
+
+  * OBS build
+
+ -- Martin Koegler <[email protected]>  Sat, 16 Jun 2012 13:08:35 
+0200
+
+grandorgue (0.3.0.6.10-1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * OBS build
+
+ -- Martin Koegler <[email protected]>  Sat, 16 Jun 2012 11:27:19 
+0200
+
+grandorgue (0.3.0.6) unstable; urgency=low
+
+  * Initial version
+
+ -- Martin Koegler <[email protected]>  Sun, 06 Nov 2011 19:44:04 +0100
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-build-20120927/test-debtransform/1/debian.obs-version 
new/obs-build-20121123/test-debtransform/1/debian.obs-version
--- old/obs-build-20120927/test-debtransform/1/debian.obs-version       
1970-01-01 01:00:00.000000000 +0100
+++ new/obs-build-20121123/test-debtransform/1/debian.obs-version       
2012-11-26 09:49:40.000000000 +0100
@@ -0,0 +1 @@
+Version: 0.3.0.6.1026
Files old/obs-build-20120927/test-debtransform/1/debian.tar.gz and 
new/obs-build-20121123/test-debtransform/1/debian.tar.gz differ
Files old/obs-build-20120927/test-debtransform/1/debian1.tar.gz and 
new/obs-build-20121123/test-debtransform/1/debian1.tar.gz differ
Files old/obs-build-20120927/test-debtransform/1/go.tar.gz and 
new/obs-build-20121123/test-debtransform/1/go.tar.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-build-20120927/test-debtransform/1/grandorgue.dsc 
new/obs-build-20121123/test-debtransform/1/grandorgue.dsc
--- old/obs-build-20120927/test-debtransform/1/grandorgue.dsc   1970-01-01 
01:00:00.000000000 +0100
+++ new/obs-build-20121123/test-debtransform/1/grandorgue.dsc   2012-11-26 
09:49:40.000000000 +0100
@@ -0,0 +1,11 @@
+Format: 1.0
+Source: grandorgue
+Binary: grandorgue
+Architecture: any
+Version: 0.3.0.6.1026
+Maintainer: Martin Koegler <[email protected]>
+Standards-Version: 3.9.1
+Build-Depends: debhelper (>= 7), cdbs, cmake, gettext, po4a, 
libjack-jackd2-dev, libasound2-dev, libwxgtk2.8-dev, docbook-xsl, xsltproc, 
zip, devscripts
+DEBTRANSFORM-FILES-TAR: debian.tar.gz debian1.tar.gz
+Files: 
+ 1e0023c7fb1f19a883ec8170efeff360 2817072 grandorgue_0.3.0.6.tar.gz
Files 
old/obs-build-20120927/test-debtransform/1-out/grandorgue_0.3.0.6.1026.diff.gz 
and 
new/obs-build-20121123/test-debtransform/1-out/grandorgue_0.3.0.6.1026.diff.gz 
differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-build-20120927/test-debtransform/1-out/grandorgue_0.3.0.6.1026.dsc 
new/obs-build-20121123/test-debtransform/1-out/grandorgue_0.3.0.6.1026.dsc
--- old/obs-build-20120927/test-debtransform/1-out/grandorgue_0.3.0.6.1026.dsc  
1970-01-01 01:00:00.000000000 +0100
+++ new/obs-build-20121123/test-debtransform/1-out/grandorgue_0.3.0.6.1026.dsc  
2012-11-26 09:49:40.000000000 +0100
@@ -0,0 +1,12 @@
+Format: 1.0
+Source: grandorgue
+Binary: grandorgue
+Architecture: any
+Version: 0.3.0.6.1026
+Maintainer: Martin Koegler <[email protected]>
+Standards-Version: 3.9.1
+Build-Depends: debhelper (>= 7), cdbs, cmake, gettext, po4a, 
libjack-jackd2-dev, libasound2-dev, libwxgtk2.8-dev, docbook-xsl, xsltproc, 
zip, devscripts
+Files: 
+ 7e72e6c31c2af52c227ce4c4c6ee3952 655 grandorgue_0.3.0.6.1026.orig.tar.gz
+ 6d0b166ecd6f5863a5bba1fd576f57a8 756 grandorgue_0.3.0.6.1026.diff.gz
+
Files 
old/obs-build-20120927/test-debtransform/1-out/grandorgue_0.3.0.6.1026.orig.tar.gz
 and 
new/obs-build-20121123/test-debtransform/1-out/grandorgue_0.3.0.6.1026.orig.tar.gz
 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-build-20120927/test-debtransform/2/debian.changelog 
new/obs-build-20121123/test-debtransform/2/debian.changelog
--- old/obs-build-20120927/test-debtransform/2/debian.changelog 1970-01-01 
01:00:00.000000000 +0100
+++ new/obs-build-20121123/test-debtransform/2/debian.changelog 2012-11-26 
09:49:40.000000000 +0100
@@ -0,0 +1,24 @@
+grandorgue (0.3.0.6.10) unstable; urgency=low
+
+  * OBS build
+
+ -- Martin Koegler <[email protected]>  Sat, 16 Jun 2012 13:08:51 
+0200
+
+grandorgue (0.3.0.6.11) unstable; urgency=low
+
+  * OBS build
+
+ -- Martin Koegler <[email protected]>  Sat, 16 Jun 2012 13:08:35 
+0200
+
+grandorgue (0.3.0.6.10-1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * OBS build
+
+ -- Martin Koegler <[email protected]>  Sat, 16 Jun 2012 11:27:19 
+0200
+
+grandorgue (0.3.0.6) unstable; urgency=low
+
+  * Initial version
+
+ -- Martin Koegler <[email protected]>  Sun, 06 Nov 2011 19:44:04 +0100
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-build-20120927/test-debtransform/2/debian.obs-version 
new/obs-build-20121123/test-debtransform/2/debian.obs-version
--- old/obs-build-20120927/test-debtransform/2/debian.obs-version       
1970-01-01 01:00:00.000000000 +0100
+++ new/obs-build-20121123/test-debtransform/2/debian.obs-version       
2012-11-26 09:49:40.000000000 +0100
@@ -0,0 +1 @@
+Version: 0.3.0.6.1026
Files old/obs-build-20120927/test-debtransform/2/debian.tar.gz and 
new/obs-build-20121123/test-debtransform/2/debian.tar.gz differ
Files old/obs-build-20120927/test-debtransform/2/debian1.tar.gz and 
new/obs-build-20121123/test-debtransform/2/debian1.tar.gz differ
Files old/obs-build-20120927/test-debtransform/2/go.tar.bz2 and 
new/obs-build-20121123/test-debtransform/2/go.tar.bz2 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-build-20120927/test-debtransform/2/grandorgue.dsc 
new/obs-build-20121123/test-debtransform/2/grandorgue.dsc
--- old/obs-build-20120927/test-debtransform/2/grandorgue.dsc   1970-01-01 
01:00:00.000000000 +0100
+++ new/obs-build-20121123/test-debtransform/2/grandorgue.dsc   2012-11-26 
09:49:40.000000000 +0100
@@ -0,0 +1,11 @@
+Format: 1.0
+Source: grandorgue
+Binary: grandorgue
+Architecture: any
+Version: 0.3.0.6.1026
+Maintainer: Martin Koegler <[email protected]>
+Standards-Version: 3.9.1
+Build-Depends: debhelper (>= 7), cdbs, cmake, gettext, po4a, 
libjack-jackd2-dev, libasound2-dev, libwxgtk2.8-dev, docbook-xsl, xsltproc, 
zip, devscripts
+DEBTRANSFORM-FILES-TAR: debian.tar.gz debian1.tar.gz
+Files: 
+ 1e0023c7fb1f19a883ec8170efeff360 2817072 grandorgue_0.3.0.6.tar.gz
Files 
old/obs-build-20120927/test-debtransform/2-out/grandorgue_0.3.0.6.1026.diff.gz 
and 
new/obs-build-20121123/test-debtransform/2-out/grandorgue_0.3.0.6.1026.diff.gz 
differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-build-20120927/test-debtransform/2-out/grandorgue_0.3.0.6.1026.dsc 
new/obs-build-20121123/test-debtransform/2-out/grandorgue_0.3.0.6.1026.dsc
--- old/obs-build-20120927/test-debtransform/2-out/grandorgue_0.3.0.6.1026.dsc  
1970-01-01 01:00:00.000000000 +0100
+++ new/obs-build-20121123/test-debtransform/2-out/grandorgue_0.3.0.6.1026.dsc  
2012-11-26 09:49:40.000000000 +0100
@@ -0,0 +1,12 @@
+Format: 1.0
+Source: grandorgue
+Binary: grandorgue
+Architecture: any
+Version: 0.3.0.6.1026
+Maintainer: Martin Koegler <[email protected]>
+Standards-Version: 3.9.1
+Build-Depends: debhelper (>= 7), cdbs, cmake, gettext, po4a, 
libjack-jackd2-dev, libasound2-dev, libwxgtk2.8-dev, docbook-xsl, xsltproc, 
zip, devscripts
+Files: 
+ 7ab43adb27b5ce885dccd5526745a5a1 655 grandorgue_0.3.0.6.1026.orig.tar.gz
+ aee05a68c294747ab67965c8675f9821 756 grandorgue_0.3.0.6.1026.diff.gz
+
Files 
old/obs-build-20120927/test-debtransform/2-out/grandorgue_0.3.0.6.1026.orig.tar.gz
 and 
new/obs-build-20121123/test-debtransform/2-out/grandorgue_0.3.0.6.1026.orig.tar.gz
 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20120927/test-debtransform/run.sh 
new/obs-build-20121123/test-debtransform/run.sh
--- old/obs-build-20120927/test-debtransform/run.sh     1970-01-01 
01:00:00.000000000 +0100
+++ new/obs-build-20121123/test-debtransform/run.sh     2012-11-26 
09:49:40.000000000 +0100
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+function fail
+{
+    echo "$1: FAIL"
+    exit 1
+}
+function run
+{
+    rm -rf out
+    mkdir out
+    ERROR=0
+    PATH=..:$PATH ../debtransform $1 $1/$2 out || ERROR=1
+    if [ "$ERROR" != "$3" ]; then
+       fail $1
+    fi
+    echo "$1: OK"
+    if [ "$ERROR" = 0 ]; then
+       for a in out/*
+       do
+           NAME="`basename "$a"`"
+           case $NAME in
+               *.dsc)
+                   debdiff $4/$NAME out/$NAME
+                   ;;
+           esac
+       done
+    fi
+}
+
+run 1 grandorgue.dsc 0 1-out
+run 2 grandorgue.dsc 0 2-out
\ No newline at end of file

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to