author | Alan Coopersmith <Alan.Coopersmith@Oracle.COM> |
Fri, 09 Sep 2011 20:42:44 -0700 | |
changeset 1207 | 996eb6e88a18 |
parent 1130 | e9cbce844ef6 |
permissions | -rwxr-xr-x |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
1 |
#! /usr/perl5/bin/perl -w |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
2 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
3 |
# |
1130
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
4 |
# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
5 |
# |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
6 |
# Permission is hereby granted, free of charge, to any person obtaining a |
919
425233ae7236
6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
907
diff
changeset
|
7 |
# copy of this software and associated documentation files (the "Software"), |
425233ae7236
6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
907
diff
changeset
|
8 |
# to deal in the Software without restriction, including without limitation |
425233ae7236
6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
907
diff
changeset
|
9 |
# the rights to use, copy, modify, merge, publish, distribute, sublicense, |
425233ae7236
6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
907
diff
changeset
|
10 |
# and/or sell copies of the Software, and to permit persons to whom the |
425233ae7236
6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
907
diff
changeset
|
11 |
# Software is furnished to do so, subject to the following conditions: |
425233ae7236
6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
907
diff
changeset
|
12 |
# |
425233ae7236
6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
907
diff
changeset
|
13 |
# The above copyright notice and this permission notice (including the next |
425233ae7236
6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
907
diff
changeset
|
14 |
# paragraph) shall be included in all copies or substantial portions of the |
425233ae7236
6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
907
diff
changeset
|
15 |
# Software. |
425233ae7236
6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
907
diff
changeset
|
16 |
# |
425233ae7236
6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
907
diff
changeset
|
17 |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
425233ae7236
6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
907
diff
changeset
|
18 |
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
425233ae7236
6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
907
diff
changeset
|
19 |
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
425233ae7236
6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
907
diff
changeset
|
20 |
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
425233ae7236
6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
907
diff
changeset
|
21 |
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
425233ae7236
6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
907
diff
changeset
|
22 |
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
425233ae7236
6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
907
diff
changeset
|
23 |
# DEALINGS IN THE SOFTWARE. |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
24 |
# |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
25 |
# |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
26 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
27 |
require 5.005; # minimal Perl version required |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
28 |
use strict; # |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
29 |
use diagnostics; # |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
30 |
use File::Spec; # pathname manipulation routines |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
31 |
use File::stat; # Named results from stat() function |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
32 |
use English qw( -nomatchvars ); |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
33 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
34 |
my $default_logfile = 'buildit-XW'; |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
35 |
# Log file from new pkg(5) build (in same directory as $default_logfile) |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
36 |
my $default_ips_pkglogfile = 'make-pkgs'; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
37 |
# Log file from old SVR4 package build: |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
38 |
my $default_logpath = 'log/' . $default_logfile; |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
39 |
my $default_svr4_pkglogpath = 'proto-packages/logs/package_build'; |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
40 |
my $logfile; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
41 |
my $pkglog; |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
42 |
my $pkglog_type; # 'ips' or 'svr4' |
1130
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
43 |
my $pkgvalidlog; |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
44 |
my $pkgfailed; |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
45 |
my $summary_only = 0; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
46 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
47 |
if (defined $ARGV[0] && $ARGV[0] eq '-s') { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
48 |
$summary_only = 1; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
49 |
shift @ARGV; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
50 |
} |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
51 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
52 |
if (defined $ARGV[0]) { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
53 |
if (-d $ARGV[0]) { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
54 |
$logfile = $ARGV[0] . '/' . $default_logpath; |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
55 |
} elsif ($ARGV[0] =~ m{/make-pkgs$}ms) { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
56 |
$pkglog = $ARGV[0]; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
57 |
$pkglog_type = 'ips'; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
58 |
} elsif ($ARGV[0] =~ m{/check-pkgs$}ms) { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
59 |
$pkglog = $ARGV[0]; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
60 |
$pkglog_type = 'validate'; |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
61 |
} elsif ($ARGV[0] =~ m{/package_build$}ms) { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
62 |
$pkglog = $ARGV[0]; |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
63 |
$pkglog_type = 'svr4'; |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
64 |
} else { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
65 |
$logfile = $ARGV[0]; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
66 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
67 |
} elsif ( -f $default_logfile ) { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
68 |
$logfile = $default_logfile; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
69 |
} elsif ( -f $default_logpath ) { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
70 |
$logfile = $default_logpath; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
71 |
} else { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
72 |
my @dirtree = File::Spec->splitdir( |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
73 |
File::Spec->rel2abs(File::Spec->curdir())); |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
74 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
75 |
# climb the tree, removing one parent at a time to find the logfile |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
76 |
while (scalar(@dirtree) > 0) { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
77 |
$logfile = File::Spec->catfile( @dirtree, $default_logpath); |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
78 |
last if ( -f $logfile); |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
79 |
# print "$logfile not found\n"; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
80 |
pop @dirtree; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
81 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
82 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
83 |
if (scalar(@dirtree) == 0) { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
84 |
die "$default_logfile not found, please specify path to log\n"; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
85 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
86 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
87 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
88 |
if (defined $logfile) { |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
89 |
my $make_errors = 0; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
90 |
my $LOGFILE = check_make_log($logfile, \$make_errors); |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
91 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
92 |
print "Build errors: ", $make_errors, "\n"; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
93 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
94 |
my $printme = 0; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
95 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
96 |
# end of file stuff |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
97 |
while (my $l = <$LOGFILE>) { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
98 |
if ($l =~ m{^Runtime: }) { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
99 |
print $l; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
100 |
next; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
101 |
} |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
102 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
103 |
# Look for package build results |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
104 |
if ($l =~ m{^result log is in (\S*)$}ims) { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
105 |
if ($1 =~ m{/package_build$}ms) { |
1030
0738233d0472
6996111 validate_pkg failures introduced by VNC & DMX putbacks in snv_152
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
970
diff
changeset
|
106 |
$pkglog = $1; |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
107 |
$pkglog_type = 'svr4'; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
108 |
} else { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
109 |
$pkglog_type = 'ips'; |
1030
0738233d0472
6996111 validate_pkg failures introduced by VNC & DMX putbacks in snv_152
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
970
diff
changeset
|
110 |
$printme = 1; |
0738233d0472
6996111 validate_pkg failures introduced by VNC & DMX putbacks in snv_152
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
970
diff
changeset
|
111 |
print "\n"; |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
112 |
} |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
113 |
} elsif ($l =~ m{^Packages built:}ms) { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
114 |
print $l; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
115 |
} elsif ($l =~ m{^Package.* failed:\s+(\d+)}ms) { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
116 |
$pkgfailed = $1; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
117 |
print $l; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
118 |
} |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
119 |
# print lines where messages about COPYING file errors appear |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
120 |
# between "Copying package descriptions" & "Building packages" |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
121 |
elsif ($l =~ m{Copying package descriptions}) { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
122 |
$printme = 1; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
123 |
} elsif ($l =~ m{Building packages}) { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
124 |
$printme = 0; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
125 |
} |
1130
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
126 |
# Log for IPS packaging checks |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
127 |
elsif ($l =~ m{Checking built packages}) { |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
128 |
next; |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
129 |
} elsif ($l =~ m{Package check log is in (\S*)$}ims) { |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
130 |
$pkgvalidlog = $1; |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
131 |
} |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
132 |
# Print selected lines |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
133 |
elsif ($printme == 1) { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
134 |
print $l; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
135 |
} |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
136 |
} |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
137 |
print "\n"; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
138 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
139 |
close($LOGFILE); |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
140 |
} |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
141 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
142 |
# Input: string containing name of logfile |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
143 |
# Prints errors from make output log |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
144 |
# Returns open log file pointer for post-processing |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
145 |
sub check_make_log { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
146 |
my ($logfile, $error_count_ref) = @_; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
147 |
|
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
148 |
open my $LOGFILE, '<', $logfile |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
149 |
or die "Can't open '$logfile': $OS_ERROR"; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
150 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
151 |
print "Scanning $logfile for error messages...\n\n"; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
152 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
153 |
my @steplines; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
154 |
my $found_error = 0; |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
155 |
my $error_count = 0; |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
156 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
157 |
while (my $l = <$LOGFILE>) { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
158 |
# Finished if we see the end line |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
159 |
last if $l =~ m{Finished building the X Window System Consolidation}ms; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
160 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
161 |
# Clear saved lines for each new module/subdir |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
162 |
if (($l =~ m{^\#\# making \S+ in \S+\.\.\.$}ms) || # open-src pattern |
810
6f94d3da0552
6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
702
diff
changeset
|
163 |
($l =~ m{^dmake: Warning: Target `subdirs' not remade because of errors}ms) || |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
164 |
($l =~ m{^\#\# [[:upper:]][[:lower:]]+ing }ms) || # pkg pattern |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
165 |
($l =~ m{^\S+ing( \S+)* in \S+\.\.\.$}ms)) { # xc pattern |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
166 |
@steplines = (); |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
167 |
$found_error = 0; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
168 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
169 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
170 |
# If we already hit an error, skip the rest of this module |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
171 |
next if ($found_error != 0); |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
172 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
173 |
# Add this line to the saved output, combine with previous if previous |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
174 |
# ended with an \ |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
175 |
if (($#steplines >= 0) && ($steplines[$#steplines] =~ m{\\\Z}ms)) { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
176 |
$steplines[$#steplines] .= $l; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
177 |
} else { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
178 |
push @steplines, $l; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
179 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
180 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
181 |
# Skip ahead to next line if this line ends with \ |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
182 |
next if ($l =~ m{\\\Z}ms); |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
183 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
184 |
# Found a new error? |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
185 |
if (($l =~ m{\*\*\* }ms) || ($l =~ m{^(d)?make: Fatal error}ms)) { |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
186 |
$found_error = 1; |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
187 |
$error_count++; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
188 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
189 |
next if ($summary_only); |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
190 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
191 |
# Print section header |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
192 |
print $steplines[0], "\n"; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
193 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
194 |
my $lastmake; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
195 |
my $lastcommand = 1; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
196 |
my $lastplus = 0; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
197 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
198 |
# scan back to figure out how far back to print |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
199 |
for my $ln (1..($#steplines - 1)) { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
200 |
my $sl = $steplines[$ln]; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
201 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
202 |
# print "lastmake: $lastmake, lastcom: $lastcommand, lastplus: $lastplus, line #$ln: $sl\n"; |
810
6f94d3da0552
6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
702
diff
changeset
|
203 |
if ($sl =~ m{\b(make|dmake|gmake)\b}ms) { |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
204 |
$lastmake = $ln; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
205 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
206 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
207 |
if ($sl =~ m{\breturned\b}ms) { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
208 |
# don't treat this as a command |
810
6f94d3da0552
6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
702
diff
changeset
|
209 |
} elsif ($sl =~ m{\b(cc|gcc|CC|g\+\+|ld|gpatch|libtool|GEN|CCLD)\s+}ms) { |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
210 |
if ($sl !~ m{usage:}) { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
211 |
$lastcommand = $ln; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
212 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
213 |
} elsif ($sl =~ m{^\+ }ms) { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
214 |
# print from start of shell's set -x output, not end |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
215 |
if ($lastplus != ($ln - 1)) { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
216 |
$lastcommand = $ln; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
217 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
218 |
$lastplus = $ln; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
219 |
} elsif ($lastplus == ($ln - 1)) { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
220 |
$lastcommand = $ln; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
221 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
222 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
223 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
224 |
# print "lastmake: $lastmake, lastcommand: $lastcommand\n"; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
225 |
if ($lastmake && ($lastmake < $lastcommand)) { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
226 |
print $steplines[$lastmake]; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
227 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
228 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
229 |
for my $ln ($lastcommand..$#steplines) { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
230 |
print $steplines[$ln]; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
231 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
232 |
print "\n", '-'x78, "\n"; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
233 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
234 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
235 |
|
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
236 |
if (defined $error_count_ref) { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
237 |
${$error_count_ref} = $error_count; |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
238 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
239 |
|
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
240 |
return $LOGFILE; |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
241 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
242 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
243 |
sub check_pkglog { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
244 |
my ($pl) = @_; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
245 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
246 |
if ( -f $pl ) { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
247 |
my $logfile_sb = stat($logfile); |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
248 |
my $pkglog_sb = stat($pl); |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
249 |
|
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
250 |
if ($logfile_sb->mtime > $pkglog_sb->mtime) { |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
251 |
# Haven't rebuilt packages since last build, so no point reporting errors |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
252 |
undef $pl; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
253 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
254 |
} else { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
255 |
undef $pl; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
256 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
257 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
258 |
return $pl; |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
259 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
260 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
261 |
# No packaging log found in build log, try to guess where it is |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
262 |
if (!defined($pkglog)) { |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
263 |
my $path_to_check = $logfile; |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
264 |
$path_to_check =~ s{$default_logfile}{$default_ips_pkglogfile}ms; |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
265 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
266 |
$pkglog = check_pkglog($path_to_check); |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
267 |
|
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
268 |
if (defined($pkglog)) { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
269 |
$pkglog_type = 'ips'; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
270 |
} else { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
271 |
$pkglog_type = 'svr4'; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
272 |
|
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
273 |
$path_to_check = $logfile; |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
274 |
$path_to_check =~ s{$default_logpath}{$default_svr4_pkglogpath}ms; |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
275 |
|
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
276 |
$pkglog = check_pkglog($path_to_check); |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
277 |
if (!defined($pkglog)) { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
278 |
$path_to_check = $logfile; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
279 |
$path_to_check =~ s{($default_logpath).*$}{$default_svr4_pkglogpath}ms; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
280 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
281 |
$pkglog = check_pkglog($path_to_check); |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
282 |
} |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
283 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
284 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
285 |
|
1130
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
286 |
if ((!defined($pkgfailed) || ($pkgfailed > 0)) && defined($pkglog)) { |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
287 |
check_pkg_log($pkglog, $pkglog_type); |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
288 |
} |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
289 |
|
1130
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
290 |
if (defined($pkgvalidlog)) { |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
291 |
print "\nScanning $pkgvalidlog for package checking issues...\n\n"; |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
292 |
check_pkg_log($pkgvalidlog, 'validate'); |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
293 |
} |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
294 |
|
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
295 |
sub check_pkg_log { |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
296 |
my ($logfile, $logtype) = @_; |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
297 |
if ($logtype eq 'svr4') { |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
298 |
open my $PKGLOG, '<', $logfile |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
299 |
or die "Can't open '$logfile': $OS_ERROR"; |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
300 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
301 |
my @pkglines; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
302 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
303 |
while (my $l = <$PKGLOG>) { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
304 |
# Clear saved lines for each new package |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
305 |
if ($l =~ m{^[*]+ Making the \S+ package [*]+$}ms) { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
306 |
@pkglines = (); |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
307 |
} |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
308 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
309 |
# Warnings we can ignore |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
310 |
next if $l =~ m{^WARNING: parameter \<PSTAMP\> set}ms; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
311 |
next if $l =~ m{^WARNING: parameter \<CLASSES\> set to "none"}ms; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
312 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
313 |
push @pkglines, $l; |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
314 |
|
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
315 |
if (($l =~ m{(Packaging was not successful.|was not found ; skipping)}ms) |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
316 |
|| ($l =~ m{^WARNING: }ms)) { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
317 |
print join('', @pkglines); |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
318 |
@pkglines = (); |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
319 |
} |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
320 |
} |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
321 |
close($PKGLOG); |
1130
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
322 |
} elsif ($logtype eq 'ips') { |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
323 |
my $ips_count_errors = 0; |
1130
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
324 |
my $PKGLOG = check_make_log($logfile, \$ips_count_errors); |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
325 |
|
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
326 |
seek($PKGLOG, 0, 0); # reset to start reading from beginning of file |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
327 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
328 |
my $ips_count_published = 0; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
329 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
330 |
while (my $l = <$PKGLOG>) { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
331 |
if ($l =~ m{Publishing .* to proto repository}) { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
332 |
$ips_count_published++; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
333 |
} |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
334 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
335 |
|
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
336 |
print "Packages published: $ips_count_published\n"; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
337 |
print "Package build errors: $ips_count_errors\n"; |
1130
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
338 |
} elsif ($logtype eq 'validate') { # validate_pkg |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
339 |
open my $PKGLOG, '<', $logfile |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
340 |
or die "Can't open '$logfile': $OS_ERROR"; |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
341 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
342 |
my @pkglines; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
343 |
my $issue_count = 0; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
344 |
my $issue_type = ""; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
345 |
|
1130
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
346 |
my $publisher; |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
347 |
|
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
348 |
while (my $l = <$PKGLOG>) { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
349 |
chomp($l); |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
350 |
|
1130
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
351 |
if ($l =~ m{^\#\# Running pkglint on the (\S+) repository}) { |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
352 |
$publisher = $1; |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
353 |
} |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
354 |
|
1207
996eb6e88a18
7086641 X package manifests should move to pkgfmt version 2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1130
diff
changeset
|
355 |
# Make pkgfmt issues better match the other patterns |
996eb6e88a18
7086641 X package manifests should move to pkgfmt version 2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1130
diff
changeset
|
356 |
if ($issue_type =~ m{pkgfmt}) { |
996eb6e88a18
7086641 X package manifests should move to pkgfmt version 2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1130
diff
changeset
|
357 |
$l =~ s{^pkgfmt:}{}; |
996eb6e88a18
7086641 X package manifests should move to pkgfmt version 2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1130
diff
changeset
|
358 |
} |
996eb6e88a18
7086641 X package manifests should move to pkgfmt version 2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1130
diff
changeset
|
359 |
|
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
360 |
# Clear saved lines for each new class of issue |
1130
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
361 |
if (($l =~ m{^\S+ .*:+$}ms) || ($l =~ m{^\#\# })) { |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
362 |
$issue_type = $l; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
363 |
$issue_count = 0; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
364 |
@pkglines = (); |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
365 |
next; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
366 |
} |
702
1c8695b0715f
6840420 misc files missing from X packages
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
606
diff
changeset
|
367 |
|
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
368 |
# These issues print across two lines |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
369 |
if ($issue_type eq |
1130
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
370 |
'Entries that differ between manifests and proto area:') |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
371 |
{ |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
372 |
if ($l =~ m{^\s+manifests }) { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
373 |
my $l2 = <$PKGLOG>; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
374 |
chomp($l2); |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
375 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
376 |
# strip off prefixes for comparisons |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
377 |
my $compare1 = $l; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
378 |
$compare1 =~ s{^\s+manifests }{}; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
379 |
my $compare2 = $l2; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
380 |
$compare2 =~ s{^\s+proto area }{}; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
381 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
382 |
# Warnings we can ignore |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
383 |
if ($compare1 =~ m{^hardlink }) { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
384 |
my $hl1 = $compare1; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
385 |
my $hl2 = $compare2; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
386 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
387 |
# validate_pkg doesn't like hardlinks to isaexec from our pkgs |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
388 |
$hl1 =~ s{ target=usr/lib/isaexec}{}; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
389 |
$hl2 =~ s{ target=\d+}{}; |
702
1c8695b0715f
6840420 misc files missing from X packages
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
606
diff
changeset
|
390 |
|
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
391 |
next if ($hl1 eq $hl2); |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
392 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
393 |
} elsif ($compare1 =~ m{^file }) { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
394 |
my $f1 = $compare1; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
395 |
my $f2 = $compare2; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
396 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
397 |
$f1 =~ s{^file NOHASH }{ }; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
398 |
$f2 =~ s{^file \S+ }{ }; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
399 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
400 |
# We don't expect files in proto area to be chowned/chgrped |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
401 |
$f1 =~ s{ owner=root}{}; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
402 |
$f2 =~ s{ owner=owner}{}; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
403 |
$f1 =~ s{ group=\S+}{}; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
404 |
$f2 =~ s{ group=group}{}; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
405 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
406 |
# We don't expect files in proto area to be setuid/setgid |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
407 |
if ($f1 =~ m{mode=[24]555}) { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
408 |
$f1 =~ s{ mode=[24]555}{}; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
409 |
$f2 =~ s{ mode=0555}{}; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
410 |
} |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
411 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
412 |
next if ($f1 eq $f2); |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
413 |
} |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
414 |
|
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
415 |
$l .= "\n" . $l2 . "\n"; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
416 |
} |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
417 |
} |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
418 |
|
1130
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
419 |
# Skip warnings we can't do anything about (workaround for |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
420 |
# https://defect.opensolaris.org/bz/show_bug.cgi?id=18346 ) |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
421 |
if ($l =~ m{^WARNING pkglint.manifest004}) { |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
422 |
next unless $l =~ m{pkg://$publisher/}; |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
423 |
} |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
424 |
|
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
425 |
# Skip informational messages from pkglint |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
426 |
next if ($l =~ m{^INFO pkglint}); |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
427 |
|
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
428 |
# Group pkglint errors by type |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
429 |
if ($l =~ m{^([A-Z]+ (?:pkglint|opensolaris)\S+)\s+(.*)$}) { |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
430 |
my ($new_issue, $details) = ($1, $2); |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
431 |
if ($issue_type eq $new_issue) { |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
432 |
push @pkglines, $details; |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
433 |
$issue_count++; |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
434 |
} else { |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
435 |
print_valid_issue($issue_type, $issue_count, \@pkglines); |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
436 |
$issue_type = $new_issue; |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
437 |
$issue_count = 1; |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
438 |
@pkglines = ($details); |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
439 |
} |
1130
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
440 |
} |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
441 |
elsif ($l =~ m{^$}) { # Blank lines separate validate_pkg sections |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
442 |
print_valid_issue($issue_type, $issue_count, \@pkglines); |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
443 |
$issue_type = ""; |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
444 |
$issue_count = 0; |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
445 |
@pkglines = (); |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
446 |
} else { |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
447 |
push @pkglines, $l; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
448 |
$issue_count++; |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
449 |
} |
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
450 |
|
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
451 |
} |
1130
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
452 |
# print any final issues that weren't followed by a blank line |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
453 |
print_valid_issue($issue_type, $issue_count, \@pkglines); |
970
272328fe1b4a
6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
943
diff
changeset
|
454 |
close($PKGLOG); |
493
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
455 |
} |
f43507b5737d
6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
456 |
} |
1130
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
457 |
|
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
458 |
sub print_valid_issue |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
459 |
{ |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
460 |
my ($issue_type, $issue_count, $pkglines) = @_; |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
461 |
|
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
462 |
if ($issue_count > 0) { |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
463 |
if ($issue_type !~ m{:$}) { |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
464 |
$issue_type .= ':'; |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
465 |
} |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
466 |
if ($summary_only) { |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
467 |
print $issue_type, ' ', $issue_count, "\n"; |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
468 |
} else { |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
469 |
print join("\n", $issue_type, '', @{$pkglines}), "\n\n"; |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
470 |
} |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
471 |
} |
e9cbce844ef6
7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1030
diff
changeset
|
472 |
} |