- add _vendor to configs
authorMichael Schröder <mls@suse.de>
Thu, 10 May 2007 18:07:08 +0000 (18:07 +0000)
committerMichael Schröder <mls@suse.de>
Thu, 10 May 2007 18:07:08 +0000 (18:07 +0000)
- fix deban dependency compare
- allow not operator in configs
- fix build from source rpms

15 files changed:
Build.pm
build
configs/sl10.0.conf
configs/sl10.1.conf
configs/sl10.2.conf
configs/sl8.1.conf
configs/sl8.2.conf
configs/sl9.0.conf
configs/sl9.1.conf
configs/sl9.2.conf
configs/sl9.3.conf
configs/sles10.conf
configs/sles8.conf
configs/sles9.conf
configs/ul1.conf

index e18ea80..204d1ad 100644 (file)
--- a/Build.pm
+++ b/Build.pm
@@ -112,7 +112,16 @@ sub read_config {
       next;
     }
     if ($l0 eq 'preinstall:' || $l0 eq 'vminstall:' || $l0 eq 'required:' || $l0 eq 'support:' || $l0 eq 'keep:' || $l0 eq 'prefer:' || $l0 eq 'ignore:' || $l0 eq 'conflict:' || $l0 eq 'runscripts:') {
-      push @{$config->{substr($l0, 0, -1)}}, @l;
+      my $t = substr($l0, 0, -1);
+      for my $l (@l) {
+       if ($l eq '!*') {
+         $config->{$t} = [];
+       } elsif ($l =~ /^!/) {
+         $config->{$t} = [ grep {"!$_" ne $l} @{$config->{$t}} ];
+       } else {
+         push @{$config->{$t}}, $l;
+       }
+      }
     } elsif ($l0 eq 'substitute:') {
       next unless @l;
       $ll = shift @l;
@@ -364,7 +373,7 @@ sub addproviders {
       }
       my $rr = $rf == 2 ? $pf : ($rf ^ 5);
       $rr &= 5 unless $pf & 2;
-      my $vv = Build::Rpm::verscmp($pv, $rv, 1);
+      my $vv = Build::Rpm::verscmp($pv, $rv, $config->{'type'} eq 'spec' ? 1 : 0);
       if ($rr & (1 << ($vv + 1))) {
        push @p, $rp;
        last;
diff --git a/build b/build
index bf1ab9b..710a924 100755 (executable)
--- a/build
+++ b/build
@@ -507,7 +507,7 @@ for SPECFILE in $SPECFILES ; do
 
     if test "$SPECFILE" != "${SPECFILE%.src.rpm}" ; then
        echo processing src rpm `pwd`/$SPECFILE...
-       TOPDIR=`chroot $BUILD_ROOT rpm --eval '%_topdir'`
+       TOPDIR=`rpm --eval '%_topdir'`
        rm -rf $BUILD_ROOT$TOPDIR
        mkdir -p $BUILD_ROOT$TOPDIR/SOURCES $BUILD_ROOT$TOPDIR/SPECS
        rpm -i --nodigest --nosignature --root $BUILD_ROOT $SPECFILE || {
index 7ba31a9..e9de0b1 100644 (file)
@@ -199,3 +199,4 @@ Macros:
 %sles_version 0
 %ul_version 0
 %do_profiling 1
+%_vendor suse
index fc852af..654ea3e 100644 (file)
@@ -193,3 +193,4 @@ Macros:
 %sles_version 0
 %ul_version 0
 %do_profiling 1
+%_vendor suse
index 5438da7..0743d52 100644 (file)
@@ -203,3 +203,4 @@ Macros:
 %sles_version 0
 %ul_version 0
 %do_profiling 1
+%_vendor suse
index 1e0828b..1f675fb 100644 (file)
@@ -192,3 +192,4 @@ Macros:
 %suse_version 810
 %sles_version 0
 %ul_version 0
+%_vendor suse
index f8da19e..e7e11bc 100644 (file)
@@ -195,3 +195,4 @@ Macros:
 %ul_version 0
 %jds_version 0
 %do_profiling 1
+%_vendor suse
index f2ab7a0..6d7dc03 100644 (file)
@@ -196,3 +196,4 @@ Macros:
 %ul_version 0
 %jds_version 0
 %do_profiling 1
+%_vendor suse
index 05484d0..24d4fcf 100644 (file)
@@ -200,3 +200,4 @@ Macros:
 %ul_version 0
 %jds_version 0
 %do_profiling 1
+%_vendor suse
index 0fcf915..cd1902f 100644 (file)
@@ -195,3 +195,4 @@ Macros:
 %sles_version 0
 %ul_version 0
 %do_profiling 1
+%_vendor suse
index d78dd4c..33c4256 100644 (file)
@@ -195,3 +195,4 @@ Macros:
 %sles_version 0
 %ul_version 0
 %do_profiling 1
+%_vendor suse
index d5b7f6b..6e80875 100644 (file)
@@ -195,3 +195,4 @@ Macros:
 %sles_version 10
 %ul_version 0
 %do_profiling 1
+%_vendor suse
index 95bcc41..f36b121 100644 (file)
@@ -192,3 +192,4 @@ Macros:
 %suse_version 810
 %sles_version 8
 %ul_version 0
+%_vendor suse
index d6f2545..70ea7d6 100644 (file)
@@ -200,3 +200,4 @@ Macros:
 %ul_version 0
 %jds_version 0
 %do_profiling 1
+%_vendor suse
index b9148c5..041655f 100644 (file)
@@ -192,3 +192,4 @@ Macros:
 %suse_version 810
 %sles_version 0
 %ul_version 1
+%_vendor suse