razor.h
changeset 191 6e94ebe58141
parent 169 2d0ad2111cb0
child 192 55b177b689c0
     1.1 --- a/razor.h	Wed Mar 12 11:53:10 2008 -0400
     1.2 +++ b/razor.h	Sun Apr 06 19:34:58 2008 -0400
     1.3 @@ -107,56 +107,20 @@
     1.4  	RAZOR_PACKAGE_UNSATISFIABLE,
     1.5  };
     1.6  
     1.7 -struct razor_transaction_package {
     1.8 -	const char *name, *old_version, *new_version;
     1.9 -	struct razor_package *old_package, *new_package;
    1.10 -	enum razor_transaction_package_state state;
    1.11 -
    1.12 -	/* dep_package is the name of the package that resulted in
    1.13 -	 * this entry being created (or NULL if the user requested the
    1.14 -	 * install/remove), with the other dep_ fields providing
    1.15 -	 * additional information.
    1.16 -	 *
    1.17 -	 * For INSTALL, if dep_type is REQUIRES, then dep_package
    1.18 -	 * required something that this package provides. If dep_type
    1.19 -	 * is CONFLICTS, then dep_package is a package that conflicted
    1.20 -	 * with an older version of this package, forcing an upgrade.
    1.21 -	 *
    1.22 -	 * For REMOVE, if dep_type is REQUIRES, then dep_package is a
    1.23 -	 * package that is being removed. If dep_type is OBSOLETES,
    1.24 -	 * then dep_package is a package that obsoletes this one.
    1.25 -	 *
    1.26 -	 * For OLD_CONFLICT or NEW_CONFLICT, dep_package is an
    1.27 -	 * existing package that conflicts with this one. The
    1.28 -	 * conflicting property comes from the already-installed
    1.29 -	 * package for OLD_CONFLICT, or the to-be-installed package
    1.30 -	 * for NEW_CONFLICT.
    1.31 -	 *
    1.32 -	 * For UNSATISFIABLE, the dep_ fields are as for an INSTALL,
    1.33 -	 * but the name field will be NULL.
    1.34 -	 */
    1.35 -	const char *dep_package;
    1.36 -	enum razor_property_type dep_type;
    1.37 -	const char *dep_property;
    1.38 -	enum razor_version_relation dep_relation;
    1.39 -	const char *dep_version;
    1.40 -};
    1.41 -
    1.42 -struct razor_transaction {
    1.43 -	int package_count, errors;
    1.44 -	struct razor_transaction_package *packages;
    1.45 -
    1.46 -	struct razor_set *system, *upstream;
    1.47 -};
    1.48 -
    1.49  struct razor_transaction *
    1.50  razor_transaction_create(struct razor_set *system, struct razor_set *upstream,
    1.51  			 int update_count, const char **update_packages,
    1.52  			 int remove_count, const char **remove_packages);
    1.53 -void razor_transaction_describe(struct razor_transaction *trans);
    1.54 +int razor_transaction_describe(struct razor_transaction *trans);
    1.55  struct razor_set *razor_transaction_run(struct razor_transaction *trans);
    1.56  void razor_transaction_destroy(struct razor_transaction *trans);
    1.57  
    1.58 +/* Temporary helper for test suite. */
    1.59 +int razor_transaction_unsatisfied_property(struct razor_transaction *trans,
    1.60 +					   const char *name,
    1.61 +					   enum razor_version_relation rel,
    1.62 +					   const char *version);
    1.63 +
    1.64  /* Importer interface; for building a razor set from external sources,
    1.65   * like yum, rpmdb or razor package files. */
    1.66