From: Michael Schröder Date: Thu, 10 May 2007 18:07:08 +0000 (+0000) Subject: - add _vendor to configs X-Git-Tag: obs_2.0~442 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4fe96e591404933c7b677151ef78d7d74c5b35bc;p=tools%2Fobs-build.git - add _vendor to configs - fix deban dependency compare - allow not operator in configs - fix build from source rpms --- diff --git a/Build.pm b/Build.pm index e18ea80..204d1ad 100644 --- 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 --- 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 || { diff --git a/configs/sl10.0.conf b/configs/sl10.0.conf index 7ba31a9..e9de0b1 100644 --- a/configs/sl10.0.conf +++ b/configs/sl10.0.conf @@ -199,3 +199,4 @@ Macros: %sles_version 0 %ul_version 0 %do_profiling 1 +%_vendor suse diff --git a/configs/sl10.1.conf b/configs/sl10.1.conf index fc852af..654ea3e 100644 --- a/configs/sl10.1.conf +++ b/configs/sl10.1.conf @@ -193,3 +193,4 @@ Macros: %sles_version 0 %ul_version 0 %do_profiling 1 +%_vendor suse diff --git a/configs/sl10.2.conf b/configs/sl10.2.conf index 5438da7..0743d52 100644 --- a/configs/sl10.2.conf +++ b/configs/sl10.2.conf @@ -203,3 +203,4 @@ Macros: %sles_version 0 %ul_version 0 %do_profiling 1 +%_vendor suse diff --git a/configs/sl8.1.conf b/configs/sl8.1.conf index 1e0828b..1f675fb 100644 --- a/configs/sl8.1.conf +++ b/configs/sl8.1.conf @@ -192,3 +192,4 @@ Macros: %suse_version 810 %sles_version 0 %ul_version 0 +%_vendor suse diff --git a/configs/sl8.2.conf b/configs/sl8.2.conf index f8da19e..e7e11bc 100644 --- a/configs/sl8.2.conf +++ b/configs/sl8.2.conf @@ -195,3 +195,4 @@ Macros: %ul_version 0 %jds_version 0 %do_profiling 1 +%_vendor suse diff --git a/configs/sl9.0.conf b/configs/sl9.0.conf index f2ab7a0..6d7dc03 100644 --- a/configs/sl9.0.conf +++ b/configs/sl9.0.conf @@ -196,3 +196,4 @@ Macros: %ul_version 0 %jds_version 0 %do_profiling 1 +%_vendor suse diff --git a/configs/sl9.1.conf b/configs/sl9.1.conf index 05484d0..24d4fcf 100644 --- a/configs/sl9.1.conf +++ b/configs/sl9.1.conf @@ -200,3 +200,4 @@ Macros: %ul_version 0 %jds_version 0 %do_profiling 1 +%_vendor suse diff --git a/configs/sl9.2.conf b/configs/sl9.2.conf index 0fcf915..cd1902f 100644 --- a/configs/sl9.2.conf +++ b/configs/sl9.2.conf @@ -195,3 +195,4 @@ Macros: %sles_version 0 %ul_version 0 %do_profiling 1 +%_vendor suse diff --git a/configs/sl9.3.conf b/configs/sl9.3.conf index d78dd4c..33c4256 100644 --- a/configs/sl9.3.conf +++ b/configs/sl9.3.conf @@ -195,3 +195,4 @@ Macros: %sles_version 0 %ul_version 0 %do_profiling 1 +%_vendor suse diff --git a/configs/sles10.conf b/configs/sles10.conf index d5b7f6b..6e80875 100644 --- a/configs/sles10.conf +++ b/configs/sles10.conf @@ -195,3 +195,4 @@ Macros: %sles_version 10 %ul_version 0 %do_profiling 1 +%_vendor suse diff --git a/configs/sles8.conf b/configs/sles8.conf index 95bcc41..f36b121 100644 --- a/configs/sles8.conf +++ b/configs/sles8.conf @@ -192,3 +192,4 @@ Macros: %suse_version 810 %sles_version 8 %ul_version 0 +%_vendor suse diff --git a/configs/sles9.conf b/configs/sles9.conf index d6f2545..70ea7d6 100644 --- a/configs/sles9.conf +++ b/configs/sles9.conf @@ -200,3 +200,4 @@ Macros: %ul_version 0 %jds_version 0 %do_profiling 1 +%_vendor suse diff --git a/configs/ul1.conf b/configs/ul1.conf index b9148c5..041655f 100644 --- a/configs/ul1.conf +++ b/configs/ul1.conf @@ -192,3 +192,4 @@ Macros: %suse_version 810 %sles_version 0 %ul_version 1 +%_vendor suse