From bb2f68c51011365af953e407b845adb72c6c267e Mon Sep 17 00:00:00 2001 From: jbj Date: Sat, 7 Nov 1998 22:48:12 +0000 Subject: [PATCH] don't compute md5sum on non-file %config objects. (from Jos Vos) CVS patchset: 2529 CVS date: 1998/11/07 22:48:12 --- CHANGES | 1 + lib/uninstall.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 8871d76..e52b3bc 100644 --- a/CHANGES +++ b/CHANGES @@ -30,6 +30,7 @@ - there must be a { between two % in a query format (unless %% is used) 2.5.5 -> 2.5.6: + - don't compute md5sum on non-file %config objects. (from Jos Vos) - check arch only on RPMBUILD_{PREP,BUILD,INSTALL,PACKAGEBINARY}. - configure.in: set default value for RPM. (Tim Mooney) - add new Epoch: keyword just like Serial:. diff --git a/lib/uninstall.c b/lib/uninstall.c index 9fe7ef8..9a65031 100644 --- a/lib/uninstall.c +++ b/lib/uninstall.c @@ -551,9 +551,11 @@ static int removeFile(char * file, char state, unsigned int flags, char * md5, break; case RPMFILE_STATE_NORMAL: - if ((action == REMOVE) && (flags & RPMFILE_CONFIG)) { + if(S_ISREG(mode) && + (action == REMOVE) && (flags & RPMFILE_CONFIG)) { /* if it's a config file, we may not want to remove it */ rpmMessage(RPMMESS_DEBUG, _("finding md5sum of %s\n"), file); + if (brokenMd5) rc = mdfileBroken(file, currentMd5); else -- 2.7.4