Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Comment code that cause more problem than it solves because too much plist are buggy, while we are not using stage install for packages, some ports will install by mistake from directories they shouldn't, so detecting if a directory is used by another package could lead to some directories not removed while pointyhat is expecting it to be removed.
Baptiste Daroussin committed 14 years ago
commit 964b2d5e8071c8bafe91cdaeeaed8a3d3c5bce77
parent 0e17dda
1 file changed +8 -4
modified libpkg/pkg_delete.c
@@ -127,19 +127,23 @@ int
pkg_delete_dirs(struct pkgdb *db, struct pkg *pkg, int force)
{
	struct pkg_dir *dir = NULL;
-
	int64_t nbpackage;
+
/*	int64_t nbpackage; */

	while (pkg_dirs(pkg, &dir) == EPKG_OK) {
		if (dir->keep == 1)
			continue;

-
		nbpackage = 0;
+
		/* 
+
		 * To reactivate when stage install will be in otherwise
+
		 * This code left cruft on server because sometime package 
+
		 */
+
/*		nbpackage = 0;

-
		if (pkgdb_is_dir_used(db, pkg_dir_path(dir), &nbpackage) != EPKG_OK)
+
		if (pkgdb_is_dir_used(db, pkg_dir_path(dir), &nbpackage) != EPKG_OK) 
			return (EPKG_FATAL);

		if (nbpackage > 1)
-
			continue;
+
			continue; */

		if (pkg_dir_try(dir)) {
			if (rmdir(pkg_dir_path(dir)) == -1 && errno != ENOTEMPTY && force != 1)