From 2e0cdbb5545f03ce3f7cb864484a7f9730e6513aeb3b25965750694d72b278e1 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 28 Nov 2011 11:46:59 +0000 Subject: [PATCH] - 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 --- new.diff | 13 +++++++------ post-build-checks.changes | 5 +++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/new.diff b/new.diff index b73b71b..a5c98c0 100644 --- a/new.diff +++ b/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 = ; + 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; diff --git a/post-build-checks.changes b/post-build-checks.changes index 0a3a981..62929e0 100644 --- a/post-build-checks.changes +++ b/post-build-checks.changes @@ -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