forked from pool/post-build-checks
- fix usage of perl's index()
OBS-URL: https://build.opensuse.org/package/show/Base:System/post-build-checks?expand=0&rev=54
This commit is contained in:
parent
2e0cdbb554
commit
8328e2537c
8
new.diff
8
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 = <ALL_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 = <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;
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user