Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
some fixes + remove of crufts
Baptiste Daroussin committed 14 years ago
commit b97af5c6c52778463573bdde4f81ddf0cedb581a
parent 24d9449
3 files changed +9 -21
modified libpkg/pkg_add.c
@@ -92,7 +92,6 @@ pkg_add(struct pkgdb *db, const char *path, int flags)
	char dpath[MAXPATHLEN + 1];
	const char *basedir;
	const char *ext;
-
	const char *handle_rc = NULL;
	int retcode = EPKG_OK;
	int ret;

modified libpkg/pkg_config.c
@@ -24,8 +24,6 @@ static struct _config {
};

struct _pkg_config {
-
	int parser_init;
-
	int doc_init;
	yaml_parser_t parser;
	yaml_document_t doc;
	struct _config *c;
@@ -126,7 +124,6 @@ pkg_init(const char *path)
		if (node->type != YAML_MAPPING_NODE) {
			pkg_emit_error("Invalid configuration format, ignoring the configuration file");
		} else {
-
			conf->doc_init = 1;
			parse_configuration(node);
		}
	} else {
modified libpkg/pkgdb.c
@@ -1197,6 +1197,8 @@ pkgdb_register_pkg(struct pkgdb *db, struct pkg *pkg, int complete)
	int retcode = EPKG_FATAL;
	int64_t package_id;

+
	const char *handle_rc = NULL;
+

	const char sql_begin[] = "BEGIN;";
	const char sql_mtree[] = "INSERT OR IGNORE INTO mtree(content) VALUES(?1);";
	const char sql_dirs[] = "INSERT OR IGNORE INTO directories(path) VALUES(?1);";
@@ -1627,15 +1629,13 @@ pkgdb_register_pkg(struct pkgdb *db, struct pkg *pkg, int complete)
	if (stmt_users != NULL)
		sqlite3_finalize(stmt_users);

-
	if (!complete) {
-
		/*
-
		 * start the different related services if the users do want that
-
		 * and that the service is running
-
		 */
-
		handle_rc = pkg_config("HANDLE_RC_SCRIPTS");
-
		if (handle_rc && ((strcmp(handle_rc, "yes") == 0) || (strcmp(handle_rc, "YES") == 0)))
-
			pkg_start_rc_scripts(pkg);
-
	}
+
	/*
+
	 * start the different related services if the users do want that
+
	 * and that the service is running
+
	 */
+
	handle_rc = pkg_config("HANDLE_RC_SCRIPTS");
+
	if (handle_rc && ((strcmp(handle_rc, "yes") == 0) || (strcmp(handle_rc, "YES") == 0)))
+
		pkg_start_rc_scripts(pkg);

	return (retcode);
}
@@ -1659,14 +1659,6 @@ pkgdb_register_finale(struct pkgdb *db, int retcode)

	PKGDB_UNSET_FLAG(db, PKGDB_FLAG_IN_FLIGHT);

-
	/*
-
	 * start the different related services if the users do want that
-
	 * and that the service is running
-
	 */
-
	handle_rc = pkg_config("HANDLE_RC_SCRIPTS");
-
	if (handle_rc && ((strcmp(handle_rc, "yes") == 0) || (strcmp(handle_rc, "YES") == 0)))
-
		pkg_start_rc_scripts(pkg);
-

	return (ret);
}