if (file_exists(cf_backup)) {
/* Let's compute md5 to test if files are changed */
-#ifdef HAVE_MD5
if (cf->value && strlen(cf->value) > 33) {
chksum = file_sha256sum_alloc(cf_backup);
} else {
chksum = file_md5sum_alloc(cf_backup);
}
-#else
- chksum = file_sha256sum_alloc(cf_backup);
-#endif
+
if (chksum && cf->value
&& strcmp(cf->value, chksum) != 0) {
if (conf->force_maintainer) {
abstract_pkg_t *ab_pkg = NULL;
int old_state_flag;
char *file_md5, *pkg_md5;
-#ifdef HAVE_SHA256
char *file_sha256, *pkg_sha256;
-#endif
sigset_t newset, oldset;
const char *local_filename;
time_t now;
}
#endif
-#ifdef HAVE_MD5
/* Check for md5 values */
pkg_md5 = pkg_get_md5(pkg);
if (pkg_md5) {
if (file_md5)
free(file_md5);
}
-#endif
-#ifdef HAVE_SHA256
/* Check for sha256 value */
pkg_sha256 = pkg_get_sha256(pkg);
if (pkg_sha256) {
if (file_sha256)
free(file_sha256);
}
-#endif
+
if (conf->download_only) {
if (conf->nodeps == 0) {
err = satisfy_dependencies_for(pkg);