- ignore files that are %ghost in both packages
OBS-URL: https://build.opensuse.org/package/show/Base:System/post-build-checks?expand=0&rev=51
This commit is contained in:
parent
a82597eebc
commit
2e0cdbb554
13
new.diff
13
new.diff
@ -1,8 +1,8 @@
|
||||
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-25 19:07:11.509942810 +0100
|
||||
@@ -1,61 +1,73 @@
|
||||
+++ post-build-checks-1.0/checks/09-check-packaged-twice 2011-11-28 12:46:09.048680204 +0100
|
||||
@@ -1,61 +1,74 @@
|
||||
-#!/usr/bin/perl
|
||||
+#!/usr/bin/perl -w
|
||||
# search for files packaged more than once
|
||||
@ -60,16 +60,16 @@ Index: post-build-checks-1.0/checks/09-check-packaged-twice
|
||||
+
|
||||
+for my $rpm (@rpms) {
|
||||
+ $rpm =~ s/^$build_root//;
|
||||
+ open (FILES, "chroot $build_root rpm -qp --qf '[%{FILEMODES:perms} %{NAME} %{FILENAMES}\n]' $rpm|");
|
||||
+ open (FILES, "chroot $build_root rpm -qp --qf '[%{FILEMODES:perms} F:%{FILEFLAGS:fflags} %{NAME} %{FILENAMES}\n]' $rpm|");
|
||||
+ my @files = <FILES>;
|
||||
+ chomp @files;
|
||||
+ close FILES;
|
||||
+ # ignore dirs
|
||||
+ @files = grep {!/^d/} @files;
|
||||
+ for my $file (@files) {
|
||||
+ next unless $file =~ /^\S+ (\S+) (.*)$/;
|
||||
+ $allfiles{$2}->{$1} = 1;
|
||||
+ $pkg2rpm{$1} = $rpm;
|
||||
+ next unless $file =~ /^\S+ F:(\S*) (\S+) (.*)$/;
|
||||
+ $allfiles{$3}->{$2} = $1;
|
||||
+ $pkg2rpm{$2} = $rpm;
|
||||
+ }
|
||||
}
|
||||
|
||||
@ -108,6 +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 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 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 28 11:46:44 UTC 2011 - coolo@suse.com
|
||||
|
||||
- ignore files that are %ghost in both packages
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 25 21:59:53 UTC 2011 - coolo@suse.com
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user