librazor/razor.h
changeset 370 a3e288343fe7
parent 368 ea743486ba6f
child 372 6e93e5485947
     1.1 --- a/librazor/razor.h	Wed Jun 03 08:26:09 2009 +0100
     1.2 +++ b/librazor/razor.h	Thu Jul 02 11:31:03 2009 +0100
     1.3 @@ -1,6 +1,7 @@
     1.4  /*
     1.5   * Copyright (C) 2008  Kristian Høgsberg <krh@redhat.com>
     1.6   * Copyright (C) 2008  Red Hat, Inc
     1.7 + * Copyright (C) 2009  J. Ali Harlow <ali@juiblex.co.uk>
     1.8   *
     1.9   * This program is free software; you can redistribute it and/or modify
    1.10   * it under the terms of the GNU General Public License as published by
    1.11 @@ -36,7 +37,11 @@
    1.12  	RAZOR_DETAIL_SUMMARY,
    1.13  	RAZOR_DETAIL_DESCRIPTION,
    1.14  	RAZOR_DETAIL_URL,
    1.15 -	RAZOR_DETAIL_LICENSE
    1.16 +	RAZOR_DETAIL_LICENSE,
    1.17 +	RAZOR_DETAIL_PREUNPROG,
    1.18 +	RAZOR_DETAIL_PREUN,
    1.19 +	RAZOR_DETAIL_POSTUNPROG,
    1.20 +	RAZOR_DETAIL_POSTUN
    1.21  };
    1.22  
    1.23  enum razor_property_flags {
    1.24 @@ -103,6 +108,9 @@
    1.25  void
    1.26  razor_package_get_details(struct razor_set *set,
    1.27  			  struct razor_package *package, ...);
    1.28 +int
    1.29 +razor_package_remove(struct razor_set *set, struct razor_package *package,
    1.30 +		     const char *root);
    1.31  
    1.32  
    1.33  /**
    1.34 @@ -234,6 +242,8 @@
    1.35   * from packages from one or more other package sets.
    1.36   **/
    1.37  
    1.38 +struct razor_rpm;
    1.39 +
    1.40  struct razor_transaction *
    1.41  razor_transaction_create(struct razor_set *system, struct razor_set *upstream);
    1.42  void razor_transaction_install_package(struct razor_transaction *transaction,
    1.43 @@ -242,10 +252,13 @@
    1.44  				      struct razor_package *package);
    1.45  void razor_transaction_update_package(struct razor_transaction *trans,
    1.46  				      struct razor_package *package);
    1.47 +void razor_transaction_fixup_package(struct razor_transaction *trans,
    1.48 +				     struct razor_package *package,
    1.49 +				     struct razor_rpm *rpm);
    1.50  void razor_transaction_update_all(struct razor_transaction *transaction);
    1.51  int razor_transaction_resolve(struct razor_transaction *trans);
    1.52  int razor_transaction_describe(struct razor_transaction *trans);
    1.53 -struct razor_set *razor_transaction_finish(struct razor_transaction *trans);
    1.54 +struct razor_set *razor_transaction_commit(struct razor_transaction *trans);
    1.55  void razor_transaction_destroy(struct razor_transaction *trans);
    1.56  
    1.57  /* Temporary helper for test suite. */
    1.58 @@ -264,7 +277,6 @@
    1.59   **/
    1.60  
    1.61  struct razor_relocations;
    1.62 -struct razor_rpm;
    1.63  
    1.64  struct razor_relocations *razor_relocations_create(void);
    1.65  void razor_relocations_add(struct razor_relocations *relocations,
    1.66 @@ -276,6 +288,7 @@
    1.67  void razor_relocations_destroy(struct razor_relocations *relocations);
    1.68  
    1.69  struct razor_rpm *razor_rpm_open(const char *filename);
    1.70 +void razor_rpm_get_details(struct razor_rpm *rpm, ...);
    1.71  void razor_rpm_set_relocations(struct razor_rpm *rpm,
    1.72  			       struct razor_relocations *relocations);
    1.73  int razor_rpm_install(struct razor_rpm *rpm, const char *root);
    1.74 @@ -332,6 +345,10 @@
    1.75  				const char *description,
    1.76  				const char *url,
    1.77  				const char *license);
    1.78 +void razor_importer_add_script(struct razor_importer *importer,
    1.79 +			       enum razor_property_flags script,
    1.80 +			       const char *program,
    1.81 +			       const char *body);
    1.82  void razor_importer_add_property(struct razor_importer *importer,
    1.83  				 const char *name,
    1.84  				 uint32_t flags,