Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
A bit more of consistency
Baptiste Daroussin committed 14 years ago
commit 2ad6f42b166c709b70e6c994f08d1c8013403685
parent 083cae0
11 files changed +27 -27
modified libpkg/pkg.c
@@ -219,7 +219,7 @@ pkg_flatsize(struct pkg *pkg)
}

int
-
pkg_setautomatic(struct pkg *pkg)
+
pkg_set_automatic(struct pkg *pkg)
{
	assert(pkg != NULL);

@@ -229,7 +229,7 @@ pkg_setautomatic(struct pkg *pkg)
}

int
-
pkg_isautomatic(struct pkg *pkg)
+
pkg_is_automatic(struct pkg *pkg)
{
	assert(pkg != NULL);

@@ -253,7 +253,7 @@ pkg_new_pkgsize(struct pkg *pkg)
}

int
-
pkg_setflatsize(struct pkg *pkg, int64_t size)
+
pkg_set_flatsize(struct pkg *pkg, int64_t size)
{
	assert(pkg != NULL);
	assert(size >= 0);
@@ -263,7 +263,7 @@ pkg_setflatsize(struct pkg *pkg, int64_t size)
}

int
-
pkg_setnewflatsize(struct pkg *pkg, int64_t size)
+
pkg_set_newflatsize(struct pkg *pkg, int64_t size)
{
	assert(pkg != NULL);
	assert(size >= 0);
@@ -274,7 +274,7 @@ pkg_setnewflatsize(struct pkg *pkg, int64_t size)
}

int
-
pkg_setnewpkgsize(struct pkg *pkg, int64_t size)
+
pkg_set_newpkgsize(struct pkg *pkg, int64_t size)
{
	assert(pkg != NULL);
	assert(size >= 0);
@@ -301,7 +301,7 @@ pkg_licenselogic(struct pkg *pkg)
}

int
-
pkg_setrowid(struct pkg *pkg, int64_t rowid) {
+
pkg_set_rowid(struct pkg *pkg, int64_t rowid) {
	assert(pkg != NULL);
	pkg->rowid = rowid;
	return (EPKG_OK);
modified libpkg/pkg.h
@@ -345,8 +345,8 @@ int pkg_set_mtree(struct pkg *pkg, const char *value);
 */
int pkg_set_from_file(struct pkg *pkg, pkg_attr attr, const char *file);

-
int pkg_setautomatic(struct pkg *pkg);
-
int pkg_isautomatic(struct pkg *pkg);
+
int pkg_set_automatic(struct pkg *pkg);
+
int pkg_is_automatic(struct pkg *pkg);

/**
 * set the logic for license combinaison
@@ -362,19 +362,19 @@ lic_t pkg_licenselogic(struct pkg *pkg);
 * Set the uncompressed size of the package.
 * @return An error code.
 */
-
int pkg_setflatsize(struct pkg *pkg, int64_t size);
+
int pkg_set_flatsize(struct pkg *pkg, int64_t size);

/**
 * Set the uncompressed size of the package, in its futur version.
 * @return An error code.
 */
-
int pkg_setnewflatsize(struct pkg *pkg, int64_t size);
+
int pkg_set_newflatsize(struct pkg *pkg, int64_t size);

/**
 * Set the compressed size of the package, in its futur version.
 * @return An error code.
 */
-
int pkg_setnewpkgsize(struct pkg *pkg, int64_t size);
+
int pkg_set_newpkgsize(struct pkg *pkg, int64_t size);

/**
 * Allocate a new struct pkg and add it to the deps of pkg.
@@ -555,7 +555,7 @@ int pkgdb_has_flag(struct pkgdb *db, int flag);
#define	PKGDB_FLAG_IN_FLIGHT	(1 << 0)

/**
-
 * Register a package to the database.
+
 * register a package to the database.
 * @return An error code.
 */
int pkgdb_register_pkg(struct pkgdb *db, struct pkg *pkg);
modified libpkg/pkg_add.c
@@ -117,7 +117,7 @@ pkg_add2(struct pkgdb *db, const char *path, int upgrade, int automatic)
	}

	if (automatic == 1)
-
		pkg_setautomatic(pkg);
+
		pkg_set_automatic(pkg);

	if (uname(&u) != 0) {
		pkg_emit_errno("uname", "");
@@ -190,7 +190,7 @@ pkg_add2(struct pkgdb *db, const char *path, int upgrade, int automatic)
		}
	}

-
	/* Register the package before installing it in case there are
+
	/* register the package before installing it in case there are
	 * problems that could be caught here. */
	retcode = pkgdb_register_pkg(db, pkg);
	if (retcode != EPKG_OK || pkgdb_has_flag(db, PKGDB_FLAG_IN_FLIGHT) == 0)
modified libpkg/pkg_jobs.c
@@ -131,7 +131,7 @@ pkg_jobs_install(struct pkg_jobs *j)
				return (EPKG_FATAL);
		}

-
		if (pkg_add2(j->db, path, 0, pkg_isautomatic(p)) != EPKG_OK)
+
		if (pkg_add2(j->db, path, 0, pkg_is_automatic(p)) != EPKG_OK)
			return (EPKG_FATAL);
	}

modified libpkg/pkg_manifest.c
@@ -181,7 +181,7 @@ pkg_set_flatsize_from_node(struct pkg *pkg, yaml_node_t *val, __unused yaml_docu
		return (EPKG_FATAL);
	}

-
	return (pkg_setflatsize(pkg, flatsize));
+
	return (pkg_set_flatsize(pkg, flatsize));
}
static int
pkg_set_licenselogic_from_node(struct pkg *pkg, yaml_node_t *val, __unused yaml_document_t *doc, __unused int attr)
modified libpkg/pkg_ports.c
@@ -318,7 +318,7 @@ ports_parse_plist(struct pkg *pkg, char *plist)
		}
	}

-
	pkg_setflatsize(pkg, flatsize);
+
	pkg_set_flatsize(pkg, flatsize);

	if (sbuf_len(pre_unexec_scripts) > 0) {
		sbuf_finish(unexec_scripts);
modified libpkg/pkg_private.h
@@ -182,7 +182,7 @@ int pkgdb_is_dir_used(struct pkgdb *db, const char *dir, int64_t *res);
int pkgdb_integrity_append(struct pkgdb *db, struct pkg *p);
int pkgdb_integrity_check(struct pkgdb *db);

-
int pkg_setrowid(struct pkg *, int64_t rowid);
+
int pkg_set_rowid(struct pkg *, int64_t rowid);

/* pkgdb commands */
int sql_exec(sqlite3 *, const char *);
modified libpkg/pkgdb.c
@@ -59,11 +59,11 @@ static struct column_int_mapping {
	const char * const name;
	int (*set_int)(struct pkg *pkg, int64_t);
} columns_int[] = {
-
	{ "flatsize", pkg_setflatsize },
-
	{ "newflatsize", pkg_setnewflatsize },
-
	{ "pkgsize", pkg_setnewpkgsize },
+
	{ "flatsize", pkg_set_flatsize },
+
	{ "newflatsize", pkg_set_newflatsize },
+
	{ "pkgsize", pkg_set_newpkgsize },
	{ "licenselogic", pkg_set_licenselogic},
-
	{ "rowid", pkg_setrowid},
+
	{ "rowid", pkg_set_rowid},
	{ NULL, NULL}
};

@@ -131,7 +131,7 @@ populate_pkg(sqlite3_stmt *stmt, struct pkg *pkg) {
				}
				if (strcmp(colname, "automatic") == 0) {
					if (sqlite3_column_int64(stmt, icol) == 1)
-
						pkg_setautomatic(pkg);
+
						pkg_set_automatic(pkg);
					break;
				}
				if (columns_int[i].name == NULL)
@@ -1288,7 +1288,7 @@ pkgdb_register_pkg(struct pkgdb *db, struct pkg *pkg)
	sqlite3_bind_text(stmt_pkg, 10, pkg_get(pkg, PKG_WWW), -1, SQLITE_STATIC);
	sqlite3_bind_text(stmt_pkg, 11, pkg_get(pkg, PKG_PREFIX), -1, SQLITE_STATIC);
	sqlite3_bind_int64(stmt_pkg, 12, pkg_flatsize(pkg));
-
	sqlite3_bind_int(stmt_pkg, 13, pkg_isautomatic(pkg));
+
	sqlite3_bind_int(stmt_pkg, 13, pkg_is_automatic(pkg));
	sqlite3_bind_int64(stmt_pkg, 14, pkg_licenselogic(pkg));
	sqlite3_bind_text(stmt_pkg, 15, pkg_get(pkg, PKG_MTREE), -1, SQLITE_STATIC);

modified pkg/main.c
@@ -41,7 +41,7 @@ static struct commands {
	int (*exec)(int argc, char **argv);
	void (* const usage)(void);
} cmd[] = {
-
	{ "add", "Registers a package and installs it on the system", exec_add, usage_add},
+
	{ "add", "registers a package and installs it on the system", exec_add, usage_add},
	{ "autoremove", "Removes orphan packages", exec_autoremove, usage_autoremove},
	{ "backup", "Backup and restore the local package database", exec_backup, usage_backup},
	{ "clean", "Cleans old packages from the cache", exec_clean, usage_clean},
modified pkg/query.c
@@ -77,7 +77,7 @@ format_str(struct pkg *pkg, struct sbuf *dest, const char *qstr, void *data)
					sbuf_cat(dest, pkg_get(pkg, PKG_WWW));
					break;
				case 'a':
-
					sbuf_printf(dest, "%d", pkg_isautomatic(pkg));
+
					sbuf_printf(dest, "%d", pkg_is_automatic(pkg));
					break;
				case 's':
					qstr++;
modified pkg/register.c
@@ -95,7 +95,7 @@ exec_register(int argc, char **argv)
					err(1, "cannot allocate memory");
				break;
			case 'd':
-
				pkg_setautomatic(pkg);
+
				pkg_set_automatic(pkg);
				break;
			case 'i':
				if ((input_path = strdup(optarg)) == NULL)