char *dest;
char *path;
char *hash, *ohash;
+ char *mds, *omds;
char *target;
+ char *pkglist; /* space separated */
time_t mtime;
mode_t mode;
int ftype;
}
n->ftype = *val;
- n->ohash = COL("hash");
+ /* these can be null */
+ n->ohash = COL("ohash");
+ n->mds = COL("mds");
+ n->omds = COL("omds");
+ n->pkglist = COL("pkglist");
if (n->ftype == 'r') {
n->hash = COL("hash");
/* fhash != ohash, install as dest.zpmnew, warn */
/* TODO handle replacing config file
* with config directory */
+ /* We don't have the information as to which
+ * package this is a config file for, so
+ * we'll need to look it up.
+ */
if (diffs & D_OHASH) {
if (strlen(nitem.dest) > sizeof dest - 8) {
return seterror(conf,"config file path too long for install as %s.zpmnew", nitem.dest);
/* file exists in filesystem */
if (sametype) {
if (mdsame && hashsame) {
- fprintf(stderr, "%s should not be an update", nitem.dest);
- /* warn, bug in logic. This shouldn't
- * occur, because if there is nothing
- * to do, it shouldn't be listed
- * as an update
+ /* warn, bug in logic. This shouldn't occur,
+ * because if there is nothing to do, it
+ * shouldn't be listed as an update
+ */
+ /* could be an update. We're checking against
+ * what's actually on disk, not what was
+ * expected to have been on disk. So, if
+ * the admin has modified the file, or if
+ * it had been installed ignoring the user
+ * and group, it might be correct on disk
+ * but not as in the local database
+ */
+ /* TODO detect whether this a logic bug or
+ * an on-disk difference
*/
+#if 0
+ fprintf(stderr, "%s should not be an update\n", nitem.dest);
+ fprintf(stderr, "old hash: %s\n", nitem.ohash);
+ fprintf(stderr, "new hash: %s\n", nitem.hash);
+ fprintf(stderr, "old mds: %s\n", nitem.omds);
+ fprintf(stderr, "new mds: %s\n", nitem.mds);
+#endif
/* do nothing */
return 0;
}