diff --git a/new.diff b/new.diff index a5c98c0..a59e774 100644 --- a/new.diff +++ b/new.diff @@ -1,7 +1,7 @@ Index: post-build-checks-1.0/checks/09-check-packaged-twice =================================================================== --- post-build-checks-1.0.orig/checks/09-check-packaged-twice 2011-10-20 11:57:54.000000000 +0200 -+++ post-build-checks-1.0/checks/09-check-packaged-twice 2011-11-28 12:46:09.048680204 +0100 ++++ post-build-checks-1.0/checks/09-check-packaged-twice 2011-12-01 17:36:22.894836849 +0100 @@ -1,61 +1,74 @@ -#!/usr/bin/perl +#!/usr/bin/perl -w @@ -48,7 +48,8 @@ Index: post-build-checks-1.0/checks/09-check-packaged-twice -if ( $#RPMS < 1 ) { - exit 0; -+open (ALL_RPMS, "find $build_root$TOPDIR/RPMS -name \"*.rpm\" |"); ++print "chroot $build_root find $TOPDIR/RPMS -name \"*.rpm\"\n"; ++open (ALL_RPMS, "chroot $build_root find $TOPDIR/RPMS/ -name \"*.rpm\" |"); +my @rpms = ; +chomp @rpms; +close ALL_RPMS; @@ -59,7 +60,6 @@ Index: post-build-checks-1.0/checks/09-check-packaged-twice +my %pkg2rpm; + +for my $rpm (@rpms) { -+ $rpm =~ s/^$build_root//; + open (FILES, "chroot $build_root rpm -qp --qf '[%{FILEMODES:perms} F:%{FILEFLAGS:fflags} %{NAME} %{FILENAMES}\n]' $rpm|"); + my @files = ; + chomp @files; @@ -108,7 +108,7 @@ Index: post-build-checks-1.0/checks/09-check-packaged-twice + while (@pkgs) { + my $p1 = shift @pkgs; + for my $p2 (@pkgs) { -+ next if (index('g', $allfiles{$file}->{$p1}) != -1) && (index('g', $allfiles{$file}->{$p2}) != -1); ++ next if (index($allfiles{$file}->{$p1}, 'g') != -1) && (index($allfiles{$file}->{$p2}, 'g') != -1); + next if conflicts($pkg2rpm{$p1}, $pkg2rpm{$p2}) || conflicts($pkg2rpm{$p2}, $pkg2rpm{$p1}); + print "ERROR: $file is packaged in both $p1 and $p2, and the packages do not conflict\n"; + $had_errors = 1; diff --git a/post-build-checks.changes b/post-build-checks.changes index 62929e0..bf2ef6c 100644 --- a/post-build-checks.changes +++ b/post-build-checks.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Dec 1 16:36:29 UTC 2011 - coolo@suse.com + +- fix usage of perl's index() + ------------------------------------------------------------------- Mon Nov 28 11:46:44 UTC 2011 - coolo@suse.com diff --git a/post-build-checks.spec b/post-build-checks.spec index 2f84b30..3ab4346 100644 --- a/post-build-checks.spec +++ b/post-build-checks.spec @@ -15,16 +15,12 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - - Name: post-build-checks -License: GPLv2+ +License: GPL-2.0+ Group: Development/Tools/Building -AutoReqProv: on Summary: post checks for build after rpms have been created Version: 1.0 -Release: 95 +Release: 0 PreReq: aaa_base permissions sed Url: http://gitorious.org/opensuse/post-build-checks #