Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix linux packages on pointyhat
Baptiste Daroussin committed 14 years ago
commit 64dec6286141146cef8df8ec8d6c4545f319ed89
parent c1c9a78
1 file changed +14 -4
modified libpkg/pkg_add.c
@@ -43,10 +43,20 @@ do_extract(struct archive *a, struct archive_entry *ae)

	do {
		if (archive_read_extract(a, ae, EXTRACT_ARCHIVE_FLAGS) != ARCHIVE_OK) {
-
			pkg_emit_error("archive_read_extract(): %s",
-
						   archive_error_string(a));
-
			retcode = EPKG_FATAL;
-
			break;
+
			/*
+
			 * show error except when the failure is during
+
			 * extracting a directory and that the directory already
+
			 * exists.
+
			 * this allow to install packages linux_base from
+
			 * package for example
+
			 */
+
			if (!(archive_entry_filetype(ae) == AE_IFDIR &&
+
			    is_dir(archive_entry_path(ae)))) {
+
				pkg_emit_error("archive_read_extract(): %s",
+
				    archive_error_string(a));
+
				retcode = EPKG_FATAL;
+
				break;
+
			}
		}

		/*