diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2010-12-11 17:12:30 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2010-12-11 17:13:26 +0000 |
commit | 3efcdd7df2b8997e0d4f543703d371e8b7079d5f (patch) | |
tree | cc78b049d58cc0e63bf08dccf8aace1208a24589 | |
parent | 27a911ca193ad5a56a7afac4f6100b3a3f732680 (diff) | |
download | febootstrap-3efcdd7df2b8997e0d4f543703d371e8b7079d5f.tar.gz febootstrap-3efcdd7df2b8997e0d4f543703d371e8b7079d5f.tar.xz febootstrap-3efcdd7df2b8997e0d4f543703d371e8b7079d5f.zip |
helper: Ignore times of special files when calculating checksum.
Variation in the times of /dev/ptmx was causing the
appliance to be rebuilt too frequently.
-rw-r--r-- | helper/checksum.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/helper/checksum.c b/helper/checksum.c index 337134c..2df42bc 100644 --- a/helper/checksum.c +++ b/helper/checksum.c @@ -65,11 +65,12 @@ checksum_end (void) static void checksum_file_stat (const char *filename, const struct stat *statbuf) { - /* Publically writable directories (ie. /tmp) don't have stable - * times. Since we only care about some attributes of directories - * in any case, we vary the output accordingly. + /* Publically writable directories (ie. /tmp) and special files + * don't have stable times. Since we only care about some + * attributes of directories and special files, we vary the output + * accordingly. */ - if (!S_ISDIR (statbuf->st_mode)) + if (S_ISREG (statbuf->st_mode)) fprintf (pp, "%s %ld %ld %d %d %ld %o\n", filename, (long) statbuf->st_ctime, (long) statbuf->st_mtime, |