static char * SCRIPT_PATH = "PATH=/sbin:/bin:/usr/sbin:/usr/bin:"
"/usr/X11R6/bin";
-typedef enum fileActions { REMOVE, BACKUP, KEEP } fileActions_t;
+typedef enum fileActions { U_REMOVE, U_BACKUP, U_KEEP } fileActions_t;
static int sharedFileCmp(const void * one, const void * two);
static int handleSharedFiles(rpmdb db, int offset, char ** fileList,
case RPMFILE_STATE_NETSHARED:
rpmMessage(RPMMESS_DEBUG, _(" file is netshared (so don't touch it)\n"));
- fileActions[sharedList[i].mainFileNumber] = KEEP;
+ fileActions[sharedList[i].mainFileNumber] = U_KEEP;
break;
case RPMFILE_STATE_NORMAL:
secFileMd5List[sharedList[i].secFileNumber])) {
rpmMessage(RPMMESS_DEBUG, _(" file is truely shared - saving\n"));
}
- fileActions[sharedList[i].mainFileNumber] = KEEP;
+ fileActions[sharedList[i].mainFileNumber] = U_KEEP;
break;
}
}
for (i = 0; i < fileCount; i++)
if (fileStatesList[i] == RPMFILE_STATE_NOTINSTALLED ||
fileStatesList[i] == RPMFILE_STATE_NETSHARED)
- fileActions[i] = KEEP;
+ fileActions[i] = U_KEEP;
else
- fileActions[i] = REMOVE;
+ fileActions[i] = U_REMOVE;
if (rpmGetVar(RPMVAR_NETSHAREDPATH)) {
char ** netsharedPaths, ** nsp;
(fileList[i][j] == '\0' || fileList[i][j] == '/')) {
rpmMessage(RPMMESS_DEBUG, _("%s has a netshared override\n"),
fileList[i]);
- fileActions[i] = KEEP;
+ fileActions[i] = U_KEEP;
}
}
case RPMFILE_STATE_NORMAL:
if(S_ISREG(mode) &&
- (action == REMOVE) && (flags & RPMFILE_CONFIG)) {
+ (action == U_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);
else {
if (strcmp(currentMd5, md5)) {
rpmMessage(RPMMESS_DEBUG, _(" file changed - will save\n"));
- action = BACKUP;
+ action = U_BACKUP;
} else {
rpmMessage(RPMMESS_DEBUG,
_(" file unchanged - will remove\n"));
switch (action) {
- case KEEP:
+ case U_KEEP:
rpmMessage(RPMMESS_DEBUG, _("keeping %s\n"), file);
break;
- case BACKUP:
+ case U_BACKUP:
rpmMessage(RPMMESS_DEBUG, _("saving %s as %s.rpmsave\n"), file, file);
if (!test) {
newfile = alloca(strlen(file) + 20);
}
break;
- case REMOVE:
+ case U_REMOVE:
rpmMessage(RPMMESS_DEBUG, _("%s - removing\n"), file);
if (S_ISDIR(mode)) {
if (!test) {