Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Merge branch 'master' of git://github.com/pkgng/pkgng
Vsevolod Stakhov committed 13 years ago
commit cfc6d122d0f7a20a37f7f3d8d051510bc993d6d0
parent 98a3934
4 files changed +11 -14
modified libpkg/packing.c
@@ -149,9 +149,7 @@ packing_append_file_attr(struct packing *pack, const char *filepath,
	int ret;
	struct stat st;
	struct archive_entry *entry, *sparse_entry;
-
	/* ugly hack for python and emacs */
-
	/*char *p;*/
-
	/*bool unset_timestamp = true;*/
+
	bool unset_timestamp;

	entry = archive_entry_new();
	archive_entry_copy_sourcepath(entry, filepath);
@@ -187,23 +185,14 @@ packing_append_file_attr(struct packing *pack, const char *filepath,
	if (perm != 0)
		archive_entry_set_perm(entry, perm);

-
	/* XXX ugly hack for python and emacs */
-
/*	p = strrchr(filepath, '.');
-

-
	if (p != NULL && (strcmp(p, ".pyc") == 0 ||
-
	    strcmp(p, ".py") == 0 ||
-
	    strcmp(p, ".pyo") == 0 ||
-
	    strcmp(p, ".elc") == 0 ||
-
	    strcmp(p, ".el") == 0
-
	    ))
-
		unset_timestamp = false;
+
	pkg_config_bool(PKG_CONFIG_UNSET_TIMESTAMP, &unset_timestamp);

	if (unset_timestamp) {
		archive_entry_unset_atime(entry);
		archive_entry_unset_ctime(entry);
		archive_entry_unset_mtime(entry);
		archive_entry_unset_birthtime(entry);
-
	}*/
+
	}

	archive_entry_linkify(pack->resolver, &entry, &sparse_entry);

modified libpkg/pkg.h.in
@@ -336,6 +336,7 @@ typedef enum _pkg_config_key {
	PKG_CONFIG_NAMESERVER,
	PKG_CONFIG_EVENT_PIPE,
	PKG_CONFIG_FETCH_TIMEOUT,
+
	PKG_CONFIG_UNSET_TIMESTAMP,
} pkg_config_key;

typedef enum {
modified libpkg/pkg_config.c
@@ -230,6 +230,11 @@ static struct config_entry c[] = {
		PKG_CONFIG_INTEGER,
		"FETCH_TIMEOUT",
		"30",
+
	},
+
	[PKG_CONFIG_UNSET_TIMESTAMP] = {
+
		PKG_CONFIG_BOOL,
+
		"UNSET_TIMESTAMP",
+
		"NO",
	}
};

modified pkg/version.c
@@ -412,6 +412,8 @@ exec_version(int argc, char **argv)
				if (pkgdb_it_next(it_remote, &pkg_remote, PKG_LOAD_BASIC) == EPKG_OK) {
					pkg_get(pkg_remote, PKG_VERSION, &version_remote);
					print_version(pkg, "remote", version_remote, limchar, opt);
+
				} else {
+
					print_version(pkg, "remote", NULL, limchar, opt);
				}
				pkgdb_it_free(it_remote);
			}