newWhat = rpmfiWhatis(rpmfiFModeIndex(nfi, nix));
/*
- * RPM >= 2.3.10 shouldn't create config directories -- we'll ignore
- * them in older packages as well.
- */
- if (newWhat == XDIR)
- return FA_CREATE;
-
- if (diskWhat != newWhat && dbWhat != REG && dbWhat != LINK)
- return save;
- else if (newWhat != dbWhat && diskWhat != dbWhat)
- return save;
- else if (dbWhat != newWhat)
- return FA_CREATE;
- else if (dbWhat != LINK && dbWhat != REG)
- return FA_CREATE;
-
- /*
* This order matters - we'd prefer to CREATE the file if at all
* possible in case something else (like the timestamp) has changed.
*/
return FA_SKIP; /* identical file, don't bother. */
/* ...but otherwise a backup will be needed */
+ } else {
+ /* Other file types cannot be %config, go ahead and create it */
+ return FA_CREATE;
}
/*
AT_CLEANUP
# Modified config changes to config symlink
-# Broken, no backup taken
AT_SETUP([upgrade modified config to config link])
AT_KEYWORDS([install])
-AT_XFAIL_IF([test $RPM_XFAIL -gt 0])
AT_CHECK([
RPMDB_CLEAR
RPMDB_INIT
AT_CLEANUP
# Modified config link changes to config file
-# Broken, no backup taken
AT_SETUP([upgrade modified config link to config])
-AT_XFAIL_IF([test $RPM_XFAIL -gt 0])
AT_KEYWORDS([install])
AT_CHECK([
RPMDB_CLEAR
AT_CLEANUP
# Modified config changes to directory
-# Broken, no backup taken
AT_SETUP([upgrade modified config to directory])
AT_KEYWORDS([install])
-AT_XFAIL_IF([test $RPM_XFAIL -gt 0])
AT_CHECK([
RPMDB_CLEAR
RPMDB_INIT