blob: 27c6bcbca04ca39fcf6ae364143c48215645f024 [file] [log] [blame]
Samuel Mendoza-Jonas52bd75b2018-02-28 10:59:02 +11001#!/usr/bin/env perl
Stewart Smithf76e7f92017-05-19 10:42:01 +10002
Patrick Williams37567b72015-06-08 15:25:40 -05003use strict;
4
Stewart Smithf76e7f92017-05-19 10:42:01 +10005use Getopt::Long;
6use DBI;
7
8# We use an in-memory SQLite database as SQL is good for doing queries
9# of differences between data sets, and doing that in perl is annoying.
10my $db = "dbi:SQLite:dbname=release-notes.sqlite";
11#my $dbh = DBI->connect("dbi:SQLite:dbname=:memory:","","");
12my $dbh = DBI->connect($db,undef,undef, {AutoCommit => 1, RaiseError=>1});
13
Patrick Williams37567b72015-06-08 15:25:40 -050014my $repos =
15{
Samuel Mendoza-Jonasa6262a02017-08-17 14:46:02 +100016 'op-build' => { REPO => "https://github.com/open-power/op-build" },
Stewart Smithb7cab662018-05-09 16:38:43 -050017 'hcode' => { REPO => "https://github.com/open-power/hcode" ,
18 DIR => "openpower/package/hcode" },
Samuel Mendoza-Jonasa6262a02017-08-17 14:46:02 +100019 'hostboot' => { REPO => "https://github.com/open-power/hostboot" ,
Stewart Smithf76e7f92017-05-19 10:42:01 +100020 DIR => "openpower/package/hostboot" },
Samuel Mendoza-Jonasa6262a02017-08-17 14:46:02 +100021 'sbe' => { REPO => "https://github.com/open-power/sbe" ,
Stewart Smithf76e7f92017-05-19 10:42:01 +100022 DIR => "openpower/package/sbe"},
Samuel Mendoza-Jonasa6262a02017-08-17 14:46:02 +100023 'skiboot' => { REPO => "https://github.com/open-power/skiboot" ,
Stewart Smithf76e7f92017-05-19 10:42:01 +100024 DIR => "openpower/package/skiboot"},
Samuel Mendoza-Jonasa6262a02017-08-17 14:46:02 +100025 'occ' => { REPO => "https://github.com/open-power/occ" ,
Stewart Smithf76e7f92017-05-19 10:42:01 +100026 DIR => "openpower/package/occ"},
Samuel Mendoza-Jonasa6262a02017-08-17 14:46:02 +100027 'pnor' => { REPO => "https://github.com/open-power/pnor" ,
Stewart Smithf76e7f92017-05-19 10:42:01 +100028 DIR => "openpower/package/openpower-pnor"},
Samuel Mendoza-Jonasa6262a02017-08-17 14:46:02 +100029 'petitboot' => { REPO => "https://github.com/open-power/petitboot" ,
Stewart Smithf76e7f92017-05-19 10:42:01 +100030 DIR => "openpower/package/petitboot"},
Patrick Williams37567b72015-06-08 15:25:40 -050031};
32
Stewart Smithf76e7f92017-05-19 10:42:01 +100033my $begin_release;
34my $end_release;
35my $begin_worktree;
36my $end_worktree;
37my $platform;
38
39GetOptions("begin-release=s" => \$begin_release,
40 "end-release=s" => \$end_release,
41 "begin-worktree=s" => \$begin_worktree,
42 "platform=s" => \$platform,
43 "end-worktree=s" => \$end_worktree)
44 or die("Error in command line arguments");
45
46die "Required argument missing" unless ($begin_release and $end_release and $begin_worktree and $end_worktree);
47
48open(OUTPUT, "> RELEASE.md") || die "Failed to open RELEASE.md";
49
Samuel Mendoza-Jonasf0175272018-10-10 11:00:08 +110050print OUTPUT "# Release Notes for OpenPower Firmware $end_release \n";
Stewart Smithf76e7f92017-05-19 10:42:01 +100051
52if (-e $begin_worktree) {
53 system("cd $begin_worktree && git checkout $begin_release && git submodule update --reference ../buildroot && git submodule update") and die "Could not update $begin_worktree";
54} else {
55 system("git worktree add $begin_worktree $begin_release && cd $begin_worktree&& git submodule update --reference ../buildroot && git submodule update && rm -rf dl && ln -s ../dl dl") and die "Couldn't init $begin_worktree";
56}
57
58if (-e $end_worktree) {
59 system("cd $end_worktree && git checkout $end_release && git submodule update --reference ../buildroot && git submodule update") and die "Could not update $end_worktree";
60} else {
61 system("git worktree add $end_worktree $end_release && cd $end_worktree && git submodule update --reference ../buildroot && git submodule update && rm -rf dl && ln -s ../dl dl") and die "Couldn't init $end_worktree";
62}
63
64opendir (my $dh, "$begin_worktree/openpower/configs")
65 or die "can't scan $begin_worktree defconfigs";
66my @begin_platforms = grep { /.*_defconfig/ } readdir($dh);
67closedir $dh;
68
69opendir (my $dh, "$end_worktree/openpower/configs")
70 or die "can't scan $end_worktree defconfigs";
71my @end_platforms = grep { /.*_defconfig/ } readdir($dh);
72closedir $dh;
73
74s/_defconfig// foreach (@begin_platforms);
75s/_defconfig// foreach (@end_platforms);
76
Stewart Smith24f82552017-07-14 15:53:22 +100077my $witherspoon_insanity;
78
Samuel Mendoza-Jonas93c5a542017-09-21 13:55:00 +100079# If both witherspoon and witherspoon-sequoia exist we've switched back
80# to a single witherspoon platform and the -sequoia platform is just to
81# keep Jenkins happy - ignore it.
82if ("witherspoon" ~~ @begin_platforms
83 && "witherspoon-sequoia" ~~ @begin_platforms) {
84 my $index = 0;
85 $index++ until @begin_platforms[$index] eq "witherspoon-sequoia";
86 splice(@begin_platforms, $index, 1);
87}
88
89if ("witherspoon" ~~ @end_platforms
90 && "witherspoon-sequoia" ~~ @end_platforms) {
91 my $index = 0;
92 $index++ until @end_platforms[$index] eq "witherspoon-sequoia";
93 splice(@end_platforms, $index, 1);
94}
95
Stewart Smith88c7e352017-07-14 15:12:36 +100096if (($platform && $platform eq 'witherspoon')
97 && -f "$end_worktree/openpower/configs/witherspoon-sequoia_defconfig") {
98 @begin_platforms = ('witherspoon');
99 @end_platforms = ('witherspoon-sequoia', 'witherspoon-redbud');
Stewart Smith24f82552017-07-14 15:53:22 +1000100 $witherspoon_insanity = 1;
Stewart Smith88c7e352017-07-14 15:12:36 +1000101} elsif ($platform) {
Stewart Smithf76e7f92017-05-19 10:42:01 +1000102 @begin_platforms = ($platform);
103 @end_platforms = ($platform);
104}
105
106$dbh->do("CREATE TABLE platforms (platform TEXT, version TEXT);") or die "$!";
107{
108 my $q = "INSERT INTO platforms (platform,version) VALUES (?,?)";
109 my $sth = $dbh->prepare($q) or die "$!";
110 $sth->execute($_, $begin_release) foreach (@begin_platforms);
111 $sth->execute($_, $end_release) foreach (@end_platforms);
112}
113
114{
Stewart Smith88c7e352017-07-14 15:12:36 +1000115 my $q = "SELECT platform as p FROM platforms WHERE version is ? AND platform NOT IN (SELECT platform FROM platforms WHERE version is ? and platform=p)";
Stewart Smithf76e7f92017-05-19 10:42:01 +1000116 my $sth = $dbh->prepare($q) or die $!;
117 $sth->execute($begin_release, $end_release);
118 my $r;
Stewart Smith59d3cb42018-02-12 11:52:12 +1100119 print OUTPUT "\n## Removed platforms\n\n- ".$r->{p}."\n" if $r = $sth->fetchrow_hashref;
Samuel Mendoza-Jonasf0175272018-10-10 11:00:08 +1100120 print OUTPUT "- ".$r->{p}." \n" while ($r = $sth->fetchrow_hashref);
Stewart Smithf76e7f92017-05-19 10:42:01 +1000121
122 $sth->execute($end_release, $begin_release);
Stewart Smith59d3cb42018-02-12 11:52:12 +1100123 print OUTPUT "\n## New platforms\n\n- ".$r->{p}."\n" if $r = $sth->fetchrow_hashref;
Samuel Mendoza-Jonasf0175272018-10-10 11:00:08 +1100124 print OUTPUT "- ".$r->{p}." \n" while($r = $sth->fetchrow_hashref);
Stewart Smithf76e7f92017-05-19 10:42:01 +1000125}
126
127my @common_platforms;
128{
Stewart Smith88c7e352017-07-14 15:12:36 +1000129 my $q = "SELECT platform as p FROM platforms WHERE version is ? AND EXISTS (select platform from platforms where version is ? and platform=p)";
Stewart Smithf76e7f92017-05-19 10:42:01 +1000130 my $sth = $dbh->prepare($q) or die $!;
131 $sth->execute($begin_release, $end_release);
132 my $r;
Stewart Smith88c7e352017-07-14 15:12:36 +1000133 push @common_platforms, $r->{p} while ($r = $sth->fetchrow_hashref);
Stewart Smithf76e7f92017-05-19 10:42:01 +1000134}
135
Stewart Smith88c7e352017-07-14 15:12:36 +1000136use Data::Dumper;
137
138print "# COMMON PLATFORMS\n";
139print Dumper(\@common_platforms);
140
Stewart Smithf76e7f92017-05-19 10:42:01 +1000141foreach my $p (@common_platforms) {
142 next if $p =~ /firenze/;
143 next if $p =~ /^zz$/;
144 next if $p =~ /mambo/;
Stewart Smith23432642019-04-05 16:40:43 +1100145 next if $p =~ /opal/;
Samuel Mendoza-Jonas84f3d252017-07-12 13:26:55 +1000146 next if $p =~ /redbud/;
Samuel Mendoza-Jonas264a6cd2017-08-04 11:42:41 +1000147 next if $p =~ /pseries/;
148 next if $p =~ /witherspoon-redbud/;
149 if ($p =~ /witherspoon-sequoia/) {
150 $p = "witherspoon";
151 $witherspoon_insanity = 1;
152 }
Samuel Mendoza-Jonas3ae961a2018-10-10 11:00:12 +1100153 next if ($p =~ /witherspoon_dev/);
Samuel Mendoza-Jonasa6262a02017-08-17 14:46:02 +1000154 $repos->{"$p-xml"} = { REPO => "https://github.com/open-power/$p-xml" ,
Stewart Smithf76e7f92017-05-19 10:42:01 +1000155 DIR => "openpower/package/$p-xml" };
156}
157
158foreach my $p (@begin_platforms) {
159 system("bash -c '(cd $begin_worktree && . op-build-env && op-build ".$p."_defconfig && op-build legal-info)'");
Stewart Smith88c7e352017-07-14 15:12:36 +1000160 # Work-around bug in op-build v1.17, fixed 2 commits later
161 system('sed -e \'s/,""\([^",]\)/,"\1/; s/\([^,]\)"",/\1",/; s/machine-xml-"\(.*\)".tar/machine-xml-\1.tar/\' -i '. $begin_worktree .'/output/legal-info/manifest.csv');
Stewart Smithf76e7f92017-05-19 10:42:01 +1000162 # Forgive me for this....
Stewart Smithcd96a992017-07-14 15:40:19 +1000163 system("sqlite3 release-notes.sqlite \".mode csv\" \".import $begin_worktree/output/legal-info/manifest.csv i\"");
164 $dbh->do("ALTER TABLE i RENAME to 'begin_".$p."_manifest'") or die $!;
Stewart Smithf76e7f92017-05-19 10:42:01 +1000165}
166
167foreach my $p (@end_platforms) {
Stewart Smith88c7e352017-07-14 15:12:36 +1000168 print "# END PLATFORMS LEGAL-INFO $p\n";
Stewart Smithf76e7f92017-05-19 10:42:01 +1000169 system("bash -c '(cd $end_worktree && . op-build-env && op-build ".$p."_defconfig && op-build legal-info)'");
170 # Forgive me for this....
Stewart Smithcd96a992017-07-14 15:40:19 +1000171 print "# loading manifest\n";
172 system("sqlite3 release-notes.sqlite \".mode csv\" \".import $end_worktree/output/legal-info/manifest.csv i\"");
173 $dbh->do("ALTER TABLE i RENAME to 'end_".$p."_manifest'") or die $!;
Stewart Smithf76e7f92017-05-19 10:42:01 +1000174}
175
Stewart Smith24f82552017-07-14 15:53:22 +1000176if ($witherspoon_insanity) {
177 $dbh->do("ALTER TABLE 'end_witherspoon-sequoia_manifest' RENAME to end_witherspoon_manifest");
Samuel Mendoza-Jonas264a6cd2017-08-04 11:42:41 +1000178 $dbh->do("ALTER TABLE 'begin_witherspoon-sequoia_manifest' RENAME to begin_witherspoon_manifest");
Stewart Smith24f82552017-07-14 15:53:22 +1000179 @end_platforms = grep { $_ != 'witherspoon-sequoia' } @end_platforms;
Samuel Mendoza-Jonas264a6cd2017-08-04 11:42:41 +1000180 @begin_platforms = grep { $_ != 'witherspoon-sequoia' } @begin_platforms;
Stewart Smith24f82552017-07-14 15:53:22 +1000181 push @end_platforms, 'witherspoon';
Samuel Mendoza-Jonas264a6cd2017-08-04 11:42:41 +1000182 push @begin_platforms, 'witherspoon';
Stewart Smith24f82552017-07-14 15:53:22 +1000183 push @common_platforms, 'witherspoon';
184}
185
Stewart Smithf76e7f92017-05-19 10:42:01 +1000186$dbh->do(<<'SQL') or die "$!";
187CREATE TABLE package_upgrades (
188 PACKAGE TEXT,
189 OLDVERSION TEXT,
190 NEWVERSION TEXT,
191 PLATFORM TEXT
192)
193SQL
194
195foreach my $p (@common_platforms) {
Stewart Smith88c7e352017-07-14 15:12:36 +1000196 $dbh->do("INSERT INTO package_upgrades select b.package,b.version,e.version,'$p' from 'begin_".$p."_manifest' as b LEFT JOIN 'end_".$p."_manifest' AS e ON b.package=e.package WHERE b.version != e.version") or die $!;
Stewart Smithf76e7f92017-05-19 10:42:01 +1000197}
198
199$dbh->do(<<'SQL') or die "$!";
200CREATE TABLE new_package (
201 PACKAGE TEXT,
202 VERSION TEXT,
203 PLATFORM TEXT
204)
205SQL
206
207foreach my $p (@common_platforms) {
Stewart Smith88c7e352017-07-14 15:12:36 +1000208 $dbh->do("INSERT INTO new_package select b.package,b.version,'$p' from 'end_".$p."_manifest' as b WHERE NOT EXISTS(SELECT package FROM 'begin_".$p."_manifest' AS e WHERE b.package=e.package)") or die $!;
Stewart Smithf76e7f92017-05-19 10:42:01 +1000209}
210
211$dbh->do(<<'SQL') or die "$!";
212CREATE TABLE removed_package (
213 PACKAGE TEXT,
214 VERSION TEXT,
215 PLATFORM TEXT
216)
217SQL
218
219foreach my $p (@common_platforms) {
Stewart Smith88c7e352017-07-14 15:12:36 +1000220 $dbh->do("INSERT INTO removed_package select b.package,b.version,'$p' from 'begin_".$p."_manifest' as b WHERE NOT EXISTS(SELECT package FROM 'end_".$p."_manifest' AS e WHERE b.package=e.package)") or die $!;
Stewart Smithf76e7f92017-05-19 10:42:01 +1000221}
222
223my $old_level = {};
224my $new_level = {};
225
226{
227 my $q = <<'SQL';
228select package as pk ,oldversion as o ,newversion as n,
Stewart Smith59d3cb42018-02-12 11:52:12 +1100229 GROUP_CONCAT(platform,', ') as ps
Stewart Smithf76e7f92017-05-19 10:42:01 +1000230FROM package_upgrades
231 GROUP BY package,oldversion,newversion
232ORDER BY package,platform
233SQL
234 my $sth = $dbh->prepare($q) or die $!;
235 $sth->execute();
236
Stewart Smith59d3cb42018-02-12 11:52:12 +1100237 print OUTPUT "\n## Updated Packages\n\n";
Samuel Mendoza-Jonasf0175272018-10-10 11:00:08 +1100238 print OUTPUT "Package | Old Version | New Version | Platforms \n";
Stewart Smith59d3cb42018-02-12 11:52:12 +1100239 my $t;
240 my ($plen,$olen,$nlen,$platlen) = (3,3,3,3);
Stewart Smithf76e7f92017-05-19 10:42:01 +1000241 while (my $r = $sth->fetchrow_hashref) {
Samuel Mendoza-Jonasf0175272018-10-10 11:00:08 +1100242 $t.= join(' | ',($r->{pk}, $r->{o}, $r->{n}, $r->{ps}))." \n" ;
Stewart Smith59d3cb42018-02-12 11:52:12 +1100243 $plen = length($r->{pk}) if $plen < length($r->{pk});
244 $olen = length($r->{o}) if $olen < length($r->{o});
245 $nlen = length($r->{n}) if $nlen < length($r->{n});
246 $platlen = length($r->{ps}) if $platlen < length($r->{ps});
247
Stewart Smithf76e7f92017-05-19 10:42:01 +1000248 if ($r->{pk} eq 'machine-xml') {
249 $old_level->{$r->{ps}."-xml"} = $r->{o};
250 $new_level->{$r->{ps}."-xml"} = $r->{n};
251 } else {
252 $old_level->{$r->{pk}} = $r->{o};
253 $new_level->{$r->{pk}} = $r->{n};
254 }
255 }
Stewart Smith59d3cb42018-02-12 11:52:12 +1100256 print OUTPUT "-"x$plen." | "."-"x$olen." | "."-"x$nlen." | ".
Samuel Mendoza-Jonasf0175272018-10-10 11:00:08 +1100257 "-"x$platlen." \n";
Stewart Smith59d3cb42018-02-12 11:52:12 +1100258 print OUTPUT $t;
Stewart Smithf76e7f92017-05-19 10:42:01 +1000259}
260
261{
262 my $q = <<'SQL';
263select package as pk ,version as v,
264 GROUP_CONCAT(platform) as ps
265FROM new_package
266 GROUP BY package,version
267ORDER BY package,platform
268SQL
269 my $sth = $dbh->prepare($q) or die $!;
270 $sth->execute();
271
272 print OUTPUT "\n\n## New Packages\n\n";
Samuel Mendoza-Jonasf0175272018-10-10 11:00:08 +1100273 print OUTPUT "Package | Version | Platforms \n";
274 print OUTPUT "--- | --- | --- \n";
Stewart Smithf76e7f92017-05-19 10:42:01 +1000275 while (my $r = $sth->fetchrow_hashref) {
Samuel Mendoza-Jonasf0175272018-10-10 11:00:08 +1100276 print OUTPUT join(' | ',($r->{pk}, $r->{v}, $r->{ps}))." \n" ;
Stewart Smithf76e7f92017-05-19 10:42:01 +1000277 if ($r->{pk} eq 'machine-xml') {
278 $new_level->{$r->{ps}."-xml"} = $r->{v};
279 }
280 }
281}
282
283{
284 my $q = <<'SQL';
285select package as pk ,version as v,
286 GROUP_CONCAT(platform) as ps
287FROM removed_package
288 GROUP BY package,version
289ORDER BY package,platform
290SQL
291 my $sth = $dbh->prepare($q) or die $!;
292 $sth->execute();
293
294 print OUTPUT "\n\n## Removed Packages\n\n";
Samuel Mendoza-Jonasf0175272018-10-10 11:00:08 +1100295 print OUTPUT "Package | Version | Platforms \n";
296 print OUTPUT "--- | --- | --- \n";
Stewart Smithf76e7f92017-05-19 10:42:01 +1000297 while (my $r = $sth->fetchrow_hashref) {
Samuel Mendoza-Jonasf0175272018-10-10 11:00:08 +1100298 print OUTPUT join(' | ',($r->{pk}, $r->{v}, $r->{ps}))." \n" ;
Stewart Smithf76e7f92017-05-19 10:42:01 +1000299 if ($r->{pk} eq $r->{ps}."-xml") {
300 $old_level->{$r->{ps}."-xml"} = $r->{v};
301 }
302 }
303 print OUTPUT "\n\n";
304}
Patrick Williams37567b72015-06-08 15:25:40 -0500305
306foreach my $repo (keys %{$repos})
307{
308 if (-e $repo)
309 {
310 system("cd $repo; git fetch") && die "Could not fetch $repo";
311 }
312 else
313 {
314 system("git clone $repos->{$repo}->{REPO} $repo") &&
315 die "Could not clone $repo";
316 }
317}
318
319system("cd op-build; git checkout $end_release --force; git reset HEAD --hard");
320
321
Patrick Williams37567b72015-06-08 15:25:40 -0500322my $op_url = $repos->{'op-build'}->{REPO};
323
324foreach my $repo (sort keys %{$repos})
325{
Stewart Smithf76e7f92017-05-19 10:42:01 +1000326 my $package = $repo;
Patrick Williams37567b72015-06-08 15:25:40 -0500327 my $url = $repos->{$repo}->{REPO};
328 my $dir = $repos->{$repo}->{DIR};
329
Samuel Mendoza-Jonasf0175272018-10-10 11:00:08 +1100330 print OUTPUT "\n## Package: $repo \n";
331 print OUTPUT "[Repository]($url) \n";
Patrick Williams37567b72015-06-08 15:25:40 -0500332 print OUTPUT "\n";
333
Patrick Williams37567b72015-06-08 15:25:40 -0500334 # Display patches.
335 if (open(LSLOG, "ls op-build/$dir/*.patch | ".
336 "xargs -n1 --no-run-if-empty basename |"))
337 {
Samuel Mendoza-Jonasf0175272018-10-10 11:00:08 +1100338 print OUTPUT "### Patches \n";
Patrick Williams37567b72015-06-08 15:25:40 -0500339 while (my $logline = <LSLOG>)
340 {
341 chomp $logline;
342 print OUTPUT "* [$logline]".
Samuel Mendoza-Jonasf0175272018-10-10 11:00:08 +1100343 "($op_url/tree/$end_release/$dir/$logline) \n";
Patrick Williams37567b72015-06-08 15:25:40 -0500344 }
345 close LSLOG;
346 print OUTPUT "\n";
347 }
348 else
349 {
Samuel Mendoza-Jonasf0175272018-10-10 11:00:08 +1100350 print OUTPUT "None. \n";
Patrick Williams37567b72015-06-08 15:25:40 -0500351 }
352
353 # Display changes.
Samuel Mendoza-Jonasf0175272018-10-10 11:00:08 +1100354 print OUTPUT "### Commits \n";
Patrick Williams37567b72015-06-08 15:25:40 -0500355 if ((not exists $old_level->{$package}) &&
356 (not exists $new_level->{$package}))
357 {
358 # No change identified.
Samuel Mendoza-Jonasf0175272018-10-10 11:00:08 +1100359 print "No changes: $repo \n";
Stewart Smith59d3cb42018-02-12 11:52:12 +1100360 print OUTPUT "No changes.\n\n";
Patrick Williams37567b72015-06-08 15:25:40 -0500361 next;
362 }
363
364 if ((exists $old_level->{$package}) &&
365 (exists $new_level->{$package}))
366 {
Samuel Mendoza-Jonasf0175272018-10-10 11:00:08 +1100367 print "Changes in $repo... \n";
Patrick Williams37567b72015-06-08 15:25:40 -0500368 open(GITLOG, "cd $repo; git shortlog $old_level->{$package}...".
369 "$new_level->{$package} --no-merges --format=".
Stewart Smith59d3cb42018-02-12 11:52:12 +1100370 "\"- [%h]($url/commit/%h) %s\" |");
Patrick Williams37567b72015-06-08 15:25:40 -0500371
372 while (my $logline = <GITLOG>)
373 {
374 chomp $logline;
375 $logline =~ s/^[[:space:]]*//;
Stewart Smith59d3cb42018-02-12 11:52:12 +1100376 $logline =~ s/:$/:\n/;
Samuel Mendoza-Jonasf0175272018-10-10 11:00:08 +1100377 print OUTPUT "$logline \n";
Patrick Williams37567b72015-06-08 15:25:40 -0500378 }
379 close GITLOG;
Samuel Mendoza-Jonasf0175272018-10-10 11:00:08 +1100380 print OUTPUT " \n";
Patrick Williams37567b72015-06-08 15:25:40 -0500381 next;
382 }
383
384 if (not exists $old_level->{$package})
385 {
386 print "New package $repo.\n";
Samuel Mendoza-Jonasf0175272018-10-10 11:00:08 +1100387 print OUTPUT "New package. \n";
Patrick Williams37567b72015-06-08 15:25:40 -0500388 next;
389 }
390
391 if (not exists $new_level->{$package})
392 {
393 print "Deleted package $repo.\n";
Samuel Mendoza-Jonasf0175272018-10-10 11:00:08 +1100394 print OUTPUT "Package removed. \n";
Patrick Williams37567b72015-06-08 15:25:40 -0500395 next;
396 }
397}