pakfire_build* build, pakfire_archive* archive, void* data) {
const struct cli_local_args* local_args = data;
pakfire_package* pkg = NULL;
- struct pakfire_repo* local = NULL;
+ pakfire_repo* local = NULL;
char path[PATH_MAX];
int r;
}
int cli_dump_repolist(pakfire_repolist* list, int flags) {
- struct pakfire_repo* repo = NULL;
+ pakfire_repo* repo = NULL;
int r;
if (!list)
#include "pakfire.h"
static void cli_set_repo_enabled(struct pakfire* pakfire, const char* name, int enabled) {
- struct pakfire_repo* repo = NULL;
+ pakfire_repo* repo = NULL;
// Find the repository
repo = pakfire_get_repo(pakfire, name);
}
static int pakfire_archive_make_package_from_json(pakfire_archive* archive,
- struct pakfire_repo* repo, pakfire_package** package) {
+ pakfire_repo* repo, pakfire_package** package) {
pakfire_package* pkg = NULL;
char path[PATH_MAX];
int r;
Copy all metadata from this archive to the package object
*/
int pakfire_archive_make_package(pakfire_archive* archive,
- struct pakfire_repo* repo, pakfire_package** package) {
- struct pakfire_repo* dummy = NULL;
+ pakfire_repo* repo, pakfire_package** package) {
+ pakfire_repo* dummy = NULL;
int r;
// Use dummy repo if no repository was passed
const enum pakfire_hash_type type, const unsigned char* checksum, const size_t length);
int pakfire_archive_make_package(pakfire_archive* archive,
- struct pakfire_repo* repo, pakfire_package** package);
+ pakfire_repo* repo, pakfire_package** package);
int pakfire_archive_lint(pakfire_archive* archive,
pakfire_linter_result_callback callback, void* data);
pakfire_env* env;
// The build repository
- struct pakfire_repo* repo;
+ pakfire_repo* repo;
// Buildroot
char buildroot[PATH_MAX];
}
static int __pakfire_build_setup_repo(struct pakfire* pakfire,
- struct pakfire_repo* repo, void* p) {
+ pakfire_repo* repo, void* p) {
char path[PATH_MAX];
FILE* f = NULL;
int r;
}
int pakfire_build_clean(struct pakfire* pakfire, int flags) {
- struct pakfire_repo* local = NULL;
+ pakfire_repo* local = NULL;
int r = 0;
pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
}
// Bind repository name
- struct pakfire_repo* repo = pakfire_package_get_repo(pkg);
+ pakfire_repo* repo = pakfire_package_get_repo(pkg);
if (repo) {
const char* repo_name = pakfire_repo_get_name(repo);
pakfire_repo_unref(repo);
return scriptlet;
}
-static int pakfire_db_load_package(pakfire_db* db, struct pakfire_repo* repo, sqlite3_stmt* stmt) {
+static int pakfire_db_load_package(pakfire_db* db, pakfire_repo* repo, sqlite3_stmt* stmt) {
pakfire_package* pkg = NULL;
int r = 1;
return r;
}
-int pakfire_db_load(pakfire_db* db, struct pakfire_repo* repo) {
+int pakfire_db_load(pakfire_db* db, pakfire_repo* repo) {
sqlite3_stmt* stmt = NULL;
int r = 1;
pakfire_archive* archive, int userinstalled);
int pakfire_db_remove_package(pakfire_db* db, pakfire_package* pkg);
-int pakfire_db_load(pakfire_db* db, struct pakfire_repo* repo);
+int pakfire_db_load(pakfire_db* db, pakfire_repo* repo);
struct pakfire_scriptlet* pakfire_db_get_scriptlet(
pakfire_db* db, pakfire_package* pkg, const char* type);
// Reference to this package in the SOLV pool
Id id;
- struct pakfire_repo* repo;
+ pakfire_repo* repo;
char nevra[NAME_MAX];
char source_nevra[NAME_MAX];
}
int pakfire_package_create_from_solvable(pakfire_package** package,
- struct pakfire* pakfire, struct pakfire_repo* repo, Id id) {
+ struct pakfire* pakfire, pakfire_repo* repo, Id id) {
pakfire_package* pkg = NULL;
// Allocate some memory
}
int pakfire_package_create(pakfire_package** package,
- struct pakfire* pakfire, struct pakfire_repo* repo,
+ struct pakfire* pakfire, pakfire_repo* repo,
const char* name, const char* evr, const char* arch) {
- struct pakfire_repo* dummy = NULL;
+ pakfire_repo* dummy = NULL;
int r;
// Check for some valid input
return ret;
// Check repositories
- struct pakfire_repo* repo1 = pakfire_package_get_repo(pkg1);
- struct pakfire_repo* repo2 = pakfire_package_get_repo(pkg2);
+ pakfire_repo* repo1 = pakfire_package_get_repo(pkg1);
+ pakfire_repo* repo2 = pakfire_package_get_repo(pkg2);
if (repo1 && repo2) {
ret = pakfire_repo_cmp(repo1, repo2);
}
static void pakfire_package_internalize_repo(pakfire_package* pkg) {
- struct pakfire_repo* repo = pakfire_package_get_repo(pkg);
+ pakfire_repo* repo = pakfire_package_get_repo(pkg);
if (repo) {
pakfire_repo_internalize(repo, 0);
pakfire_repo_unref(repo);
}
static void pakfire_package_has_changed(pakfire_package* pkg) {
- struct pakfire_repo* repo = pakfire_package_get_repo(pkg);
+ pakfire_repo* repo = pakfire_package_get_repo(pkg);
if (repo) {
pakfire_repo_has_changed(repo);
pakfire_repo_unref(repo);
return pakfire_string_set(self->local_path, path);
}
-static int pakfire_package_make_path_local(pakfire_package* self, struct pakfire_repo* repo) {
+static int pakfire_package_make_path_local(pakfire_package* self, pakfire_repo* repo) {
const char* path = NULL;
// Fetch the path
Returns the path this package is or should be stored.
*/
const char* pakfire_package_get_path(pakfire_package* self) {
- struct pakfire_repo* repo = NULL;
+ pakfire_repo* repo = NULL;
int r;
// Return the cached value if we have one
int pakfire_package_set_checksum(pakfire_package* pkg,
const enum pakfire_hash_type hash, const unsigned char* digest, const size_t length) {
- struct pakfire_repo* repo = NULL;
+ pakfire_repo* repo = NULL;
Id id = ID_NULL;
int r;
return pakfire_package_matches_depid(pkg, key, id);
}
-struct pakfire_repo* pakfire_package_get_repo(pakfire_package* pkg) {
+pakfire_repo* pakfire_package_get_repo(pakfire_package* pkg) {
int r;
// Open the repository if not done, yet
}
// Repository
- struct pakfire_repo* repo = pakfire_package_get_repo(pkg);
+ pakfire_repo* repo = pakfire_package_get_repo(pkg);
if (repo) {
if (!pakfire_repo_name_equals(repo, PAKFIRE_REPO_DUMMY)) {
const char* repo_name = pakfire_repo_get_name(repo);
int r;
// Fetch repodata
- struct pakfire_repo* repo = pakfire_package_get_repo(pkg);
+ pakfire_repo* repo = pakfire_package_get_repo(pkg);
if (!repo) {
ERROR(pkg->ctx, "Could not find repository for %s: %m\n",
pakfire_package_get_string(pkg, PAKFIRE_PKG_NEVRA));
static int pakfire_package_add_build_packages(pakfire_package* pkg,
struct json_object* md) {
- struct pakfire_repo* repo = NULL;
+ pakfire_repo* repo = NULL;
struct json_object* object = NULL;
int r;
};
int pakfire_package_create(pakfire_package** package, struct pakfire* pakfire,
- struct pakfire_repo* repo, const char* name, const char* evr, const char* arch);
+ pakfire_repo* repo, const char* name, const char* evr, const char* arch);
pakfire_package* pakfire_package_ref(pakfire_package* pkg);
pakfire_package* pakfire_package_unref(pakfire_package* pkg);
int pakfire_package_get_reverse_requires(pakfire_package* pkg,
pakfire_packagelist** list);
-struct pakfire_repo* pakfire_package_get_repo(pakfire_package* pkg);
+pakfire_repo* pakfire_package_get_repo(pakfire_package* pkg);
char* pakfire_package_dump(pakfire_package* pkg, int flags);
int pakfire_package_installcheck(pakfire_package* pkg, char** problem, int flags);
int pakfire_package_create_from_solvable(pakfire_package** package,
- struct pakfire* pakfire, struct pakfire_repo* repo, Id id);
+ struct pakfire* pakfire, pakfire_repo* repo, Id id);
int pakfire_package_set_strings_from_string(pakfire_package* pkg,
const enum pakfire_package_key key, const char* value);
}
static int pakfire_load_installed_packages(struct pakfire* self) {
- struct pakfire_repo* repo = NULL;
+ pakfire_repo* repo = NULL;
pakfire_db* db = NULL;
int r;
}
static int pakfire_setup_default_repos(struct pakfire* self) {
- struct pakfire_repo* commandline = NULL;
- struct pakfire_repo* dummy = NULL;
- struct pakfire_repo* system = NULL;
+ pakfire_repo* commandline = NULL;
+ pakfire_repo* dummy = NULL;
+ pakfire_repo* system = NULL;
int r;
// Create a dummy repository
}
static void pakfire_free(struct pakfire* pakfire) {
- struct pakfire_repo* repo = NULL;
+ pakfire_repo* repo = NULL;
int r;
// Avoid recursive free
}
static int pakfire_setup_local_repo(struct pakfire* self) {
- struct pakfire_repo* local = NULL;
+ pakfire_repo* local = NULL;
char path[PATH_MAX];
char url[PATH_MAX];
int r;
return r;
}
-static int pakfire_refresh_repo(struct pakfire* pakfire, struct pakfire_repo* repo, void* data) {
+static int pakfire_refresh_repo(struct pakfire* pakfire, pakfire_repo* repo, void* data) {
return pakfire_repo_refresh(repo, 0);
}
int pakfire_repo_walk(struct pakfire* pakfire,
pakfire_repo_walk_callback callback, void* p) {
- struct pakfire_repo* repo = NULL;
+ pakfire_repo* repo = NULL;
Repo* solv_repo = NULL;
int i = 0;
int r;
return 0;
}
-static int __pakfire_repo_clean(struct pakfire* pakfire, struct pakfire_repo* repo,
+static int __pakfire_repo_clean(struct pakfire* pakfire, pakfire_repo* repo,
void* p) {
int flags = *(int*)p;
pakfire->internal_flags &= ~PAKFIRE_POOL_READY;
}
-static int __pakfire_repo_internalize(struct pakfire* pakfire, struct pakfire_repo* repo,
+static int __pakfire_repo_internalize(struct pakfire* pakfire, pakfire_repo* repo,
void* p) {
int flags = *(int*)p;
}
pakfire_repolist* pakfire_get_repos(struct pakfire* pakfire) {
- struct pakfire_repo* repo = NULL;
+ pakfire_repo* repo = NULL;
pakfire_repolist* list;
int r = pakfire_repolist_create(&list);
return NULL;
}
-struct pakfire_repo* pakfire_get_repo(struct pakfire* pakfire, const char* name) {
- struct pakfire_repo* repo = NULL;
+pakfire_repo* pakfire_get_repo(struct pakfire* pakfire, const char* name) {
+ pakfire_repo* repo = NULL;
Repo* solv_repo = NULL;
int r;
int i;
return NULL;
}
-struct pakfire_repo* pakfire_get_installed_repo(struct pakfire* pakfire) {
- struct pakfire_repo* repo = NULL;
+pakfire_repo* pakfire_get_installed_repo(struct pakfire* pakfire) {
+ pakfire_repo* repo = NULL;
int r;
if (!pakfire->pool->installed)
/*
Convenience function to dist() a package on the fly
*/
-static int pakfire_commandline_dist(struct pakfire* pakfire, struct pakfire_repo* repo,
+static int pakfire_commandline_dist(struct pakfire* pakfire, pakfire_repo* repo,
const char* path, pakfire_package** pkg) {
pakfire_archive* archive = NULL;
int r;
*/
int pakfire_commandline_add(struct pakfire* pakfire, const char* path,
pakfire_package** package) {
- struct pakfire_repo* repo = NULL;
+ pakfire_repo* repo = NULL;
int r;
// Find the commandline repository
int pakfire_version_compare(struct pakfire* pakfire, const char* evr1, const char* evr2);
pakfire_repolist* pakfire_get_repos(struct pakfire* pakfire);
-struct pakfire_repo* pakfire_get_repo(struct pakfire* pakfire, const char* name);
+pakfire_repo* pakfire_get_repo(struct pakfire* pakfire, const char* name);
int pakfire_whatprovides(struct pakfire* pakfire, const char* what, int flags,
pakfire_packagelist* list);
Pool* pakfire_get_solv_pool(struct pakfire* pakfire);
-struct pakfire_repo* pakfire_get_installed_repo(struct pakfire* pakfire);
+pakfire_repo* pakfire_get_installed_repo(struct pakfire* pakfire);
int pakfire_commandline_add(struct pakfire* pakfire, const char* path,
pakfire_package** package);
typedef int (*pakfire_repo_walk_callback)
- (struct pakfire* pakfire, struct pakfire_repo* repo, void* p);
+ (struct pakfire* pakfire, pakfire_repo* repo, void* p);
int pakfire_repo_walk(struct pakfire* pakfire,
pakfire_repo_walk_callback callback, void* p);
}
int pakfire_parser_create_package(pakfire_parser* parser,
- pakfire_package** pkg, struct pakfire_repo* repo, const char* namespace, const char* default_arch) {
+ pakfire_package** pkg, pakfire_repo* repo, const char* namespace, const char* default_arch) {
int r = 1;
char* name = NULL;
int pakfire_parser_set_namespace(pakfire_parser* parser, const char* namespace);
int pakfire_parser_create_package(pakfire_parser* parser,
- pakfire_package** pkg, struct pakfire_repo* repo, const char* namespace, const char* default_arch);
+ pakfire_package** pkg, pakfire_repo* repo, const char* namespace, const char* default_arch);
// Errors
int pakfire_parser_error_create(pakfire_parser_error** error,
#define MAX_DESCRIPTION 4096
-struct pakfire_repomd {
+typedef struct pakfire_repomd {
// Version
int64_t version;
// Hashes
struct pakfire_hashes hashes;
} packages;
-};
+} pakfire_repomd;
-struct pakfire_repo_appdata {
+typedef struct pakfire_repo_appdata {
// Reference Counter
int nrefs;
Repo* repo;
// Metadata
- struct pakfire_repomd repomd;
+ pakfire_repomd repomd;
// Description
char description[MAX_DESCRIPTION];
// Markers
int ready:1;
-};
+} pakfire_repo_appdata;
struct pakfire_repo {
pakfire_ctx* ctx;
int nrefs;
Repo* repo;
- struct pakfire_repo_appdata* appdata;
+ pakfire_repo_appdata* appdata;
pakfire_key* key;
};
-static const char* pakfire_repo_get_expanded_baseurl(struct pakfire_repo* repo);
+static const char* pakfire_repo_get_expanded_baseurl(pakfire_repo* repo);
-int pakfire_repo_is_internal(struct pakfire_repo* repo) {
+int pakfire_repo_is_internal(pakfire_repo* repo) {
const char* name = pakfire_repo_get_name(repo);
if (!name)
return 0;
return (*name == '@');
}
-static int pakfire_repo_is_commandline(struct pakfire_repo* repo) {
+static int pakfire_repo_is_commandline(pakfire_repo* repo) {
return pakfire_repo_name_equals(repo, PAKFIRE_REPO_COMMANDLINE);
}
-int pakfire_repo_is_local(struct pakfire_repo* repo) {
+int pakfire_repo_is_local(pakfire_repo* repo) {
// The commandline repository is semi-local
if (pakfire_repo_is_commandline(repo))
return 1;
We set this automatically to reduce bandwidth usage.
*/
-static void pakfire_repo_update_subpriority(struct pakfire_repo* repo) {
+static void pakfire_repo_update_subpriority(pakfire_repo* repo) {
// Prefer local repositories
if (pakfire_repo_is_local(repo))
repo->repo->subpriority = 1;
repo->repo->subpriority = 0;
}
-int pakfire_repo_name_equals(struct pakfire_repo* repo, const char* name) {
+int pakfire_repo_name_equals(pakfire_repo* repo, const char* name) {
const char* n = pakfire_repo_get_name(repo);
if (!n)
return 0;
return pakfire_string_equals(n, name);
}
-char* pakfire_repo_url_replace(struct pakfire_repo* repo, const char* url) {
+char* pakfire_repo_url_replace(pakfire_repo* repo, const char* url) {
if (!url)
return NULL;
return buffer;
}
-int __pakfire_repo_path(struct pakfire_repo* repo,
+int __pakfire_repo_path(pakfire_repo* repo,
char* path, const size_t length, const char* format, ...) {
char buffer[PATH_MAX];
va_list args;
return __pakfire_cache_path(repo->pakfire, path, length, "%s/%s", name, buffer);
}
-static int pakfire_repo_xfer_create(struct pakfire_xfer** xfer, struct pakfire_repo* repo,
+static int pakfire_repo_xfer_create(struct pakfire_xfer** xfer, pakfire_repo* repo,
const char* url, ...) __attribute__((format(printf, 3, 4)));
/*
settings of this repository.
*/
static int pakfire_repo_xfer_create(
- struct pakfire_xfer** xfer, struct pakfire_repo* repo, const char* url, ...) {
+ struct pakfire_xfer** xfer, pakfire_repo* repo, const char* url, ...) {
pakfire_mirrorlist* mirrorlist = NULL;
struct pakfire_xfer* x = NULL;
const char* baseurl = NULL;
return r;
}
-static int pakfire_repo_import_key(struct pakfire_repo* self, const char* data) {
+static int pakfire_repo_import_key(pakfire_repo* self, const char* data) {
pakfire_key* key = NULL;
int r;
}
static int __pakfire_repo_import(pakfire_config* config, const char* section, void* data) {
- struct pakfire_repo* self = NULL;
+ pakfire_repo* self = NULL;
struct pakfire* pakfire = data;
int r;
}
static int pakfire_repo_to_packagelist(
- struct pakfire_repo* self, pakfire_packagelist** list) {
+ pakfire_repo* self, pakfire_packagelist** list) {
pakfire_packagelist* l = NULL;
pakfire_package* pkg = NULL;
Solvable* s = NULL;
return r;
}
-Id pakfire_repo_add_solvable(struct pakfire_repo* repo) {
+Id pakfire_repo_add_solvable(pakfire_repo* repo) {
Id id = repo_add_solvable(repo->repo);
// Mark this repository as changed
return id;
}
-int __pakfire_repo_make_path(struct pakfire_repo* self, char* path, size_t length,
+int __pakfire_repo_make_path(pakfire_repo* self, char* path, size_t length,
pakfire_archive* archive, pakfire_package* pkg) {
const char* uuid = NULL;
return -EINVAL;
}
-int pakfire_repo_import_archive(struct pakfire_repo* self,
+int pakfire_repo_import_archive(pakfire_repo* self,
pakfire_archive* archive, pakfire_package** package) {
pakfire_package* pkg = NULL;
char path[PATH_MAX];
return r;
}
-pakfire_mirrorlist* pakfire_repo_get_mirrorlist(struct pakfire_repo* self) {
+pakfire_mirrorlist* pakfire_repo_get_mirrorlist(pakfire_repo* self) {
if (self->appdata->mirrorlist)
return pakfire_mirrorlist_ref(self->appdata->mirrorlist);
return NULL;
}
-struct pakfire_repo_scan_ctx {
+typedef struct pakfire_repo_scan_ctx {
// Progress
pakfire_progress* progress;
// Packages
pakfire_packagelist* packages;
-};
+} pakfire_repo_scan_ctx;
typedef int (*pakfire_repo_scan_callback)(
- struct pakfire_repo* repo, struct pakfire_repo_scan_ctx* scan_ctx, FTSENT* entry);
+ pakfire_repo* repo, pakfire_repo_scan_ctx* scan_ctx, FTSENT* entry);
-static int __pakfire_repo_scan(struct pakfire_repo* repo,
- struct pakfire_repo_scan_ctx* scan_ctx, pakfire_repo_scan_callback callback) {
+static int __pakfire_repo_scan(pakfire_repo* repo,
+ pakfire_repo_scan_ctx* scan_ctx, pakfire_repo_scan_callback callback) {
FTSENT* entry = NULL;
FTS* fts = NULL;
int r = 0;
return r;
}
-static int __pakfire_repo_scan_count(struct pakfire_repo* repo,
- struct pakfire_repo_scan_ctx* scan_ctx, FTSENT* entry) {
+static int __pakfire_repo_scan_count(pakfire_repo* repo,
+ pakfire_repo_scan_ctx* scan_ctx, FTSENT* entry) {
++scan_ctx->num_archives;
return 0;
}
-static int __pakfire_repo_scan_archive(struct pakfire_repo* repo,
- struct pakfire_repo_scan_ctx* scan_ctx, FTSENT* entry) {
+static int __pakfire_repo_scan_archive(pakfire_repo* repo,
+ pakfire_repo_scan_ctx* scan_ctx, FTSENT* entry) {
pakfire_archive* archive = NULL;
pakfire_package* package = NULL;
int r = 0;
return r;
}
-int pakfire_repo_scan(struct pakfire_repo* repo, int flags) {
+int pakfire_repo_scan(pakfire_repo* repo, int flags) {
int r;
// Scan context
- struct pakfire_repo_scan_ctx scan_ctx = {
+ pakfire_repo_scan_ctx scan_ctx = {
.flags = flags,
};
return 0;
}
-static int pakfire_repo_sync(struct pakfire_repo* self) {
+static int pakfire_repo_sync(pakfire_repo* self) {
int r;
// Log action
}
static int pakfire_repo_download_database(
- struct pakfire_repo* repo, const char* filename, const char* path) {
+ pakfire_repo* repo, const char* filename, const char* path) {
struct pakfire_xfer* xfer = NULL;
char title[NAME_MAX];
int r;
return r;
}
-static int pakfire_repo_read_database(struct pakfire_repo* self) {
- struct pakfire_repomd* repomd = &self->appdata->repomd;
+static int pakfire_repo_read_database(pakfire_repo* self) {
+ pakfire_repomd* repomd = &self->appdata->repomd;
char path[PATH_MAX];
FILE* f = NULL;
int r;
return r;
}
-static void pakfire_repo_reset_metadata(struct pakfire_repo* self) {
+static void pakfire_repo_reset_metadata(pakfire_repo* self) {
memset(&self->appdata->repomd, 0, sizeof(self->appdata->repomd));
}
-static int pakfire_repo_parse_repomd(struct pakfire_repo* self,
- struct pakfire_repomd* repomd, struct json_object* root) {
+static int pakfire_repo_parse_repomd(pakfire_repo* self,
+ pakfire_repomd* repomd, struct json_object* root) {
struct json_object* files = NULL;
struct json_object* file = NULL;
struct json_object* chksums = NULL;
return r;
}
-static int pakfire_repo_read_metadata(struct pakfire_repo* repo, const char* path) {
+static int pakfire_repo_read_metadata(pakfire_repo* repo, const char* path) {
struct json_object* json = NULL;
char* error = NULL;
int r;
return r;
}
-static int pakfire_repo_download_mirrorlist(struct pakfire_repo* self,
+static int pakfire_repo_download_mirrorlist(pakfire_repo* self,
const char* path, const int force) {
struct pakfire_xfer* xfer = NULL;
char* url = NULL;
return r;
}
-static int pakfire_repo_refresh_mirrorlist(struct pakfire_repo* self, const int force) {
+static int pakfire_repo_refresh_mirrorlist(pakfire_repo* self, const int force) {
pakfire_mirrorlist* mirrorlist = NULL;
char path[PATH_MAX];
int r;
}
static int pakfire_repo_verify_metadata(
- struct pakfire_repo* self, const pakfire_buffer* repomd) {
+ pakfire_repo* self, const pakfire_buffer* repomd) {
pakfire_buffer signature = {};
struct pakfire_xfer* xfer = NULL;
FILE* f = NULL;
return r;
}
-static int pakfire_repo_download_metadata(struct pakfire_repo* repo, const char* path, int force) {
- struct pakfire_repomd repomd = {};
+static int pakfire_repo_download_metadata(pakfire_repo* repo, const char* path, int force) {
+ pakfire_repomd repomd = {};
pakfire_buffer buffer = {};
struct pakfire_xfer* xfer = NULL;
struct json_object* json = NULL;
return r;
}
-static void pakfire_repo_free_appdata(struct pakfire_repo_appdata* appdata) {
+static void pakfire_repo_free_appdata(pakfire_repo_appdata* appdata) {
// Don't free if something is still holding references
if (--appdata->nrefs > 0)
return;
free(appdata);
}
-static void pakfire_repo_free(struct pakfire_repo* self) {
+static void pakfire_repo_free(pakfire_repo* self) {
if (self->appdata)
pakfire_repo_free_appdata(self->appdata);
if (self->pakfire)
}
}
-static int pakfire_repo_setup_appdata(struct pakfire_repo* self) {
- struct pakfire_repo_appdata* appdata = NULL;
+static int pakfire_repo_setup_appdata(pakfire_repo* self) {
+ pakfire_repo_appdata* appdata = NULL;
// Allocate appdata
appdata = calloc(1, sizeof(*appdata));
return 0;
}
-int pakfire_repo_create(struct pakfire_repo** repo,
+int pakfire_repo_create(pakfire_repo** repo,
struct pakfire* pakfire, const char* name) {
- struct pakfire_repo* self = NULL;
+ pakfire_repo* self = NULL;
int r;
// Allocate some memory
return r;
}
-int pakfire_repo_open(struct pakfire_repo** repo, struct pakfire* pakfire, Repo* _repo) {
- struct pakfire_repo* self = NULL;
+int pakfire_repo_open(pakfire_repo** repo, struct pakfire* pakfire, Repo* _repo) {
+ pakfire_repo* self = NULL;
// Allocate some memory
self = calloc(1, sizeof(*self));
return 0;
}
-struct pakfire_repo* pakfire_repo_ref(struct pakfire_repo* repo) {
+pakfire_repo* pakfire_repo_ref(pakfire_repo* repo) {
repo->nrefs++;
return repo;
}
-struct pakfire_repo* pakfire_repo_unref(struct pakfire_repo* repo) {
+pakfire_repo* pakfire_repo_unref(pakfire_repo* repo) {
if (--repo->nrefs > 0)
return repo;
return NULL;
}
-int pakfire_repo_clear(struct pakfire_repo* self) {
+int pakfire_repo_clear(pakfire_repo* self) {
repo_empty(self->repo, 0);
return 0;
}
-Repo* pakfire_repo_get_repo(struct pakfire_repo* repo) {
+Repo* pakfire_repo_get_repo(pakfire_repo* repo) {
return repo->repo;
}
-Repodata* pakfire_repo_get_repodata(struct pakfire_repo* repo) {
+Repodata* pakfire_repo_get_repodata(pakfire_repo* repo) {
return repo_last_repodata(repo->repo);
}
-int pakfire_repo_identical(struct pakfire_repo* repo1, struct pakfire_repo* repo2) {
+int pakfire_repo_identical(pakfire_repo* repo1, pakfire_repo* repo2) {
return (repo1->repo == repo2->repo);
}
-int pakfire_repo_cmp(struct pakfire_repo* repo1, struct pakfire_repo* repo2) {
+int pakfire_repo_cmp(pakfire_repo* repo1, pakfire_repo* repo2) {
Repo* r1 = repo1->repo;
Repo* r2 = repo2->repo;
return pakfire_string_equals(r1->name, r2->name);
}
-int pakfire_repo_count(struct pakfire_repo* repo) {
+int pakfire_repo_count(pakfire_repo* repo) {
Pool* pool = pakfire_get_solv_pool(repo->pakfire);
int cnt = 0;
return cnt;
}
-void pakfire_repo_has_changed(struct pakfire_repo* repo) {
+void pakfire_repo_has_changed(pakfire_repo* repo) {
repo->appdata->ready = 0;
// Mark pool as changed, too
pakfire_pool_has_changed(repo->pakfire);
}
-int pakfire_repo_internalize(struct pakfire_repo* repo, int flags) {
+int pakfire_repo_internalize(pakfire_repo* repo, int flags) {
if (repo->appdata->ready)
return 0;
return 0;
}
-const char* pakfire_repo_get_name(struct pakfire_repo* repo) {
+const char* pakfire_repo_get_name(pakfire_repo* repo) {
return repo->repo->name;
}
-const char* pakfire_repo_get_description(struct pakfire_repo* repo) {
+const char* pakfire_repo_get_description(pakfire_repo* repo) {
return repo->appdata->description;
}
-int pakfire_repo_set_description(struct pakfire_repo* repo, const char* description) {
+int pakfire_repo_set_description(pakfire_repo* repo, const char* description) {
return pakfire_string_set(repo->appdata->description, description);
}
-int pakfire_repo_get_enabled(struct pakfire_repo* repo) {
+int pakfire_repo_get_enabled(pakfire_repo* repo) {
return !repo->repo->disabled;
}
-void pakfire_repo_set_enabled(struct pakfire_repo* repo, int enabled) {
+void pakfire_repo_set_enabled(pakfire_repo* repo, int enabled) {
repo->repo->disabled = !enabled;
pakfire_repo_has_changed(repo);
}
-int pakfire_repo_get_priority(struct pakfire_repo* repo) {
+int pakfire_repo_get_priority(pakfire_repo* repo) {
return repo->repo->priority;
}
-void pakfire_repo_set_priority(struct pakfire_repo* repo, int priority) {
+void pakfire_repo_set_priority(pakfire_repo* repo, int priority) {
repo->repo->priority = priority;
}
-const char* pakfire_repo_get_baseurl(struct pakfire_repo* repo) {
+const char* pakfire_repo_get_baseurl(pakfire_repo* repo) {
return repo->appdata->baseurl;
}
-static const char* pakfire_repo_get_expanded_baseurl(struct pakfire_repo* repo) {
+static const char* pakfire_repo_get_expanded_baseurl(pakfire_repo* repo) {
char* url = NULL;
int r;
return (*repo->appdata->expanded_baseurl) ? repo->appdata->expanded_baseurl : NULL;
}
-int pakfire_repo_set_baseurl(struct pakfire_repo* repo, const char* baseurl) {
+int pakfire_repo_set_baseurl(pakfire_repo* repo, const char* baseurl) {
int r;
// Store the URL
return 0;
}
-const char* pakfire_repo_get_path(struct pakfire_repo* repo) {
+const char* pakfire_repo_get_path(pakfire_repo* repo) {
const char* baseurl = NULL;
if (!pakfire_repo_is_local(repo))
return baseurl + strlen("file://");
}
-pakfire_key* pakfire_repo_get_key(struct pakfire_repo* self) {
+pakfire_key* pakfire_repo_get_key(pakfire_repo* self) {
if (self->appdata->key)
return pakfire_key_ref(self->appdata->key);
return NULL;
}
-const char* pakfire_repo_get_mirrorlist_url(struct pakfire_repo* self) {
+const char* pakfire_repo_get_mirrorlist_url(pakfire_repo* self) {
if (*self->appdata->mirrorlist_url)
return self->appdata->mirrorlist_url;
return NULL;
}
-int pakfire_repo_set_mirrorlist_url(struct pakfire_repo* repo, const char* url) {
+int pakfire_repo_set_mirrorlist_url(pakfire_repo* repo, const char* url) {
return pakfire_string_set(repo->appdata->mirrorlist_url, url);
}
-int pakfire_repo_write_config(struct pakfire_repo* repo, FILE* f) {
+int pakfire_repo_write_config(pakfire_repo* repo, FILE* f) {
pakfire_config* config = NULL;
pakfire_key* key = NULL;
char* section = NULL;
return r;
}
-int pakfire_repo_is_installed_repo(struct pakfire_repo* self) {
+int pakfire_repo_is_installed_repo(pakfire_repo* self) {
return (self->repo == self->repo->pool->installed);
}
int pakfire_repo_download_package(struct pakfire_xfer** xfer,
- struct pakfire_repo* repo, pakfire_package* pkg) {
+ pakfire_repo* repo, pakfire_package* pkg) {
enum pakfire_hash_type hash = PAKFIRE_HASH_UNDEFINED;
const unsigned char* checksum = NULL;
size_t checksum_length = 0;
return r;
}
-static int pakfire_repo_download(struct pakfire_repo* repo, const char* url,
+static int pakfire_repo_download(pakfire_repo* repo, const char* url,
pakfire_package** package) {
struct pakfire_xfer* xfer = NULL;
FILE* f = NULL;
return r;
}
-int pakfire_repo_add(struct pakfire_repo* repo, const char* path,
+int pakfire_repo_add(pakfire_repo* repo, const char* path,
pakfire_package** package) {
pakfire_archive* archive = NULL;
int r;
return r;
}
-int pakfire_repo_read_solv(struct pakfire_repo* repo, FILE *f, int flags) {
+int pakfire_repo_read_solv(pakfire_repo* repo, FILE *f, int flags) {
int r;
// Import SOLV data
return 0;
}
-int pakfire_repo_write_solv(struct pakfire_repo* repo, FILE *f, int flags) {
+int pakfire_repo_write_solv(pakfire_repo* repo, FILE *f, int flags) {
Repodata* meta = NULL;
Queue addedfileprovides;
int r;
}
static int pakfire_repo_delete_all_packages(
- struct pakfire_repo* repo, const char* prefix) {
+ pakfire_repo* repo, const char* prefix) {
pakfire_package* pkg = NULL;
Solvable* s = NULL;
int i = 0;
return 0;
}
-int pakfire_repo_clean(struct pakfire_repo* repo, int flags) {
+int pakfire_repo_clean(pakfire_repo* repo, int flags) {
char cache_path[PATH_MAX];
int r;
return pakfire_rmtree(cache_path, 0);
}
-int pakfire_repo_refresh(struct pakfire_repo* repo, int force) {
+int pakfire_repo_refresh(pakfire_repo* repo, int force) {
char path[PATH_MAX];
int r;
return 0;
}
-static int pakfire_repo_cleanup_metadata(struct pakfire_repo* self) {
+static int pakfire_repo_cleanup_metadata(pakfire_repo* self) {
char path[PATH_MAX];
int r;
return pakfire_rmtree(path, 0);
}
-static int pakfire_repo_metadata_add_file(struct pakfire_repo* self,
+static int pakfire_repo_metadata_add_file(pakfire_repo* self,
struct json_object* repomd, const char* type, const char* path) {
enum pakfire_hash_type hash = PAKFIRE_HASH_UNDEFINED;
struct pakfire_hashes checksums = {};
return r;
}
-static int pakfire_repo_write_database(struct pakfire_repo* self, struct json_object* repomd) {
+static int pakfire_repo_write_database(pakfire_repo* self, struct json_object* repomd) {
char filename[PATH_MAX];
char path[PATH_MAX];
char tmp[PATH_MAX];
return r;
}
-static int pakfire_repo_make_metadata(struct pakfire_repo* self, struct json_object* md) {
+static int pakfire_repo_make_metadata(pakfire_repo* self, struct json_object* md) {
int r;
// Set the version
return 0;
}
-int pakfire_repo_write_metadata(struct pakfire_repo* self, pakfire_key* key) {
+int pakfire_repo_write_metadata(pakfire_repo* self, pakfire_key* key) {
struct json_object* repomd = NULL;
char repomd_path[PATH_MAX];
char sigpath[PATH_MAX];
int pakfire_repo_compose(struct pakfire* pakfire, const char* path,
pakfire_key* key, const char** files) {
pakfire_archive* archive = NULL;
- struct pakfire_repo* repo = NULL;
+ pakfire_repo* repo = NULL;
char realpath[PATH_MAX];
char baseurl[PATH_MAX];
int r;
return r;
}
-int pakfire_repo_walk_packages(struct pakfire_repo* self,
+int pakfire_repo_walk_packages(pakfire_repo* self,
int (*callback)(pakfire_ctx* ctx, pakfire_package* pkg, void* data), void* data, int flags) {
pakfire_packagelist* list = NULL;
int r;
return r;
}
-struct pakfire_repo_walk_archives_state {
+typedef struct pakfire_repo_walk_archives_state {
pakfire_repo_walk_archives_callback callback;
void* data;
-};
+} pakfire_repo_walk_archives_state;
static int __pakfire_repo_walk_archives(
pakfire_ctx* ctx, pakfire_package* pkg, void* data) {
- const struct pakfire_repo_walk_archives_state* state = data;
+ const pakfire_repo_walk_archives_state* state = data;
pakfire_archive* archive = NULL;
int r;
return r;
}
-int pakfire_repo_walk_archives(struct pakfire_repo* self,
+int pakfire_repo_walk_archives(pakfire_repo* self,
pakfire_repo_walk_archives_callback callback, void* data, int flags) {
pakfire_packagelist* list = NULL;
int r;
- struct pakfire_repo_walk_archives_state state = {
+ pakfire_repo_walk_archives_state state = {
.callback = callback,
.data = data,
};
#include <solv/repo.h>
-struct pakfire_repo;
+typedef struct pakfire_repo pakfire_repo;
#include <pakfire/archive.h>
#include <pakfire/config.h>
#include <pakfire/pakfire.h>
#include <pakfire/xfer.h>
-int pakfire_repo_create(struct pakfire_repo** repo, struct pakfire* pakfire, const char* name);
-int pakfire_repo_open(struct pakfire_repo** repo, struct pakfire* pakfire, Repo* _repo);
+int pakfire_repo_create(pakfire_repo** repo, struct pakfire* pakfire, const char* name);
+int pakfire_repo_open(pakfire_repo** repo, struct pakfire* pakfire, Repo* _repo);
-struct pakfire_repo* pakfire_repo_ref(struct pakfire_repo* repo);
-struct pakfire_repo* pakfire_repo_unref(struct pakfire_repo* repo);
+pakfire_repo* pakfire_repo_ref(pakfire_repo* repo);
+pakfire_repo* pakfire_repo_unref(pakfire_repo* repo);
-int pakfire_repo_clear(struct pakfire_repo* repo);
+int pakfire_repo_clear(pakfire_repo* repo);
-int pakfire_repo_identical(struct pakfire_repo* repo1, struct pakfire_repo* repo2);
-int pakfire_repo_cmp(struct pakfire_repo* repo1, struct pakfire_repo* repo2);
-int pakfire_repo_count(struct pakfire_repo* repo);
+int pakfire_repo_identical(pakfire_repo* repo1, pakfire_repo* repo2);
+int pakfire_repo_cmp(pakfire_repo* repo1, pakfire_repo* repo2);
+int pakfire_repo_count(pakfire_repo* repo);
-const char* pakfire_repo_get_name(struct pakfire_repo* repo);
+const char* pakfire_repo_get_name(pakfire_repo* repo);
-const char* pakfire_repo_get_description(struct pakfire_repo* repo);
-int pakfire_repo_set_description(struct pakfire_repo* repo, const char* description);
+const char* pakfire_repo_get_description(pakfire_repo* repo);
+int pakfire_repo_set_description(pakfire_repo* repo, const char* description);
-int pakfire_repo_get_enabled(struct pakfire_repo* repo);
-void pakfire_repo_set_enabled(struct pakfire_repo* repo, int enabled);
+int pakfire_repo_get_enabled(pakfire_repo* repo);
+void pakfire_repo_set_enabled(pakfire_repo* repo, int enabled);
-int pakfire_repo_get_priority(struct pakfire_repo* repo);
-void pakfire_repo_set_priority(struct pakfire_repo* repo, int priority);
+int pakfire_repo_get_priority(pakfire_repo* repo);
+void pakfire_repo_set_priority(pakfire_repo* repo, int priority);
-const char* pakfire_repo_get_baseurl(struct pakfire_repo* repo);
-int pakfire_repo_set_baseurl(struct pakfire_repo* repo, const char* baseurl);
+const char* pakfire_repo_get_baseurl(pakfire_repo* repo);
+int pakfire_repo_set_baseurl(pakfire_repo* repo, const char* baseurl);
-pakfire_key* pakfire_repo_get_key(struct pakfire_repo* repo);
+pakfire_key* pakfire_repo_get_key(pakfire_repo* repo);
-const char* pakfire_repo_get_mirrorlist_url(struct pakfire_repo* repo);
-int pakfire_repo_set_mirrorlist_url(struct pakfire_repo* repo, const char* url);
+const char* pakfire_repo_get_mirrorlist_url(pakfire_repo* repo);
+int pakfire_repo_set_mirrorlist_url(pakfire_repo* repo, const char* url);
-pakfire_mirrorlist* pakfire_repo_get_mirrors(struct pakfire_repo* repo);
+pakfire_mirrorlist* pakfire_repo_get_mirrors(pakfire_repo* repo);
#define pakfire_repo_path(repo, path, format, ...) \
__pakfire_repo_path(repo, path, sizeof(path), format, __VA_ARGS__)
-int __pakfire_repo_path(struct pakfire_repo* repo,
+int __pakfire_repo_path(pakfire_repo* repo,
char* path, const size_t length, const char* format, ...)
__attribute__((format(printf, 4, 5)));
-int pakfire_repo_write_config(struct pakfire_repo* repo, FILE* f);
+int pakfire_repo_write_config(pakfire_repo* repo, FILE* f);
-int pakfire_repo_is_installed_repo(struct pakfire_repo* repo);
+int pakfire_repo_is_installed_repo(pakfire_repo* repo);
-int pakfire_repo_read_solv(struct pakfire_repo* repo, FILE *f, int flags);
-int pakfire_repo_write_solv(struct pakfire_repo* repo, FILE *f, int flags);
+int pakfire_repo_read_solv(pakfire_repo* repo, FILE *f, int flags);
+int pakfire_repo_write_solv(pakfire_repo* repo, FILE *f, int flags);
// Cache
PAKFIRE_REPO_CLEAN_FLAGS_DESTROY = (1 << 0),
};
-int pakfire_repo_clean(struct pakfire_repo* repo, int flags);
+int pakfire_repo_clean(pakfire_repo* repo, int flags);
// Scan
-int pakfire_repo_scan(struct pakfire_repo* repo, int flags);
+int pakfire_repo_scan(pakfire_repo* repo, int flags);
// Refresh
-int pakfire_repo_refresh(struct pakfire_repo* repo, int force);
+int pakfire_repo_refresh(pakfire_repo* repo, int force);
// Compose
-int pakfire_repo_write_metadata(struct pakfire_repo* repo, pakfire_key* key);
+int pakfire_repo_write_metadata(pakfire_repo* repo, pakfire_key* key);
int pakfire_repo_compose(struct pakfire* pakfire, const char* path,
pakfire_key* key, const char** files);
#define PAKFIRE_REPO_RESULT "@build"
#define PAKFIRE_REPO_SYSTEM "@system"
-int pakfire_repo_name_equals(struct pakfire_repo* repo, const char* name);
-int pakfire_repo_is_internal(struct pakfire_repo* repo);
-int pakfire_repo_is_local(struct pakfire_repo* repo);
+int pakfire_repo_name_equals(pakfire_repo* repo, const char* name);
+int pakfire_repo_is_internal(pakfire_repo* repo);
+int pakfire_repo_is_local(pakfire_repo* repo);
-char* pakfire_repo_url_replace(struct pakfire_repo* repo, const char* url);
+char* pakfire_repo_url_replace(pakfire_repo* repo, const char* url);
int pakfire_repo_import(struct pakfire* pakfire, pakfire_config* config);
-const char* pakfire_repo_get_path(struct pakfire_repo* repo);
+const char* pakfire_repo_get_path(pakfire_repo* repo);
-void pakfire_repo_has_changed(struct pakfire_repo* repo);
-int pakfire_repo_internalize(struct pakfire_repo* repo, int flags);
-Id pakfire_repo_add_solvable(struct pakfire_repo* repo);
+void pakfire_repo_has_changed(pakfire_repo* repo);
+int pakfire_repo_internalize(pakfire_repo* repo, int flags);
+Id pakfire_repo_add_solvable(pakfire_repo* repo);
#define pakfire_repo_make_path(repo, path, archive, pkg) \
__pakfire_repo_make_path(repo, path, sizeof(path), archive, pkg)
-int __pakfire_repo_make_path(struct pakfire_repo* self,
+int __pakfire_repo_make_path(pakfire_repo* self,
char* path, size_t length, pakfire_archive* archive, pakfire_package* pkg);
-int pakfire_repo_import_archive(struct pakfire_repo* self,
+int pakfire_repo_import_archive(pakfire_repo* self,
pakfire_archive* archive, pakfire_package** package);
int pakfire_repo_download_package(struct pakfire_xfer** xfer,
- struct pakfire_repo* repo, pakfire_package* pkg);
+ pakfire_repo* repo, pakfire_package* pkg);
-int pakfire_repo_add(struct pakfire_repo* repo, const char* path,
+int pakfire_repo_add(pakfire_repo* repo, const char* path,
pakfire_package** package);
void pakfire_repo_free_all(struct pakfire* pakfire);
-Repo* pakfire_repo_get_repo(struct pakfire_repo* repo);
-Repodata* pakfire_repo_get_repodata(struct pakfire_repo* repo);
+Repo* pakfire_repo_get_repo(pakfire_repo* repo);
+Repodata* pakfire_repo_get_repodata(pakfire_repo* repo);
-pakfire_mirrorlist* pakfire_repo_get_mirrorlist(struct pakfire_repo* repo);
+pakfire_mirrorlist* pakfire_repo_get_mirrorlist(pakfire_repo* repo);
-int pakfire_repo_walk_packages(struct pakfire_repo* self,
+int pakfire_repo_walk_packages(pakfire_repo* self,
int (*callback)(pakfire_ctx* ctx, pakfire_package* pkg, void* data), void* data, int flags);
typedef int (*pakfire_repo_walk_archives_callback)
(pakfire_ctx* ctx, pakfire_package* pkg, pakfire_archive* archive, void* data);
-int pakfire_repo_walk_archives(struct pakfire_repo* self,
+int pakfire_repo_walk_archives(pakfire_repo* self,
pakfire_repo_walk_archives_callback callback, void* data, int flags);
#endif /* PAKFIRE_REPO_H */
struct pakfire_repolist {
int nrefs;
- struct pakfire_repo** elements;
+ pakfire_repo** elements;
size_t elements_size;
size_t size;
};
static int pakfire_repolist_grow(pakfire_repolist* list, size_t size) {
- struct pakfire_repo** elements = reallocarray(list->elements,
+ pakfire_repo** elements = reallocarray(list->elements,
list->elements_size + size, sizeof(*list->elements));
if (!elements)
return -errno;
return list->size == 0;
}
-struct pakfire_repo* pakfire_repolist_get(pakfire_repolist* list, size_t index) {
+pakfire_repo* pakfire_repolist_get(pakfire_repolist* list, size_t index) {
if (index >= list->size)
return NULL;
return pakfire_repo_ref(list->elements[index]);
}
-int pakfire_repolist_append(pakfire_repolist* list, struct pakfire_repo* repo) {
+int pakfire_repolist_append(pakfire_repolist* list, pakfire_repo* repo) {
if (!repo)
return EINVAL;
size_t pakfire_repolist_size(pakfire_repolist* list);
int pakfire_repolist_empty(pakfire_repolist* list);
-struct pakfire_repo* pakfire_repolist_get(pakfire_repolist* list, size_t index);
-int pakfire_repolist_append(pakfire_repolist* list, struct pakfire_repo* repo);
+pakfire_repo* pakfire_repolist_get(pakfire_repolist* list, size_t index);
+int pakfire_repolist_append(pakfire_repolist* list, pakfire_repo* repo);
#endif /* PAKFIRE_REPOLIST_H */
char size[128];
int r;
- struct pakfire_repo* repo = pakfire_package_get_repo(pkg);
+ pakfire_repo* repo = pakfire_package_get_repo(pkg);
// Format size
r = pakfire_format_size(size, pakfire_package_get_size(pkg));
}
static int pakfire_transaction_perform(struct pakfire_transaction* transaction) {
- struct pakfire_repo* repo = NULL;
+ pakfire_repo* repo = NULL;
pakfire_db* db;
size_t total_size = 0;
int r;
static int pakfire_transaction_download_package(struct pakfire_transaction* transaction,
pakfire_httpclient* httpclient, pakfire_package* pkg) {
- struct pakfire_repo* repo = NULL;
+ pakfire_repo* repo = NULL;
struct pakfire_xfer* xfer = NULL;
int r;
}
static PyObject* Package_get_repo(PackageObject* self) {
- struct pakfire_repo* repo = pakfire_package_get_repo(self->package);
+ pakfire_repo* repo = pakfire_package_get_repo(self->package);
if (!repo)
Py_RETURN_NONE;
if (!PyArg_ParseTuple(args, "s", &name))
return NULL;
- struct pakfire_repo* repo = pakfire_get_repo(self->pakfire, name);
+ pakfire_repo* repo = pakfire_get_repo(self->pakfire, name);
if (!repo)
Py_RETURN_NONE;
goto ERROR;
for (unsigned int i = 0; i < l; i++) {
- struct pakfire_repo* repo = pakfire_repolist_get(repos, i);
+ pakfire_repo* repo = pakfire_repolist_get(repos, i);
if (!repo)
continue;
#include "package.h"
#include "repo.h"
-PyObject* new_repo(PyTypeObject* type, struct pakfire_repo* repo) {
+PyObject* new_repo(PyTypeObject* type, pakfire_repo* repo) {
RepoObject* self = (RepoObject *)type->tp_alloc(type, 0);
if (self) {
self->repo = pakfire_repo_ref(repo);
typedef struct {
PyObject_HEAD
- struct pakfire_repo* repo;
+ pakfire_repo* repo;
int clean;
} RepoObject;
extern PyTypeObject RepoType;
-PyObject* new_repo(PyTypeObject* type, struct pakfire_repo* repo);
+PyObject* new_repo(PyTypeObject* type, pakfire_repo* repo);
#endif /* PYTHON_PAKFIRE_REPO_H */
int r = EXIT_FAILURE;
pakfire_archive* archive = NULL;
- struct pakfire_repo* repo = NULL;
+ pakfire_repo* repo = NULL;
pakfire_package* package = NULL;
// Open archive
static int test_add_package(const struct test* t) {
pakfire_package* package = NULL;
pakfire_db* db = NULL;
- struct pakfire_repo* repo = NULL;
+ pakfire_repo* repo = NULL;
pakfire_archive* archive = NULL;
int r = EXIT_FAILURE;
static int test_packages(const struct test* t) {
pakfire_parser* parser = NULL;
pakfire_package* pkg = NULL;
- struct pakfire_repo* repo = NULL;
+ pakfire_repo* repo = NULL;
char* s = NULL;
int r = EXIT_FAILURE;
static int test_create(const struct test* t) {
pakfire_packager* packager = NULL;
pakfire_package* pkg = NULL;
- struct pakfire_repo* repo = NULL;
+ pakfire_repo* repo = NULL;
int r = EXIT_FAILURE;
ASSERT_SUCCESS(pakfire_repo_create(&repo, t->pakfire, "test"));
int r = EXIT_FAILURE;
// Fetch the dummy repository
- struct pakfire_repo* repo = pakfire_get_repo(t->pakfire, PAKFIRE_REPO_DUMMY);
+ pakfire_repo* repo = pakfire_get_repo(t->pakfire, PAKFIRE_REPO_DUMMY);
ASSERT(repo);
ASSERT_SUCCESS(pakfire_package_create(&pkg1, t->pakfire, repo,
#define TEST_PKG1_PATH "data/beep-1.3-2.ip3.x86_64.pfm"
static int test_scan(const struct test* t) {
- struct pakfire_repo* repo = NULL;
+ pakfire_repo* repo = NULL;
char baseurl[1024];
int r = EXIT_FAILURE;
FILE* f = NULL;
}
static int test_compose(const struct test* t) {
- struct pakfire_repo* repo = NULL;
+ pakfire_repo* repo = NULL;
int r = EXIT_FAILURE;
// Create a temporary working directory