OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-tools Date: 22-Oct-2006 12:07:15
Branch: HEAD Handle: 2006102211071500
Modified files:
openpkg-tools/cmd lint-rpm.pl
Log:
cleanup within the looping or the temp dir would fill horribly when
linting multiple RPMs at once
Summary:
Revision Changes Path
1.7 +9 -0 openpkg-tools/cmd/lint-rpm.pl
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-tools/cmd/lint-rpm.pl
============================================================================
$ cvs diff -u -r1.6 -r1.7 lint-rpm.pl
--- openpkg-tools/cmd/lint-rpm.pl 22 Oct 2006 08:18:46 -0000 1.6
+++ openpkg-tools/cmd/lint-rpm.pl 22 Oct 2006 10:07:15 -0000 1.7
@@ -132,6 +132,7 @@
foreach my $check (@checks) {
eval "\&check_$check(\$filename, \$info);";
}
+ &rpm_info_cleanup($filename, [EMAIL PROTECTED], $info);
}
# environment cleanup
@@ -232,6 +233,14 @@
return $info;
}
+sub rpm_info_cleanup {
+ my ($filename, $checks, $info) = @_;
+
+ if (grep(/^content$/, @{$checks})) {
+ system("rm -rf ".$info->{root}) if ($info->{root} =~ m/^\/.+/ and -d
$info->{root});
+ }
+}
+
## _________________________________________________________________
##
## CHECK "layout": file path layout
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]