Accepting request 93983 from Base:System

- ignore files that are %ghost in both packages

OBS-URL: https://build.opensuse.org/request/show/93983
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/post-build-checks?expand=0&rev=54
This commit is contained in:
Stephan Kulow 2011-11-28 12:37:53 +00:00 committed by Git OBS Bridge
commit 1ea3809d61
2 changed files with 12 additions and 6 deletions

View File

@ -1,8 +1,8 @@
Index: post-build-checks-1.0/checks/09-check-packaged-twice 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.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 +++ post-build-checks-1.0/checks/09-check-packaged-twice 2011-11-28 12:46:09.048680204 +0100
@@ -1,61 +1,73 @@ @@ -1,61 +1,74 @@
-#!/usr/bin/perl -#!/usr/bin/perl
+#!/usr/bin/perl -w +#!/usr/bin/perl -w
# search for files packaged more than once # 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) { +for my $rpm (@rpms) {
+ $rpm =~ s/^$build_root//; + $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>; + my @files = <FILES>;
+ chomp @files; + chomp @files;
+ close FILES; + close FILES;
+ # ignore dirs + # ignore dirs
+ @files = grep {!/^d/} @files; + @files = grep {!/^d/} @files;
+ for my $file (@files) { + for my $file (@files) {
+ next unless $file =~ /^\S+ (\S+) (.*)$/; + next unless $file =~ /^\S+ F:(\S*) (\S+) (.*)$/;
+ $allfiles{$2}->{$1} = 1; + $allfiles{$3}->{$2} = $1;
+ $pkg2rpm{$1} = $rpm; + $pkg2rpm{$2} = $rpm;
+ } + }
} }
@ -108,6 +108,7 @@ Index: post-build-checks-1.0/checks/09-check-packaged-twice
+ while (@pkgs) { + while (@pkgs) {
+ my $p1 = shift @pkgs; + my $p1 = shift @pkgs;
+ for my $p2 (@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}); + 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"; + print "ERROR: $file is packaged in both $p1 and $p2, and the packages do not conflict\n";
+ $had_errors = 1; + $had_errors = 1;

View File

@ -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 Fri Nov 25 21:59:53 UTC 2011 - coolo@suse.com