diff -r ea743486ba6f -r d7eea3164151 librazor/razor.h --- a/librazor/razor.h Wed Jun 03 08:26:09 2009 +0100 +++ b/librazor/razor.h Thu Jul 02 11:31:45 2009 +0100 @@ -1,6 +1,7 @@ /* * Copyright (C) 2008 Kristian Høgsberg * Copyright (C) 2008 Red Hat, Inc + * Copyright (C) 2009 J. Ali Harlow * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -36,7 +37,11 @@ RAZOR_DETAIL_SUMMARY, RAZOR_DETAIL_DESCRIPTION, RAZOR_DETAIL_URL, - RAZOR_DETAIL_LICENSE + RAZOR_DETAIL_LICENSE, + RAZOR_DETAIL_PREUNPROG, + RAZOR_DETAIL_PREUN, + RAZOR_DETAIL_POSTUNPROG, + RAZOR_DETAIL_POSTUN }; enum razor_property_flags { @@ -103,6 +108,9 @@ void razor_package_get_details(struct razor_set *set, struct razor_package *package, ...); +int +razor_package_remove(struct razor_set *set, struct razor_package *package, + const char *root); /** @@ -234,6 +242,8 @@ * from packages from one or more other package sets. **/ +struct razor_rpm; + struct razor_transaction * razor_transaction_create(struct razor_set *system, struct razor_set *upstream); void razor_transaction_install_package(struct razor_transaction *transaction, @@ -242,10 +252,13 @@ struct razor_package *package); void razor_transaction_update_package(struct razor_transaction *trans, struct razor_package *package); +void razor_transaction_fixup_package(struct razor_transaction *trans, + struct razor_package *package, + struct razor_rpm *rpm); void razor_transaction_update_all(struct razor_transaction *transaction); int razor_transaction_resolve(struct razor_transaction *trans); int razor_transaction_describe(struct razor_transaction *trans); -struct razor_set *razor_transaction_finish(struct razor_transaction *trans); +struct razor_set *razor_transaction_commit(struct razor_transaction *trans); void razor_transaction_destroy(struct razor_transaction *trans); /* Temporary helper for test suite. */ @@ -264,7 +277,6 @@ **/ struct razor_relocations; -struct razor_rpm; struct razor_relocations *razor_relocations_create(void); void razor_relocations_add(struct razor_relocations *relocations, @@ -276,6 +288,7 @@ void razor_relocations_destroy(struct razor_relocations *relocations); struct razor_rpm *razor_rpm_open(const char *filename); +void razor_rpm_get_details(struct razor_rpm *rpm, ...); void razor_rpm_set_relocations(struct razor_rpm *rpm, struct razor_relocations *relocations); int razor_rpm_install(struct razor_rpm *rpm, const char *root); @@ -332,6 +345,10 @@ const char *description, const char *url, const char *license); +void razor_importer_add_script(struct razor_importer *importer, + enum razor_property_flags script, + const char *program, + const char *body); void razor_importer_add_property(struct razor_importer *importer, const char *name, uint32_t flags,