skip files suffixed with .dpkg-old, based on a patch from Mathias Gug

<mathiaz@ubuntu.com> [Message-ID: <20070813201254.GD11381@mathias.mathiaz.net>]
Added comments to both file-skipping locations referencing the other
location that needs to be modified.

(The ideal solution would be for this information to be stored in one
commonly referenced location, configurable by distributors and
administratrors.)
This commit is contained in:
Steve Beattie 2007-08-14 19:19:59 +00:00
parent b608f2643b
commit 6123467433
2 changed files with 5 additions and 0 deletions

View file

@ -101,6 +101,8 @@ fi
# keep exit status from parser during profile load. 0 is good, 1 is bad
STATUS=0
# This set of patterns to skip needs to be kept in sync with
# SubDomain.pm::isSkippableFile()
skip_profile() {
local profile=$1
if [ "${profile%.rpmnew}" != "${profile}" -o \

View file

@ -3695,11 +3695,14 @@ sub contains ($$) {
# isSkippableFile - return true if filename matches something that
# should be skipped (rpm backup files, dotfiles, emacs backup files
# Annoyingly, this needs to be kept in sync with the skipped files
# in the apparmor initscript.
sub isSkippableFile($) {
my $path = shift;
return ($path =~ /(^|\/)\.[^\/]*$/
|| $path =~ /\.rpm(save|new)$/
|| $path =~ /\.dpkg-(old|new)$/
|| $path =~ /\~$/);
}