Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
improve the debug line and document why the counter should be > 0
Baptiste Daroussin committed 11 years ago
commit f13e175b4d89d96d5dbfc1f4a0aa9ef010efe81f
parent 02fe188
1 file changed +7 -1
modified libpkg/pkg_delete.c
@@ -166,7 +166,13 @@ rmdir_p(struct pkgdb *db, struct pkg *pkg, char *dir, const char *prefix_r)
	if (pkgdb_is_dir_used(db, fullpath, &cnt) != EPKG_OK)
		return;

-
	pkg_debug(1, "Number of packages owning %d", cnt);
+
	pkg_debug(1, "Number of packages owning the directory "%s": %d",
+
	    fullpath, cnt);
+
	/*
+
	 * At this moment the package we are removing have already been removed
+
	 * from the local database so if anything else is owning the directory
+
	 * that is another package meaning only remove the diretory is cnt == 0
+
	 */
	if (cnt > 0)
		return;