Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Includes cleanup.
jlaffaye committed 15 years ago
commit d4ac7980e22a3755bd771d6158bac178be48c5d3
parent dbecaee
9 files changed +6 -22
modified libpkg/pkg.c
@@ -1,8 +1,7 @@
-
#include <sys/param.h>
-

#include <err.h>
#include <stdlib.h>
-
#include <strings.h>
+

+
#include <sqlite3.h>

#include "pkg.h"
#include "pkg_private.h"
modified libpkg/pkg.h
@@ -3,6 +3,7 @@

struct pkg;
struct pkgdb;
+
struct pkg_manifest;

typedef enum _match_t {
	MATCH_ALL,
@@ -12,9 +13,11 @@ typedef enum _match_t {
	MATCH_EREGEX
} match_t;

+
/* pkg */
int pkg_new(struct pkg **);
void pkg_reset(struct pkg *);
void pkg_free(struct pkg *);
+
void pkg_from_manifest(struct pkg*, struct pkg_manifest *);
const char *pkg_name(struct pkg *);
const char *pkg_version(struct pkg *);
const char *pkg_comment(struct pkg *);
modified libpkg/pkg_compat.c
@@ -1,12 +1,10 @@
#include <sys/param.h>
-
#include <sys/stat.h>
#include <sys/utsname.h>

#include <ctype.h>
#include <err.h>
#include <stdlib.h>
#include <string.h>
-
#include <libgen.h>

#include "util.h"
#include "pkg_compat.h"
modified libpkg/pkg_create.c
@@ -1,4 +1,3 @@
-
#include <sys/stat.h>
#include <sys/param.h>

#include <archive.h>
@@ -11,10 +10,7 @@
#include <fcntl.h>

#include "pkg.h"
-
#include "pkg_private.h"
#include "pkg_manifest.h"
-
#include "pkgdb.h"
-
#include "util.h"

#define METADATA_GLOB "+{DEINSTALL,INSTALL,MTREE_DIRS}"

modified libpkg/pkg_manifest.h
@@ -3,7 +3,7 @@

#include <stdbool.h>

-
#include "pkg.h"
+
struct pkg;

/* Opaque struct */
struct pkg_manifest;
modified libpkg/pkg_private.h
@@ -1,8 +1,6 @@
#ifndef _PKG_PRIVATE_H
#define _PKG_PRIVATE_H

-
#include <sqlite3.h>
-

#include "pkg_manifest.h"

struct pkg {
@@ -19,6 +17,4 @@ struct pkg {
	struct pkg_manifest *m;
};

-
void pkg_from_manifest(struct pkg*, struct pkg_manifest *);
-

#endif
modified libpkg/pkgdb.c
@@ -1,14 +1,11 @@
#include <sys/param.h>
#include <sys/stat.h>
-
#include <sys/file.h>

#include <err.h>
#include <errno.h>
-
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-
#include <unistd.h>

#include <regex.h>

modified libpkg/pkgdb.h
@@ -1,8 +1,6 @@
#ifndef _PKGDB_H
#define _PKGDB_H

-
#include <sqlite3.h>
-

struct pkgdb {
	sqlite3 *sqlite;
	sqlite3_stmt *stmt;
modified libpkg/util.c
@@ -1,7 +1,4 @@
-
#include <sys/param.h>
#include <sys/stat.h>
-
#include <sys/types.h>
-
#include <sys/uio.h>

#include <assert.h>
#include <dirent.h>