2003-02-21  Joe Shaw  <joe@ximian.com>

	* rc-world.c (rc_world_touch_channel_sequence_number): Fix a
	cut-and-paste-o where we were signaling that the subscriptions
	seqno had changed, not the channel seqno.

2003-02-07  Joe Shaw  <joe@ximian.com>

	* rc-debman.c (query_all_read_line_cb): Set the arch to NOARCH by
	default, read the "architecture" setting out of the
	/var/lib/dpkg/status file if it's there.

2003-02-06  Joe Shaw  <joe@ximian.com>

	* rc-rpmman-types.h, rc-rpmman.h: Change RPM includes to remove
	the directory; our CFLAGS will be set to the actual include
	directory for RPM.

2003-02-04  Jon Trowbridge  <trow@ximian.com>

	* rc-xml.c (rc_xml_node_to_package_dep_internal): Free some
	leaked strings.

	* rc-package-match.c (rc_package_match_set_dep): Ref the new dep
	before unreffing the old dep, just in case we are in some weird
	situation where they are equal.  It never hurts to be paranoid.
	(rc_package_match_from_xml_node): Unref the dep we created from
	the xml node after we call rc_package_match_set_dep.  This fixes a
	small memory leak.

	* rc-world.c (rc_world_get_system_packages): Unref the contents of
	system_packages before freeing the slist.  If our system query
	fails, free the slist.  (Probably fixes most of #37576)

2003-01-24  Jon Trowbridge  <trow@ximian.com>

	* rc-queue-item.c (require_item_process): If there are no
	installable providers, give a slightly more detailed error
	message.

	* rc-resolver.c (rc_resolver_resolve_dependencies): Flag the
	temporary 'Local Packages' channel as silent.

	* rc-world.c (rc_world_add_channel_with_priorities): Added a
	'is_silent' argument, which (duh) causes the new channel to be
	flagged as silent.
	(rc_world_add_channel): Rather than add a new arg to this
	function, just always make the created channel non-silent.
	(rc_world_remove_channel): Don't touch the sequence numbers if the
	channel is silent.
	(rc_world_add_package): Ditto.
	(rc_world_remove_package): Ditto.
	(rc_world_remove_packages): Ditto.

	* rc-channel.c (rc_channel_get_silent): Added.  Test if a channel
	is flagged as silent.
	(rc_channel_set_subscription): If a channel is marked as 'silent',
	don't change the world sequence number if its subscription status
	changes.

	* rc-channel-private.h: Added "silent" flag to the
	RCChannel struct.

2003-01-22  Jon Trowbridge  <trow@ximian.com>

	* rc-arch.c: Make "all" (which is what debian uses) a synonym for
	"noarch".

	* rc-world-import.c (rc_world_add_packages_from_xml): Removed
	GHashTable *packages, which is no longer being used for anything.
	(fill_debian_package): Set the architecture properly when
	loading debian package files.

2003-01-21  Joe Shaw  <joe@ximian.com>

	* rc-rpmman.c (depends_fill_helper): We were being way too
	aggressive with some memory management but it never seems to bite
	us with RPM 4.  RPM 3, however, is a different matter.  Revert to
	the previous behaviour, but use my own free_v() function instead
	of g_strfreev() to fix the potential memory leak.

2003-01-21  Jon Trowbridge  <trow@ximian.com>

	* rc-xml.c (parser_package_end): Removed all of the arch-related
	checks.  That all happens inside of rc_world_add_packages_from_xml
	now.
	(rc_package_sax_context_done): Since arch checks are being done by
	the RCWorld, this is all much simpler.

	* rc-world-import.c (rc_world_add_packages_from_xml): Removed all
	arch-related checks.  That all happens inside of
	rc_world_add_package now.

	* rc-world.c (rc_world_add_package): Do all arch checks when a
	package is added to the world, taking version numbers into
	account.  Now a higher version number trumps a superior arch
	score.  This function returns a gboolean instead of void: if
	the package actually gets added it returns TRUE.  If not
	(for example, if the arch is bad), return FALSE.

2003-01-08  Joe Shaw  <joe@ximian.com>

	* Makefile.am: Remove rc-pretty-name.[ch]

	* rc-package.c (rc_package_compare_pretty_name): Added. Compares
	the packages' pretty names, falling back to the regular names.
	(rc_package_slist_sort_by_pretty_name): Changed to use
	rc_package_compare_pretty_name(), which gets it from the RCPackage
	structure instead of looking it up in a hash from the old
	prettypackages.xml file.

	* rc-package.h: Reorder some stuff, add pretty_name.

	* rc-xml.c (parser_package_end): Parse the "pretty_name" out of
	the XML in the <package> section.

2002-12-18  Joe Shaw  <joe@ximian.com>

	* rc-verification.c (rc_verify_gpg): When the $HOME environment
	variable isn't set, gnupg will have a fit when trying to create
	the $HOME/.gnupg directory and bail out.  So we create a temporary
	directory in /tmp and create a temporary environment setting that
	as $HOME and pass it into our g_spawn function calls.  Clean up
	after we're done.

2002-12-16  Joe Shaw  <joe@ximian.com>

	* rc-distro.c: Get rid of <command> tags and replace them with
	<os_name> and <os_release>

	* distributions.xml: Replace <command> tags with <os_name> and
	<os_release> tags.

2002-12-10  Joe Shaw  <joe@ximian.com>

	* rc-resolver-info.c (rc_resolver_info_to_string): Change
	"replaces" to "replaced by"

2002-12-06  Joe Shaw  <joe@ximian.com>

	* rc-rpmman.c: Pass in the address to a gboolean as the third
	parameter to rpmReadPackageHeader() which tells us if we're
	dealing with a source package.  If we are, abort out since we
	don't handle source packages right now.

2002-12-05  Jon Trowbridge  <trow@ximian.com>

	* rc-world-subscriptions.c (clear_sub_cb): When resetting our
	subscriptions, maintain the current subscription state for
	transient channels. (Fixes #35148)

2002-12-05  Joe Shaw  <joe@ximian.com>

	* rc-world.c (rc_world_add_channel_with_priorities): Added.
	Allows the channel creator to set priorities for dependency
	resolution.

2002-12-03  Joe Shaw  <joe@ximian.com>

	* distributions.xml: Change Woody to supported.

	* rc-arch.c (rc_arch_from_string): Handle NULL argument.

	* rc-xml.c (rc_xml_strip): Added.  Returns NULL if g_strstrip()
	returns an empty string.
	(parser_package_end, parser_update_end): Use rc_xml_strip()
	instead of g_strstrip().

2002-12-02  Joe Shaw  <joe@ximian.com>

	* rc-rpmman.c: Added a #define for RPMTAG_REMOVETID

2002-11-22  Jon Trowbridge  <trow@ximian.com>

	* rc-xml.c (rc_package_update_to_xml_node): Make sure that
	update->package_url isn't NULL or empty before writing it out in
	the XML.  (Probably fixes bug #34499.)

2002-11-22  Joe Shaw  <joe@ximian.com>

	* rc-rpmman.c (rc_rpmman_package_is_repackaged): Added.  Opens up
	the package file and looks for the header to indicate that it's a
	repackaged RPM.
	(split_rpm): Remove the hack that we used before to guess that it
	was a repackaged RPM as it won't work in 4.1.

2002-11-21  Joe Shaw  <joe@ximian.com>

	* rc-package.c (rc_package_copy, rc_package_slist_copy): Removed.
	Everything should just use rc_package_ref().

	* rc-debman.c (package_list_append): Change the one instance of
	rc_package_copy() in libredcarpet to rc_package_ref().

2002-11-21  Joe Shaw  <joe@ximian.com>

	* packer.pl: Use binmode so perl 5.8.0 doesn't read in the data
	as UTF-8.  Patch from Michael Doppler.

2002-11-18  Joe Shaw  <joe@ximian.com>

	* rc-xml.c (rc_package_to_xml_node): Write the description out to
	the description field, not the summary.

2002-11-14  Joe Shaw  <joe@ximian.com>

	* rc-dep-or.c (rc_dep_string_to_or_dep_slist): Return NULL if
	there isn't a trailing parenthesis.

2002-11-14  Joe Shaw  <joe@ximian.com>

	* rc-debman.c (rc_debman_is_database_changed): Destroy our cache
	of packages when the db changes out from underneath us.
	(unlock_database, rc_debman_init): Make the timeouts 5 seconds,
	like the RPM backend.

	* rc-rpmman.c (open_database): Fix an occasional glib warning.

2002-11-14  Joe Shaw  <joe@ximian.com>

	* rc-package-dep.c (rc_package_dep_verify_relation): Go back to
	evaluating the version and release separately as that wasn't quite
	right, instead use the capability as to whether we should always
	evaluate the release or not.

	* rc-packman.h: Rename RC_PACKMAN_CAP_VERSION_AND_RELEASE to
	RC_PACKMAN_CAP_ALWAYS_VERIFY_RELEASE.

	* rc-debman.c (rc_debman_init): Ditto.

2002-11-14  Joe Shaw  <joe@ximian.com>

	* rc-packman.h: Add a huge comment block describing what each of
	the capabilities does.  Remove the SELF_CONFLICT capability since
	it wasn't being used and it's handled for all backends by the
	resolver.  Renamed LEGACY_EPOCH_HANDLING to IGNORE_ABSENT_EPOCHS
	because it makes more sense to me.  Add a new VERSION_AND_RELEASE
	capability which does Debian's relation logic on version+release
	as one.

	* rc-debman.c (rc_debman_init): Set capabilities to
	VERSION_AND_RELEASE.

	* rc-rpmman.c (rc_rpmman_init):
	s/LEGACY_EPOCH_HANDLING/IGNORE_ABSENT_EPOCHS.

	* rc-package-dep.c (rc_package_dep_verify_relation): If the
	VERSION_AND_RELEASE capability is set, compare version and release
	at once instead of separately.  Also
	s/LEGACY_EPOCH_HANDLING/IGNORE_ABSENT_EPOCHS.

	* rc-queue-item.c (conflict_process_cb): Add a comment about how
	we ignore when we conflict with ourself.  Mention that some of the
	obsolete handling should probably be a packman capability
	
2002-11-14  Joe Shaw  <joe@ximian.com>

	* rc-debman-general.c (rc_debman_fill_depends): Don't muck around
	with the dep if it's NULL.

	* rc-debman.c (query_all_read_line_cb, rc_debman_query_file):
	Initialize the package's obsoletes array.

	* rc-package-dep.c (rc_package_dep_array_from_slist): Allow the
	argument to be NULL, and short circuit in the case where the list
	is valid but empty.

	* rc-util.c (count_gzip_header, rc_uncompress_memory,
	rc_compress_memory, rc_uncompress_xml): Make the buffers const.

	* rc-world-import.c (rc_world_add_channel_from_buffer,
	rc_world_add_packages_from_buffer, rc_world_parse_helix,
	rc_world_parse_debian, rc_world_parse_redhat): Make the buffers
	const.
	(rc_world_parse_debian): Rewrote the debian Packages file parser
	to (a) be cleaner and (b) deal with entries that span multiple
	lines.  It's a little bit slower than the old one, by about .4
	seconds, and there's plenty of room to speed it up.  Make it
	initialize the obsoletes package dep array, and remove a lot of
	redundant code.

	* rc-xml.c (rc_package_sax_context_parse_chunk): Make the buffer
	const.

2002-11-11  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (close_database): do nothing if the database isn't
	open
	(open_database): set the db_watcher id to 0 when we
	g_source_remove it
	(rc_rpmman_finalize): remove the db_watcher timeout when we
	finalize the object to avoid crashing, d'oh

2002-11-05  Jon Trowbridge  <trow@ximian.com>

	* rc-world-import.c (refresh_channel_from_dir): If there are
	multiple packages w/ the same name in the directory, filter out
	all but the one with the highest version number.  This fixes
	half of bug #33323.

	* rc-queue-item.c (require_item_process): Set a meaningful branch
	label.  This is helpful when debugging dependency problems.
	(branch_item_destroy): Free the branch label.
	(branch_item_to_string): Include the branch label in the
	stringification.
	(rc_queue_item_branch_set_label): Added.  Attaches a label to a
	branch item.  This label is not user-visible, unless they are
	looking at debugging output.
	(install_item_process): Added log info to the uninstall items we
	construct to handle removals due to conflicts with the installed
	package.  (Fixes bug #33312)

2002-11-01  Jon Trowbridge  <trow@ximian.com>

	* rc-world-import.c (rc_world_add_channel_from_directory):
	Increase the priority of mounted channels.

2002-10-31  Joe Shaw  <joe@ximian.com>

	* distributions.xml: Add Mandrake 9 and SuSE 8.1 as supported
	distros.  Change Red Hat 8 to supported.  Add Debian Woody as
	presupported.

2002-10-23  Joe Shaw  <joe@ximian.com>

	* rc-rpmman.c (rc_rpmman_database_filename): Added.  Returns the
	filename of the RPM database, based on rpmman->rpmroot, the
	%{_dbpath} macro, and which version of RPM is being run (v3 or
	v4).
	(rc_rpmman_is_database_changed, open_database): Use new function.
	(open_database): Look for the __db.0xx files in the right location,
	as well.

	* rc-rpmman.h: Add rpmGetPath().

2002-10-24  Jon Trowbridge  <trow@ximian.com>

	* rc-world-dump.c (rc_world_dump_to_xml): Write the world's locks
	out in the dump XML.
	(rc_world_undump_from_xml): Read the locks from the dump XML.

	* rc-package-match.c (rc_package_match_from_xml_node): We need to
	extract the RCPackageDep from the xml node, not from the node's
	child.

2002-10-23  Jon Trowbridge  <trow@ximian.com>

	* rc-world-import.c (rc_world_add_packages_from_xml): When pulling
	in packages, don't do any filtering by architecture on system
	packages.  This lets us reproduce broken systems with multiple
	installs when undumping.

2002-10-18  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: only include rpm-stubs.h in the non-static case
	(rc_rpmman_query_file): if we've opened the file but it's not a
	valid RPM file, we still have to close it before we return.
	(write_object): only compile in the non-static case

2002-10-17  Jon Trowbridge  <trow@ximian.com>

	* rc-package-match.c (rc_package_match_new): Initialize the
	->importance field to RC_IMPORTANCE_INVALID.
	(rc_package_match_equal): Added.
	(rc_package_match_test): Handle the case of packages whose channel
	is NULL.

	* rc-world.c (rc_world_add_lock): Append to the list of locks.
	This is less annoying, since newly-added locks show up at the end
	of the list.

2002-10-11  Joe Shaw  <joe@ximian.com>

	* rc-md5.c (rc_md5_digest, rc_md5_digest_from_string): Plug a leak.

	* rc-md5.c (rc_md5_string): Renamed to rc_md5_digest().
	(rc_md5_from_string, rc_md5_digest_from_string): Added.

	* rc-verification.c (rc_verify_md5_string): Change to
	rc_md5_digest().

2002-10-10  Joe Shaw  <joe@ximian.com>

	* rc-rpmman.h (RCRpmman): rpmDefineMacro() actually takes a
	MacroContext *.  Fixes the build against 3.0.6.

2002-10-10  Joe Shaw  <joe@ximian.com>

	* rc-packman.[ch]: Change the "perform" gboolean on
	rc_packman_transact() to be a bitfield.  Create the
	RC_TRANSACT_FLAG_NO_ACT and RC_TRANSACT_FLAG_REPACKAGE flags.  Add
	the RC_PACKMAN_CAP_REPACKAGING capability.
	(rc_packman_{set|get}_repackage_dir): Added.

	* rc-debman.c (do_unpack, rc_debman_transact): update for the
	above flags change.

	* rc-package-spec.c (rc_package_spec_slist_find_name): Make the
	name argument const.

	* rc-rpmman.c (rc_rpmman_transact): Update for the flags change.
	If we're on RPM 4.0.4 or greater and the REPACKAGE flag is set,
	define an RPM macro with the repackage directory.  If we can read
	the signature header in the RPM, proceed as normal.  If we get an
	RPMRC_BADSIZE return value and we're on 4.0.4, we're probably
	trying to install a repackaged RPM (which are technically
	invalid).
	(load_fake_syms, load_rpm_syms): Get rpmDefineMacro out of the rpm
	library.
	(rc_rpmman_init): If we're on RPM 4.0.4, add the REPACKAGING
	capability.

2002-10-10  Jon Trowbridge  <trow@ximian.com>

	* Makefile.am: Added rc-package-match.c and rc-package-match.h to
	the build.

	* libredcarpet.h: Added rc-package-match.h.

	* rc-world-import.c (rc_world_add_channel_from_directory): Added.
	Allows the contents of a directory full of packages to be added to
	the world as a custom channel.

	* rc-world-subscriptions.c (to_xml_cb): Don't write out
	subscription XML for transient channels.

	* rc-resolver.c (rc_resolver_resolve_dependencies): Set the
	channel id and base id to zero when we create our local packages
	channel.  (They will now get replaced by valid unused ids by
	rc_world_add_channel.)

	* rc-resolver-queue.c (rc_resolver_queue_add_package_to_install):
	Flag the initial install items as explicitly requested.
	(rc_resolver_queue_add_package_to_remove): Flag the initial remove
	items as explicitly requested.

	* rc-queue-item.c (install_item_process): If this install was
	explicitly requested and is an upgrade, flag the uninstall half of
	the operation as also being explicitly requested.
	(rc_queue_item_install_set_explicitly_requested): Added.
	(require_process_cb): Don't consider the provider if it is locked.
	(require_item_process): Pass the world via the info struct.  (We
	need it when checking if packages are locked.)
	(uninstall_item_process): Fail if we are trying to uninstall a
	locked package and it hasn't been explicitly requested.
	(rc_queue_item_uninstall_set_explicitly_requested): Added.

	* rc-world.c (rc_world_free): Free our package locks.
	(rc_world_add_channel): If the channel_id or base_id is zero,
	generate a valid, unused id.  Flag TYPE_UNKNOWN channels as
	transient.
	(rc_world_add_lock): Added.
	(rc_world_remove_lock): Added.
	(rc_world_clear_locks): Added.
	(rc_world_foreach_lock): Added.
	(rc_world_package_is_locked): Added.
	(rc_world_add_package): Treat "recommends" as requires.  This is
	what Debian policy says we should do.
	(rc_world_foreach_package_by_match): Added.
	(foreach_upgrade_cb): Don't show locked packages when iterating
	available upgrades.
	(get_best_upgrade_cb): Don't consider locked packages when looking
	for the best upgrade.
	(system_upgrade_cb): Skip locked packages when look for system
	upgrades.

	* rc-package-match.h:
	* rc-package-match.c: Added.

	* rc-channel.c (rc_channel_has_refresh_magic): Added.
	(rc_channel_use_refresh_magic): Added.
	(rc_channel_get_transient): Added.

	* rc-channel-private.h: Added refresh_magic hook and transient
	flag to RCChannel struct.

2002-10-01  Joe Shaw  <joe@ximian.com>

	* rc-util.c (rc_rmdir): If S_ISSOCK is defined, remove any sockets
	in the directory as well.

2002-09-27  Joe Shaw  <joe@ximian.com>

	* rc-rpmman.c (split_rpm): Don't free the buffer we get back from
	headerGetEntry() for the md5 signature.  It causes a double free
	and a crash on SuSE.

2002-09-23  Ian Peters  <itp@ximian.com>

	* rc-arch.c (rc_arch_get_system_arch): handle a wider range of
	uname return values

2002-09-20  Joe Shaw  <joe@ximian.com>

	* rc-distro.c (sax_end_element): Check to make sure the arch score
	is greater than -1, not non-zero.  I guess Ian would have never
	caught this bug with his crappy processor.

2002-09-19  Joe Shaw  <joe@ximian.com>

	* rc-world-subscriptions.c (rc_world_export_subscriptions_to_xml):
	When we're writing out our old subscriptions, if one is being
	handled by the world, skip it.

2002-09-18  Ian Peters  <itp@ximian.com>

	* rc-verification.h: add RC_VERIFICATION_TYPE_SANITY

	* rc-rpmman.c (rc_rpmman_verify): if we're unable to split the rpm
	into header and payload, return a failed sanity verification, to
	make life easier on joe

2002-09-11  Jon Trowbridge  <trow@ximian.com>

	* rc-channel.c (rc_channel_set_subscription): If we changed the
	state of the channel's subscription, call
	rc_world_touch_sequence_number on the channel's world so that we
	can detect the change.

	* rc-world.c (rc_world_touch_sequence_number): Added.  Marks the
	world as changed so that the sequence number will increment.

2002-09-09  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: missing include

2002-09-09  Joe Shaw  <joe@ximian.com>

	* rc-rpmman.c: Add some missing header includes.

2002-09-06  Joe Shaw  <joe@ximian.com>

	* rc-rpmman.c (rc_rpmman_verify): Fix a typo.  We want a bitwise
	and, not a logical and.

2002-09-04  Jon Trowbridge  <trow@ximian.com>

	* rc-channel.c (rc_channel_get_subs_file): Added an accessor for
	the channel's subscribed file.
	(rc_channel_get_unsubs_file): Add an accessor for the channel's
	unsubscribed file.

	* rc-package-spec.c (rc_package_spec_to_str): Produce nice-looking
	output if the spec's version is empty. (Bug #29736)
	(rc_package_spec_version_to_str): Be careful to not print a "-" in
	the spec version string if it isn't needed.  (Also bug #29736)

	* rc-resolver-context.c (rc_resolver_context_uninstall_package):
	Make the "can't uninstall to-be-installed" error message a bit
	more sane. (Also bug #29736)
	
2002-09-03  Jon Trowbridge  <trow@ximian.com>

	* rc-xml.c (parser_package_end): We need to get the file_size and
	installed_size from the most recent RCPackageUpdate and copy it
	into the RCPackage.

2002-08-29  Jon Trowbridge  <trow@ximian.com>

	* rc-resolver.c (rc_resolver_free): Clean up our list of extra
	initial queue items.
	(verify_system_cb): Insertion-sort our list of packages.
	(rc_resolver_verify_system): Walk across our list of installed
	packages and look for cases where we have installed multiple
	packages with the same name.  For each such case, construct a set
	of group item for removing each of the packages but one.  Then
	bundle all of the group items into a branch item and add it to our
	list of extras.
	(rc_resolver_resolve_dependencies): Add the contents of
	initial_items to our newly-constructed queue.

	* rc-resolver-queue.c (rc_resolver_queue_add_item): Added.  This
	is the sort of thing we should have an accessor for, even if it is
	trivial.
	(rc_resolver_queue_add_package_to_install): Use
	rc_resolver_queue_add_item.
	(rc_resolver_queue_add_package_to_remove): Ditto.
	(rc_resolver_queue_add_package_to_verify): Ditto.
	(rc_resolver_queue_add_extra_dependency): Ditto.
	(rc_resolver_queue_add_extra_conflict): Ditto.

	* rc-queue-item.h: Added RC_QUEUE_ITEM_TYPE_GROUP to
	RCQueueItemType enum.  Added definition of RCQueueItem_Group
	struct and prototypes for group functions.

	* rc-queue-item.c (require_item_cmp): Added. A comparison function
	for require items.
	(rc_queue_item_new_require): Put require_item_cmp in the require
	vtable.
	(conflict_item_cmp): Added.  A comparison function for conflict
	items.
	(rc_queue_item_new_conflict): Put conflict_item_cmp in the require
	vtable.
	(group_item_process): Added.  Functionality for group items.
	(group_item_destroy): Ditto.
	(group_item_copy): Ditto.
	(group_item_cmp): Ditto.
	(group_item_to_string): Ditto.
	(rc_queue_item_new_group): Ditto.
	(rc_queue_item_group_add_item): Ditto.

2002-08-28  Jon Trowbridge  <trow@ximian.com>

	* rc-queue-item.c (install_item_process): If we are in
	verification mode and it looks like our install is about to fail,
	don't let it happen.  Instead, back out the install and remove
	whatever packages caused us to need to install this thing in the
	first place.  Set the is_soft mode on our install and upgrade
	operation if we are in verification mode.
	(require_item_process): If we are in verification mode, we always
	need to try the uninstall branch.

	* rc-resolver.c (rc_resolver_verify_system): Set the ->verifying
	flag to TRUE.
	(rc_resolver_resolve_dependencies): Initialize the ->verifying
	flag on our initial queue's context.

	* rc-resolver.h: Added 'verifying' flag to RCResolver struct.

	* rc-resolver-context.c (rc_package_status_to_string): Added a
	string for RC_PACKAGE_STATUS_TO_BE_INSTALLED_SOFT.
	(rc_resolver_context_new_child): Initialize the ->verifying flag.
	(rc_resolver_context_set_status): Use the
	rc_package_status_is_to_be_installed macro.
	(rc_resolver_context_install_package): Added an is_soft argument.
	When it is set, the installed package's status is set to
	RC_PACKAGE_STATUS_TO_BE_INSTALLED_SOFT instead of
	RC_PACKAGE_STATUS_TO_BE_INSTALLED.  Changed to use the
	rc_package_status_is_to_be_installed macro.  Removed a totally
	useless elog message.
	(rc_resolver_context_upgrade_package): Added an is_soft argument,
	and changed to use the rc_package_status_is_to_be_installed macro.
	(rc_resolver_context_uninstall_package): Terminate early if
	rc_package_status_is_to_be_uninstalled succeeds.  The is probably
	a pointless optimization, since I think we already filter for this
	before calling the function... but I added in anyway, mostly for
	symmetry with the other rc_resolver_context_*_package functions.
	(rc_resolver_context_package_is_present): Use
	rc_package_status_is_to_be_installed macro.
	(install_pkg_cb): Ditto.
	(upgrade_pkg_cb): Ditto.

	* rc-resolver-context.h: Added
	RC_PACKAGE_STATUS_TO_BE_INSTALLED_SOFT to RCPackageStatus enum.
	Added rc_package_status_is_to_be_installed macro.  Added
	'verifying' flag to RCResolverContext struct.

2002-08-28  Ian Peters  <itp@ximian.com>

	* Makefile.am: add libpopt.so to the shared stubs, as there are
	undefined popt symbols in librpm.so.

	* rc-package-spec.h: no more inline rc_package_spec_equal, no more
	rc_package_spec_compare

	* rc-package-spec.c: always define rc_package_spec_equal here.  No
	more das_global_packman, yay!  No more rc_package_spec_compare,
	either.

	* rc-package.h, rc-package.c: removed unused functions
	rc_package_slist_sort_by_spec,
	rc_package_slist_sort_by_spec_reverse,
	rc_pakcage_slist_find_duplicates, and
	rc_packages_slist_remove_older_duplicates

	* rc-package-dep.h, rc-package-dep.c
	(rc_package_dep_verify_relation): there's no more
	das_global_packman, pass a packman in instead

	* rc-packman.h, rc-packman.c: no more rc_packman_set_packman or
	rc_packman_set_packman

	* rc-queue-item.c (install_item_cmp): use
	rc_packman_version_compare instead of rc_package_spec_compare here
	(uninstall_item_cmp): and here

	* rc-resolver-queue.c (rc_resolver_queue_split_first_branch): and
	here

	* rc-world.c: add a global world for rc_get_world
	(rc_world_register_packman): removed
	(rc_set_world): added, set the world you get with rc_get_world
	(rc_world_new): take and setup the packman here, because we don't
	work very well without one
	(struct ForeachUpgradeInfo): add a pointer to the world here
	(foreach_upgrade_cb): use rc_packman_version_compare rather than
	rc_package_spec_compare
	(rc_world_foreach_upgrade): set the world
	(struct BestUpgradeInfo): add a pointer to the world here
	(get_best_upgrade_cb): use rc_packman_version_compare rather than
	rc_package_spec_compare
	(rc_world_get_best_upgrade): set the world
	(rc_world_get_package_with_constraint):
	rc_package_dep_verify_relation needs a packman
	(rc_world_check_providing_package): here too
	(rc_world_foreach_requiring_package): and here
	(rc_world_foreach_conflicting_package): and here

	* rc-world.h: remove rc_world_register_packman, add rc_set_world,
	modify rc_world_new declaration

	* rc-rpmman.c (rc_rpmman_transact): rc_package_dep_verify_relation
	needs a packman
	
2002-08-28  Ian Peters  <itp@ximian.com>

	* rc-debman.c: reinstate the hack in lesser form -- interactive
	debian packages cause the process to be killed, and an error set.

2002-08-26  Joe Shaw  <joe@ximian.com>

	* rc-util.c (rc_buffer_map_file): Fix a nasty file descriptor leak.

	* rc-world-subscriptions.c
	(rc_world_import_subscriptions_from_xml): Make the
	can't-subscribe-to-channel-because-it-wasn't-in-the-XML error a
	little more clear.

2002-08-23  Joe Shaw  <joe@ximian.com>

	* rc-debman-general.c (rc_debman_parse_version): Make input a
	const gchar *.

	* rc-packman.c (rc_packman_parse_version): Added.  Calls the
	backend's parse_version function.

	* rc-packman.h: Added rc_packman_real_parse_version function
	pointer.

	* rc-debman.c (rc_debman_parse_version_wrapper): Wraps
	rc_debman_parse_version(), sets has_epoch to TRUE always.

	* rc-rpmman.c (rc_rpmman_parse_version): Call parse_version().

	* rc-world.c (rc_world_sequence_number): Move to after the
	definition of rc_world_sync() to fix some warnings.

2002-08-22  Joe Shaw  <joe@ximian.com>

	* rc-world.c (rc_world_sequence_number): Call rc_world_sync()
	before we get our sequence number, so we can flip the changed flag
	and increment it if the database changed underneath us.

2002-08-22  Jon Trowbridge  <trow@ximian.com>

	* rc-queue-item.c (branch_item_process): An optimization: Instead
	of processing a 1-item branch into that item, simply execute the
	item immediately.

2002-08-20  Jon Trowbridge  <trow@ximian.com>

	* rc-queue-item.c (require_item_process): Don't skip exploring the
	uninstall branch in the case of codependent packages when our
	requirement comes from a lost package.  This might not be the
	right thing to do.

	* rc-resolver-context.c (rc_resolver_context_spew): Added. Another
	debug-spew function that prints out a list of the packages to be
	installed, removed and upgraded.

	* rc-resolver.c (rc_resolver_resolve_dependencies): Make sure that
	our dummy local packages channel has a non-zero cid and bid.
	(rc_resolver_resolve_dependencies): When in extremely_noisy mode,
	print a final total of the number of queues in each category.

2002-08-19  Jon Trowbridge  <trow@ximian.com>

	* rc-xml.c (rc_channel_to_xml_node): Put the base-id in the XML.

	* rc-world-import.c (rc_world_add_channels_from_xml): Handle the
	base-id.
	(rc_world_add_channel_from_buffer): Added an argument for the
	base-id.

	* rc-world-dump.c (rc_world_undump_from_xml): Get the base-id from
	the channel XML.

	* rc-world.c (rc_world_add_channel): Added an argument for
	specifying a base-id.
	(rc_world_get_channel_by_base_id): Added.

	* rc-resolver-queue.c (rc_resolver_queue_add_extra_dependency): Added.

	* rc-resolver.c (rc_resolver_free): Clean up our extra conflicts.
	(rc_resolver_add_extra_conflict): Added.
	(rc_resolver_resolve_dependencies): Specify a fake base-id for our
	temporary local packages channel.
	(rc_resolver_resolve_dependencies): Iterate over our extra
	conflicts, adding them to the queue.

	* rc-resolver-info.c (rc_resolver_info_conflicts_with_new): Handle
	a NULL conflicts_with.
	(rc_resolver_info_obsoletes_new): Handle a NULL obsoletes.

	* rc-queue-item.c (conflict_process_cb): Respond gracefully when
	conflicting_package is NULL.
	(conflict_item_process): Ditto.
	(conflict_item_to_string): Ditto.
	(rc_queue_item_new_conflict): Ditto.

	* rc-channel.c (rc_channel_get_base_id): Added accessor.

	* rc-channel-private.h: Added base_id field to RCChannel struct.

	* rc-resolver.c (rc_resolver_free): Clean up after our deferred
	branch list.
	(rc_resolver_resolve_dependencies): Added deferred branching
	support.  If we exhaust the pending queues without finding a
	solution, try deferred queues until we find a solution (or run out
	of deferred queues, of course).

	* rc-resolver-queue.c (rc_resolver_queue_process_once): Added an
	optimization that makes a pass over our new queue item and throws
	out any branches that are supersets of other branches.
	(rc_resolver_queue_split_first_branch): Added deferred branching.
	This is an optimization where we will try to recognize branches
	that are less likely to lead to high-scoring solutions; the
	deferred branches are explored only if we are unable to produce a
	valid resolution using the favored branches.
 	
	* rc-queue-item.c (rc_queue_item_cmp): Added.  A comparison
	function for queue items, so that we can sort them into a
	canonical ordering.
	(install_item_cmp): Implements cmp for install items.
	(rc_queue_item_new_install): Store the cmp function in our vtable.
	(branch_item_cmp): Implements cmp for branch items.
	(rc_queue_item_new_branch): Store the cmp function in our vtable.
	(uninstall_item_cmp): Implements cmp for uninstall items.
	(rc_queue_item_new_uninstall): Store the cmp function in our
	vtable.
	(rc_queue_item_branch_contains): Added.  Checks if one branch item
	is a proper subset of the other.
	(rc_queue_item_branch_add_item): Insertion-sort the added branch
	items instead of just prepending.

	* rc-channel.c (rc_channel_get_path): Added accessor.
	(rc_channel_get_icon_file): Added accessor.

2002-08-17  Jon Trowbridge  <trow@ximian.com>

	* rc-world.c (rc_world_sequence_number): Added.  If the sequence
	number increases, that means that the RCWorld has changed.
	(rc_world_new): Initialize seqno-related variables.
	(rc_world_add_channel): Set 'changed' flag so that the sequence
	number will get incremented.
	(rc_world_remove_channel): Ditto.
	(rc_world_add_package): Ditto.
	(rc_world_remove_package): Ditto.
	(rc_world_remove_packages): Ditto.

2002-08-16  Jon Trowbridge  <trow@ximian.com>

	* rc-xml.c (rc_xml_node_to_package_dep_internal): Wow... the way
	this code tried to extract the epoch from the dep tag was _really_
	broken.  Fixed.

	* rc-queue-item.c (require_item_process): When there are no
	providers for the requirement, cause the resolution attempt to
	fail if we can't come up with either something to uninstall or an
	upgrade branch to explore.
	
2002-08-15  Jon Trowbridge  <trow@ximian.com>

	* rc-resolver-compare.c (churn_factor): Use the
	rc_resolver_context_*_count fns instead of directly accessing the
	struct elements.

	* rc-queue-item.c (install_item_process): Use
	rc_package_status_is_to_be_uninstalled macro.
	(require_process_cb): Ditto.

	* rc-resolver-context.c (rc_resolver_context_new_child): No need
	to copy install_count, etc. to the child context.
	(rc_resolver_context_set_status): Use
	rc_package_status_is_to_be_uninstalled macro.
	(rc_resolver_context_install_package): Use
	rc_package_status_is_to_be_uninstalled macro.  Don't try to count
	installs as we go.
	(rc_resolver_context_upgrade_package): Ditto.
	(rc_resolver_context_uninstall_package): Ditto.
	(uninstall_pkg_cb): Use rc_package_status_is_to_be_uninstalled
	macro.
	(rc_resolver_context_install_count): Added.
	(rc_resolver_context_uninstall_count): Added.
	(rc_resolver_context_upgrade_count): Added.
	(requirement_possible_cb): Use
	rc_package_status_is_to_be_uninstalled macro.

	* rc-resolver-context.h: Removed install_count, upgrade_count and
	uninstall_count from RCResolverContext.  Added
	rc_package_status_is_to_be_uninstalled macro.

2002-08-14  Ian Peters  <itp@ximian.com>

	* rc-util.h (rc_is_program_in_path): removed

	* rc-util.c (rc_is_program_in_path): removed

	* rc-verification.c (rc_verify_gpg): use g_find_program_in_path
	instead of rc_is_program_in_path

2002-08-14  Ian Peters  <itp@ximian.com>

	* rc-world.c (rc_package_and_dep_new_package): removed
	(rc_world_add_package): every package doesn't implicitly provide
	itself, it explicitly provides itself, which means we don't have
	to do this.

2002-08-14  Ian Peters  <itp@ximian.com>

	* rc-debman.c (rc_debman_class_init): remove some very old
	commented out code
	(rc_debman_init): remove RC_PACKMAN_CAP_VIRTUAL_CONFLICTS from our
	capabilities list, since it doesn't exist anymore

	* rc-packman.h: remove RC_PACKMAN_CAP_VIRTUAL_CONFLICTS

	* rc-resolver-context.h (struct _RCResolverContext): get rid of
	the allow_conflicts_with_virtual_provides field

	* rc-resolver-context.c (rc_resolver_context_new_child): no more
	allow_conflicts_with_virtual_provides

	* rc-resolver.h (struct _RCResolver): bye bye
	allow_conflicts_with_virtual_provides
	(rc_resolver_allow_virtual_conflicts): removed

	* rc-resolver.c (rc_resolver_new): adios
	allow_conflicts_with_virtual_provides
	(rc_resolver_allow_virtual_conflicts): removed
	(rc_resolver_resolve_dependencies): l8r
	allow_conflicts_with_virtual_provides

	* rc-queue-item.c (conflict_process_cb): altered the virtual
	provide / conflict logic to match what we now believe is the
	actual rpm behavior.  Conflicts apply to any provide, regardless
	of whether it's "virtual" or not.  An obsolete only applies to the
	package itself, not just a provide -- so check to make sure that a
	provide spec matches the package spec that provides it before we
	process the "obsolete" conflict.

	* rc-package-spec.h: no more RCWorld needed, get rid of the
	RCPackageSpecType enum
	(struct _RCPackageSpec): no more type field
	(rc_package_spec_get_type): removed

	* rc-package-spec.c (rc_package_spec_init): no more type field
	(rc_package_spec_copy): no more type field
	(struct SpecTypeInfo): removed
	(spec_type_cb): removed
	(rc_package_spec_get_type): removed

	* rc-world.c (rc_package_and_dep_new_package): no more type field
	in RCPackageSpecs

2002-08-10  Ian Peters  <itp@ximian.com>

	* rc-util.h: if HAVE_MKDTEMP is defined, then rc_mkdtemp is just
	mkdtemp, otherwise we need to declare our own.

	* rc-util.c (rc_mkdtemp): our very own implementation of mkdtemp,
	since we need to build on platforms that don't offer this function

	* rc-rpmman.c (write_objects): call rc_mkdtemp, not mkdtemp

2002-08-09  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (split_rpm): change the way we handle errors in this
	function to plug a few small potential memory and fd leaks

2002-08-09  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (open_database): fix a small memory leak and a
	leaked file descriptor on failed database opens

2002-08-09  Ian Peters  <itp@ximian.com>

	* rc-package-spec.h (struct _RCPackageSpec): removed the name
	field in favor of the nameq, a GQuark.  Note to the reader: every
	place in this entry that I say GQuark fixup, I mean: did the right
	thing, whether that means directly comparing two GQuarks for
	equality, g_quark_[to|from|try]_string, etc
	(rc_package_spec_equal): no need for a strcmp, just compare the
	two quarks

	* rc-package-spec.c (rc_package_spec_init): really obvious name ->
	nameq changes, I'm not going to enumerate them

	* rc-package-dep.c: Our global_deps table is now keyed on the name
	quark, not the name, so some of the hash table logic in _unref,
	_new, and _new_from_spec is dramatically simpler, since we don't
	have allocated keys.
	(rc_package_dep_verify_relation): GQuark fixup

	* rc-dep-or.h (rc_dep_string_to_or_dep_slist): take a const gchar
	*, not gchar *

	* rc-dep-or.c (rc_dep_or_dep_slist_to_string): GQuark fixup

	* rc-package.c (rc_package_slist_sort_by_name): GQuark fixup
	(rc_package_slist_find_duplicates): GQuark fixup

	* rc-packman.c (rc_packman_transact): GQuark fixup
	(rc_packman_generic_version_compare): GQuark fixup

	* rc-rpmman.c (rc_package_to_rpm_name): GQuark fixup
	(rc_rpmman_transact): GQuark fixup
	(rc_rpmman_read_header): GQuark fixup
	(rc_rpmman_depends_fill): GQuark fixup
	(rc_rpmman_version_compare): GQuark fixup

	* rc-debman.c (hash_destroy_pair): the key is a GQuark
	(hash_destroy): my hash should be NULL, NULL now
	(package_accept): GQuark fixup
	(query_all_read_line_cb): GQuark fixup
	(rc_debman_query_all_real): GQuark fixup
	(rc_debman_query): GQuark fixup
	(rc_debman_init): my hash is NULL, NULL now

	* rc-queue-item.c (codependent_packages): GQuark fixup

	* rc-resolver-context.c (uninstall_pkg_cb): GQuark fixup.  Also,
	my hash is keyed on GQuarks now.
	(rc_resolver_context_foreach_uninstall): make my hash NULL, NULL
	now to be keyed on GQuarks
	(dup_name_check_cb): GQuark fixup

	* rc-resolver-info.c (rc_resolver_info_packages_to_string): GQuark
	fixup
	(rc_resolver_info_mentions): GQuark fixup

	* rc-world-info.c (add_package_to_world): key is a GQuark
	(rc_world_add_packages_from_xml): my little
	temporary hash table is keyed on GQuarks now, etc
	(debian_packages_helper): GQuark fixup

	* rc-world.c (struct _SListAnchor): key is a GQuark
	(hashed_slist_new): my hash table is direct, not str
	(hashed_slist_add): key is a GQuark, GINT_TO_POINTER wrap the
	quark when playing with the hash
	(hashed_slist_get): key is a GQuark, GINT_TO_POINTER wrap the
	quark...
	(hashed_slist_foreach_cb): GINT_TO_POINTER
	(foreach_remove_func): don't free the key, it's not allocated
	anymore
	(rc_world_add_package): hashed_slist_add gets a GQuark
	(rc_world_find_installed_version): hashed_slist_get needs a GQuark
	(rc_world_get_package): hashed_slist_get needs a GQuark
	(rc_world_guess_package_channel): hashed_slist_get needs a GQuark
	(rc_world_foreach_package_by_name): hashed_slist_get needs a
	GQuark
	(rc_world_foreach_upgrade): GQuark fixup
	(rc_world_foreach_providing_package): GQuark fixup,
	hashed_slist_get needs a GQuark
	(rc_world_check_providing_package): GQuark fixup, hashed_slist_get
	needs a GQuark
	(rc_world_foreach_requiring_package): hashed_slist_get needs a
	GQuark
	(rc_world_foreach_conflicting_package): hashed_slist_get needs a
	GQuark

	* rc-xml.c (struct _RCPackageSAXContext): our hash table is by
	GQuark
	(parser_history_start): GQuark fixup
	(parser_package_end): GQuark fixup, hash table changes
	(package_slist_build): key is a GQuark
	(rc_package_sax_context_new): hash table is NULL, NULL
	(rc_xml_node_to_package): GQuark fixup
	(rc_xml_node_to_package_update): GQuark fixup
	(rc_package_to_xml_node): GQuark fixup
	(rc_package_dep_to_xml_node): GQuark fixup

2002-08-09  Jon Trowbridge  <trow@ximian.com>

	* rc-resolver-context.c (rc_resolver_context_upgrade_package):
	Added an extra argument for the to-be-upgraded RCPackage.  If that
	package's status is TO_BE_UNINSTALLED, decrement the
	uninstall_count to keep the accounting straight: the removal will
	be accounted for when we increment upgrade_count.

	* rc-queue-item.c (install_item_process): Pass the to-be-upgraded
	package into rc_resolver_context_upgrade_package.

2002-08-08  Jon Trowbridge  <trow@ximian.com>

	* rc-resolver-context.c (spew_cb): Changed to use
	rc_resolver_info_to_string instead of the _to_str version.
	
	* rc-resolver-info.c (rc_resolver_info_type_to_string): Renamed
	from _to_str.
	(rc_resolver_info_type_from_string): Renamed from _from_str.
	(rc_resolver_info_to_string): Renamed from _to_str.  Changed to
	call _to_string version of other functions.

2002-08-08  Ian Peters  <itp@ximian.com>

	* distributions.xml: fix a typo in the version of TurboLinux 7.0

	* rc-package-dep.c, rc-package-dep.h: massively cleaned up and
	refactored.  RCPackageDep is now an opaque struct, for the most
	part... modulo the opening exposed by the RCPackageSpec.
	Functions are cleaned up, dead code removed, and lots of the stuff
	from last night has been commented.

	* rc-debman.c (query_all_read_line_cb): whoops, don't post-munge
	the pre bit of the RCPackageDeps in the pre-depends: section,
	we've already taken care of it

	* rc-dep-or.c (rc_dep_or_dep_slist_to_string): opaque
	RCPackageDeps
	(rc_dep_string_to_or_dep_slist): ditto

	* rc-queue-item.c (dep_slist_to_string): opaque RCPackageDeps
	(require_item_process): ditto
	(require_item_to_string): ditto
	(conflict_item_process) ditto
	(conflict_item_to_string): ditto
	(uninstall_item_process): ditto

	* rc-resolver.c (rc_resolver_add_extra_dependency):
	rc_package_dep_copy is just an rc_package_dep_ref

	* rc-world.c (rc_package_and_dep_new_package): opaque
	RCPackageDeps
	(rc_world_add_package): ditto
	(rc_world_foreach_providing_package): ditto
	(rc_world_check_providing_package): ditto
	(rc_world_foreach_requiring_package): ditto
	(rc_world_foreach_conflicting_package): ditto
	(foreach_provides_by_name_cb): ditto
	(foreach_requires_by_name_cb): ditto
	(foreach_conflicts_by_name_cb): ditto

	* rc-xml.c (parse_dep_attrs): opaque RCPackageDeps
	(parser_package_end): ditto
	(rc_xml_node_to_package): ditto
	(rc_xml_node_to_package_dep_internal): ditto
	(rc_package_dep_to_xml_node): ditto

2002-08-08  Jon Trowbridge  <trow@ximian.com>

	* rc-resolver-info.c (rc_resolver_info_type_to_str): Added.
	(rc_resolver_info_type_from_str): Added.

2002-08-08  Ian Peters  <itp@ximian.com>

	* rc-debman.c (query_all_read_line_cb): add the extra parameter to
	all of the rc_debman_fill_depends calls

2002-08-08  Jon Trowbridge  <trow@ximian.com>

	* rc-package-dep.h: By making the refs field in RCPackageDep a
	20-bit int and shrinking relation to 8 bits, we can save 4 bytes
	per object.  Not a huge savings, but it doesn't hurt.

	* rc-xml.c (parser_package_start): Got rid of some unnecessary mem
	allocs and string copies.
	(parse_dep_attrs): Got rid of some unnecessary mem allocs and
	string copies.
	(parser_package_end): Got rid of some unnecessary mem allocs and
	string copies.
	(parser_update_end): Got rid of some unnecessary mem allocs and
	string copies.  
	In all, these changes reduce the number of memallocs done by
	rcd on startup on a RH73 system by about 15%.

2002-08-07  Ian Peters  <itp@ximian.com>

	* rc-package-dep.c, rc-package-dep.h: RCPackageDep is now a ref
	counted structure.  It really should be an opaque struct, too, but
	that'll come.  rc_package_dep_new now tries to return a pointer to
	an existing RCPackageDep struct rather than creating a new one.
	(struct _RCPackageDepArray): data now has to be an array of
	RCPackageDep *
	(struct _RCPackageDep): add a ref count
	(rc_package_dep_ref): added
	(rc_package_dep_unref): added
	(rc_package_dep_new): now takes a pre and is_or parameter
	(rc_package_dep_new_from_spec): ditto
	(rc_package_dep_free): removed
	(rc_package_dep_slist_remove_duplicates): removed
	(rc_package_dep_array_from_slist): updated to new
	RCPackageDepArray
	(rc_package_dep_array_free): ditto
	(rc_package_dep_array_copy): ditto

	* rc-debman-general.c, rc-debman-general.h
	(rc_debman_fill_depends): take a pre parameter, pass it along to
	rc_package_dep_new

	* rc-debman.c (query_all_read_line_cb): add FALSE, FALSE to
	rc_package_dep_new when we self-provide
	(rc_debman_query_all): ditto

	* rc-dep-or.c: this file really needs some loving and rewriting.
	yikes.
	(rc_dep_or_new_provide): add FALSE, TRUE to rc_package_dep_new
	(rc_dep_string_to_or_dep_slist): we can't assemble the dep bit by
	bit; accumulate the elements and create the RCPackageDep at the
	end

	* rc-queue-item.c (install_item_process): change the way we
	iterate over RCPackageDepArrays, again.  Add FALSE, FALSE to the
	end of rc_package_dep_new_from_spec.
	s/rc_package_dep_free/rc_package_dep_unref.

	* rc-resolver-context.c (rc_resolver_context_package_is_possible):
	change the way we iterate over RCPackageDepArrays

	* rc-resolver-queue.c (rc_resolver_queue_add_package_to_verify):
	change the way we ... etc

	* rc-rpmman.c (rc_rpmman_transact): change the ... blah blah.  add
	FALSE, FALSE to the end of rc_package_dep_new, and of course,
	_unref instead of _free.
	(depends_fill_helper): FALSE, FALSE to rc_package_dep_new in a few
	places
	(rc_rpmman_depends_fill): FALSE, FALSE yadda yadda

	* rc-world-import.c (debian_packages_helper): add FALSE to every
	call to rc_debman_fill_depends except for our pre-requires, which
	get TRUE.  Also, for our self-provide, add FALSE, FALSE to
	_dep_new_from_spec.

	* rc-world.c (struct _RCPackageAndDep): kill the own_dep field
	(rc_package_and_dep_new_package): add FALSE, FALSE to
	_dep_new_from_spec, remove the own_dep
	(rc_package_and_dep_new_pair): remove the own_dep stuff, and ref
	the dep we're passed
	(rc_package_and_dep_free): always unref our dep, no own_dep
	(rc_world_add_package): change the way we iterate over
	RCPackageDepArrays
	(rc_world_get_package_with_constraint): add FALSE, FALSE to
	rc_package_dep_new_from_spec, and unref, don't free, the dep when
	we're done

	* rc-xml.c (dep_attrs): we're no longer given a dep to fill out,
	but a dep pointer that we're to allocate and return.  We have to
	create it at the end, so we accumulate all of the members and
	create it at the end.
	(parser_dep_start): don't create our own dep, get one from
	dep_attrs
	(rc_xml_node_to_package): change the way we iterate over
	RCPackageDepArrays
	(rc_xml_node_to_package_dep_internal): don't create a dep and then
	fill it out, accumulate the members we need and then create it
	(rc_package_to_xml_node): change the way we iterate over
	RCPackageDepArrays

2002-08-07  Jon Trowbridge  <trow@ximian.com>

	* rc-world-dump.c: s/xmlGetProp/xml_get_prop/.

	* rc-world-subscriptions.c
	(rc_world_import_subscriptions_from_xml):
	s/xmlGetProp/xml_get_prop/.

	* rc-world-dump.c (rc_world_undump_from_xml): Fixed memory leak.

	* rc-resolver.c (rc_resolver_resolve_dependencies): At the
	beginning of the resolution, create a temporary channel for the
	local packages that we are installing.  This allows the RCWorld to
	see the local packages, and we can take their provides into
	account when resolving.  When the resolution is finished, 
	we destroy the channel.
	
2002-08-07  Joe Shaw  <joe@ximian.com>

	* rc-distro.c (sax_end_element): If RC_DISTRO_TARGET is set, use
	it instead of whatever it should be.  It ain't pretty, but it
	works.

2002-08-07  Ian Peters  <itp@ximian.com>

	* rc-verification.c (rc_verify_gpg): refactored to use g_spawn
	instead of handling it myself.  Other miscellaneous cleanups, too.

2002-08-07  Ian Peters  <itp@ximian.com>

	* rc-distro.c (child_setup_func): added, dup2 stderr to stdout.
	(distro_check_command_eval): use g_spawn_async_with_pipes instead
	or pipe/fork/exec ourselves

2002-08-06  Ian Peters  <itp@ximian.com>

	* Makefile.am: libredcarpet, not 2.0

2002-08-06  Ian Peters  <itp@ximian.com>

	* rc-package-dep.c (rc_package_dep_array_from_slist): just because
	we don't have to rc_package_dep_free the dep doesn't mean we don't
	have to g_free it

2002-08-06  Joe Shaw  <joe@ximian.com>

	* rc-verification.c: Declare keyring static.

2002-08-06  Ian Peters  <itp@ximian.com>

	* Makefile.am: kill the private namespace stuff, build the shared
	objects into header files, and all the automake crap to handle
	conditionally built sources

	* packer.pl: handle disallowed characters in the array name

	* rc-debman-private.h: include a helper_object name in the
	RCDebmanPrivate struct

	* rc-debman.c: include dpkg-helper.h, write out the object file on
	_init, clean it up on _finalize, use it when we fork

	* rc-packman.h, rc-packman.c: remove the rc_libdir stuff

	* rc-rpmman.c: include rpm-stubs.h, write out the object files on
	_init, clean them up when we're done dlopening some

	* rc-verification.c: if keyring is NULL, just return UNDEF out of
	rc_verify_gpg

2002-08-06  Joe Shaw  <joe@ximian.com>

	* rc-xml.c (sax_warning): Always print out SAX warnings.
	(sax_error): Always print out SAX errors.
	(sax_handler): Call sax_error() for error and fatalError
	conditions.

2002-08-05  Joe Shaw  <joe@ximian.com>

	* rc-resolver-info.c (rc_resolver_info_merge): Need to ref the
	package when we're merging infos, as well.

2002-08-05  Ian Peters  <itp@ximian.com>

	* rc-queue-item.c (require_item_process): if you never increment
	the iterator, the loop never exits

2002-08-05  Ian Peters  <itp@ximian.com>

	* rc-package-dep.c (rc_package_dep_array_from_slist): don't
	_dep_copy and _dep_free, just memcpy the dep, since we were just
	going to free it anyway

2002-08-05  Ian Peters  <itp@ximian.com>

	* rc-package-dep.h, rc-package-dep.c: added an RCPackageDepArray
	type, and rc_package_dep_array_from_slist,
	rc_package_dep_array_free, rc_package_dep_array_copy methods.
	Storing deps as arrays rather than lists should save a good chunk
	of memory.  Note that _from_slist takes an RCPackageDepSList **,
	and uses the RCPackageDep *'s directly, g_slist_frees the list,
	and sets it to NULL.

	* rc-package.h (struct _RCPackage): no more RCPackageDepSLists
	here; long live the RCPackageDepArray

	* rc-package.c (rc_package_copy):
	s/rc_package_dep_slist_copy/rc_package_dep_array_copy
	(rc_package_free):
	s/rc_package_dep_slist_free/rc_package_dep_array_free

	* rc-debman.c (struct DebmanQueryInfo): include buffers to
	assemble temporary RCPackageDepSLists
	(query_all_read_line_cb): add deps to these temporary lists, not
	to the package itself.
	(rc_debman_query_all_real): convert the temporary dep lists to
	arrays inside the package
	(rc_debman_query_file): ditto

	* rc-debug-misc.c (rc_package_dump): #if 0'd it out, nothing uses
	it now and i didn't want to fix it for dep arrays.  I'll go on a
	dead code hunting spree soon.

	* rc-rpmman.c (rc_rpmman_transact): change the way we iterate over
	the obsoletes, since they're now an array
	(rc_rpmman_depends_fill): assemble all of the deps in local lists,
	instead of the package, and then convert them into arrays in the
	package at the end.

	* rc-queue-item.c (install_item_process): change the way we
	iterate over deps, they're now arrays
	(uninstall_item_process): ditto

	* rc-resolver-context.c (rc_resolver_context_package_is_possible):
	more dependency iteration changes

	* rc-resolver-queue.c (rc_resolver_queue_add_package_to_verify):
	see a pattern here?

	* rc-world-import.c (debian_packages_helper): assemble
	dependencies in local lists, convert them all to arrays inside the
	package at the end.

	* rc-world.c (rc_world_add_package): more dependency iteration
	changes

	* rc-xml.c (struct _RCPackageSAXContext): add all 6 dependency
	lists
	(parser_toplevel_start): set all 6 lists to NULL
	(parser_package_start): add deps to the context lists, not the
	context package
	(parser_dep_start): ditto
	(parser_package_end): iterate over the provides list in the
	context.  convert the context lists to arrays in the context
	package
	(struct DepTable): added, for the DOM parser.  Has 6
	RCPackageDepSLists.
	(extract_dep_info): takes a DepTable, not an RCPackage, and
	assembles the dep lists in the dep_table.
	(rc_xml_node_to_package): fill in the deps into a DepTable.
	convert those lists into arrays inside the package at the end.
	when looking for our version, walk the provides array.
	(rc_package_to_xml_node): change the way we iterate all of the
	deps, since they're arrays now.

2002-08-05  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_transact): joe was right a few days ago,
	real_remove_packages doesn't need to be a deep copy or free

2002-08-05  Ian Peters  <itp@ximian.com>

	* Makefile.am: get rid of the rc-marshal.[ch] stamp stuff, and add
	them to libredcarpettmp_a_SOURCES

2002-08-05  Joe Shaw  <joe@ximian.com>

	* rc-package.c (rc_package_is_installed): If local_package is set,
	always return FALSE.

	* rc-package.h: Add a local_package bit

	* rc-packman.c (rc_packman_query_file): Set the local_package bit.

	* rc-resolver-context.c (rc_resolver_context_install_package,
	rc_resolver_context_upgrade_package): If the local_package bit is
	set, set the priority to 0.

	* rc-resolver-info.c: Ref and unref RCPackages throughout.

2002-08-04  Jon Trowbridge  <trow@ximian.com>

	* rc-world-dump.c (rc_world_undump_from_xml): Extract the
	priorities from the XML and put them in our channel.

	* rc-xml.c (rc_channel_to_xml_node): Store priorities in the XML.

2002-08-03  Ian Peters  <itp@ximian.com>

	* Makefile.am: list distributions-xml.h in
	libredcarpettmp_a_SOURCES, as well as BUILT_SOURCES

2002-08-03  Ian Peters  <itp@ximian.com>

	* distributions.xml: added.  XML file describing every
	distribution we recognize, and whether it's supported or not.

	* packer.pl: added.  perl script to generate a C character array
	from a file.

	* Makefile.am: add distributions-xml.h to BUILT_SOURCES, packer.pl
	to EXTRA_DIST, build distributions-xml.h out of distributions.xml
	using packer.pl, and add distributions-xml.h to clean-local.

	* .cvsignore: added distributions-xml.h

	* rc-distro.[ch]: added.  Now parses distribution information out
	of a supplied XML file -- or, if no XML file is supplied, uses a
	gzipped backup copy as a fallback (the distribution-xml.h stuff
	from above).  distributions.xml in CVS should be kept up to date,
	and is used for things like the tools, etc, that have no need to
	download their own copies, but long term, the client and daemon
	should be downloading copies of these files.  Also has a new,
	simpler public interface.

	* rc-distman.c (rc_distman_new): no rc_figure_distro anymore,
	simply use rc_distro_get_package_type directly

	* rc-world-import.c (rc_world_add_channels_from_xml): no
	rc_figure_distro, simply use rc_distro_get_target instead

2002-08-02  Jon Trowbridge  <trow@ximian.com>

	* rc-resolver-queue.c (rc_resolver_queue_process_once): Fixed
	memory leak.

	* rc-world-dump.c (rc_world_undump_from_xml): Fixed memory leak.

2002-08-01  Joe Shaw  <joe@ximian.com>

	* rc-rpmman.c (close_database): Reset the lock_fd to 0 after
	closing it, so we don't go around closing other file descriptors
	all willy nilly.

2002-08-01  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_query_file): only open the database if
	it's not already open, yo.

2002-08-01  Joe Shaw  <joe@ximian.com>

	* rc-world-subscriptions.c
	(rc_world_import_subscriptions_from_xml): Keep around a list of
	subscriptions which do not match any valid channel for this
	session.
	(rc_world_export_subscriptions_to_xml): Write out the unmatched
	subscriptions, so we don't lose them anymore.

2002-08-01  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_query_file): open the database read-only
	before attempting to query the file.  This shouldn't be at all
	necessary, but it fixes the rather bizarre hang some people were
	getting, due to an unitialized variable in rpmlib.

2002-08-01  Ian Peters  <itp@ximian.com>

	* rc-world.h: rc_world_get_best_upgrade now takes a
	subscribed_only flag to control what channels to look in

	* rc-world.c (struct BestUpgradeInfo): added
	(get_best_upgrade_cb): user_data is not a BestUpgradeInfo, of
	which best_upgrade is an element.  Check the subscribed_only flag
	in the info struct to filter upgrades from unsubscribed channels.
	(rc_world_get_best_upgrade): create a BestUpgradeInfo struct,
	initialize it with the subscribed_only flag, and pass it to the
	cb, rather than just the best_upgrade.

	* rc-package.h: rc_package_get_best_upgrade now takes a
	subscribed_only flag

	* rc-package.c: pass the subscribed_only flag to
	rc_world_get_best_upgrade

2002-07-31  Ian Peters  <itp@ximian.com>

	* rc-arch.c, rc-arch.h: added

	* Makefile.am: rc-arch.[ch] added as part of the build

	* rc-distro.h, rc-distro.c: remove the old arch stuff, use the new
	arch stuff, remove the NO_GLIB stuff

	* rc-package.h, rc-package.c: RCPackage now has an arch field that
	must be initialized and copied appropriately

	* rc-rpmman.c (rc_rpmman_read_header): check RPMTAG_ARCH and set
	it in the package

	* rc-xml.c (RCPackageSAXContext): keep the packages in a hash
	instead of a list, and keep the arch compat list here
	(parser_package_end): make sure the parsed package has an arch --
	if one was missing in the xml, set it (as a hack) to the system
	arch.  make sure the package is compatible with the system before
	adding it to the hash.  if that package is already present in the
	hash, make sure ours is a better arch before adding it to the
	hash, and removing the other.  parse an arch field out of the
	package, if present.
	(package_slist_build): added.  builds an slist as a hash cb func.
	(rc_package_sax_context_done): convert the ctx hash into a list,
	destroy the hash, return the list.  also free the arch compat list
	here.
	(rc_package_sax_context_new): create the package hash and the arch
	compat list here
	(rc_xml_node_to_package): parse an arch field, if present.  fake
	one if necessary, as above
	(rc_package_to_xml_node): add the arch field to the xmlNode

	* rc-world-import.c (add_package_to_world): added.  hash cb func.
	(rc_world_add_packages_to_xml): rather than just adding packages
	one by one to the world, create a hash, just like in the SAX
	parser, with the same logic to pick the best package/arch pair.

2002-07-31  Joe Shaw  <joe@ximian.com>

	* rc-xml.c: Don't output the SAX parser spew normally.  Only do it
	if the RC_SPEW_XML env var is set.

2002-07-31  Joe Shaw  <joe@ximian.com>

	* rc-xml.c (parser_package_start): Add a comment about the deps
	tag being ignored in the SAX parser.
	(extract_dep_info): Extract parsing of the various dependency
	fields, like requires, provides, etc. into here.
	(rc_xml_node_to_package): If we get a deps tag, call
	extract_dep_info() on our children, and set a flag.  If the flag
	isn't set, extract our deps like we used to.

2002-07-30  Ian Peters  <itp@ximian.com>

	* rc-channel.c, rc-debman-general.c, rc-line-buf.c,
	rc-verification.c: get rid of some RC_[ENTRY/EXIT]

	* rc-xml.c (sanitize_string): s/gint/guint to make this comparison
	meaningful

	* rc-world-dump.c (rc_world_dump_to_xml): get rid of unused info
	variable

	* rc-debug.h, rc-debug.c: overhauled a little more.  If
	RC_DEBUG_VERBOSE is defined, all rc_debug calls will also print
	file, function, and line information

2002-07-30  Ian Peters  <itp@ximian.com>

	* rc-packman.c, rc-packman.h, rc-rpmman.c, rc-debman.c:
	s/_check_database/_is_database_changed, because it was bugging me
	just that much

	* rc-world.c (struct _RCWorld): remove the did_sync_with_this_lock
	field
	(rc_world_sync): changed the logic around quite a bit to only sync
	at appropriate times; keep the world dirty if
	rc_world_get_system_packages fails
	(database_unlocked_cb): removed
	(rc_world_register_packman): removed reference to
	database_unlocked_cb
	(rc_world_get_system_packages): rather than retrying a failed
	query, return a gboolean to indicate status of the query

	* rc-world.h: change prototype for rc_world_get_system_packages

2002-07-30  Joe Shaw  <joe@ximian.com>

	* rc-rpmman.c (rc_rpmman_verify): Initialize signature_filename
	and payload_filename to NULL.

2002-07-30  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (close_database): s/close/rc_close
	(open_database): try to get a shared lock on the rpm database
	prior to opening it, to avoid the rpm database locking bug
	discovered yesterday

2002-07-30  Jon Trowbridge  <trow@ximian.com>

	* rc-resolver-context.c
	(rc_resolver_context_propagate_importance): #ifdef-ed away.
	(mark_important_info): Added.  A new implementation of importance
	propagation, with somewhat simpler rules.  This should do a better
	job of picking out which info items actually matter.
	(rc_resolver_context_foreach_info): Call mark_important_info on
	our list.

	* rc-resolver-info.c (rc_resolver_info_is_about): Added.  A
	convenience method for testing if an info item is about a
	particular package.

	* rc-world-dump.c (rc_world_dump_to_xml): Added an argument
	allowing extra XML to be passed in and prepended to the world
	dump.
	(rc_world_dump): Ditto.

2002-07-30  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (depends_fill_helper): plug a small memory leak
	(thanks, valgrind!)

2002-07-29  Jon Trowbridge  <trow@ximian.com>

	* rc-xml.c (rc_package_to_xml_node): Strip 8-bit characters out of
	the package summary and description that we put into the XML.
	This is a brute-force solution to make sure we don't end up with
	something that libxml2 will reject due to invalid UTF-8.

2002-07-27  Jon Trowbridge  <trow@ximian.com>

	* rc-xml.c (rc_xml_node_to_package): Support the epoch, version
	and release tags outside of the history section.  We need to do
	this to ensure that system packages are properly versioned.
	(rc_package_to_xml_node): Produce XML that rc_xml_node_to_package
	can process.  This fixes bugs with dump/undump.

2002-07-27  Ian Peters  <itp@ximian.com>

	* rc-packman.c (rc_packman_real_check_database): g_assert the
	right function, d'oh

2002-07-26  Jon Trowbridge  <trow@ximian.com>

	* rc-world-dump.c (add_channel_packages_cb): Removed
	debug spew.

	* rc-world.c (rc_world_sync): Added.  Basically just rescans the
	package db for the system packages, but contains some extra logic
	to avoid checking/scanning the database more than is absolutely
	necessary.
	(rc_world_conditional_sync): Conditions an rc_world_sync on a
	channel.  If we are performing a query that is filtered on a
	channel or channels rather than the system packages, there is no
	need to sync at that point -- it won't change the results of the
	actual query.
	(database_changed_cb): Just call rc_world_sync.
	(rc_world_register_packman): Listen for the "database_unlocked"
	signal, use it to reset the "did_sync_with_this_lock" flag that
	allows us to avoid syncs in some cases.
	(rc_world_find_installed_version): Added a sync.
	(rc_world_get_package): Added a conditional sync.
	(rc_world_get_package_with_constraint): Added a comment explaining
	why we don't need to sync here.
	(rc_world_guess_package_channel): Added a comment explaining why
	we don't need to sync here.
	(rc_world_foreach_package): Added a conditional sync.
	(rc_world_foreach_package_by_name): Added a conditional sync.
	(rc_world_foreach_upgrade): Added a conditional sync.
	(rc_world_get_best_upgrade): Added a comment explaining why we
	don't need to sync here.
	(rc_world_foreach_system_upgrade): Added a comment explaining why
	we don't need to sync here.
	(rc_world_foreach_providing_package): Added a conditional sync.
	(rc_world_check_providing_package): Added a conditional sync.
	(rc_world_foreach_requiring_package): Added a conditional sync.
	(rc_world_foreach_conflicting_package): Added a conditional sync.
	(rc_world_spew): Added a sync.

	* rc-rpmman.c (rc_rpmman_class_init): Actually initialize
	rc_packman_real_check_database.
	
	* rc-packman.c: Added DATABASE_LOCKED and DATABASE_UNLOCKED to the
	signals enum.
	(rc_packman_class_init): Define the "database_locked" and
	"database_unlocked" signals.
	(rc_packman_init): Initialize the lock_count to 0.
	(rc_packman_is_locked): Added.
	(rc_packman_lock): Tweaked to allow lock to be called multiple
	times, with successive calls only incrementing the lock count (and
	always succeeding).  Emit "database_locked" on the first call to
	rc_packman_lock.
	(rc_packman_unlock): Allow unlock to be called multiple times, and
	do nothing if the db isn't actually locked.  On the final call
	to rc_packman_unlock that actually unlocks the db, emit the
	"database_unlocked" signal.

	* rc-packman-private.h: Added a lock_count field to the
	RCPackmanPrivate struct.

2002-07-26  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (open_database): turns out rpm database locking is
	broken; to make sure things work correctly, after opening the
	database in O_RDWR, we need to use fcntl to lock the database by
	hand.  Fun.
	(close_database): close the db fd to release the lock

	* rc-rpmman.h: add a lock_fd to the Rpmman struct

2002-07-26  Joe Shaw  <joe@ximian.com>

	* rc-debman.c (verify_status): Make sure we unlock the database in
	the successful case as well.

2002-07-26  Ian Peters  <itp@ximian.com>

	* rc-packman.c, rc-packman.h (rc_packman_check_database): added

	* rc-rpmman.c: expose check_database for manual checking, keep the
	timeout with signal emmission as well

	* rc-debman.c: ditto

2002-07-26  Joe Shaw  <joe@ximian.com>

	* rc-world.c (rc_world_register_packman): Connect to the packman's
	database_changed signal.
	(database_changed_cb): Added.  Rescans the system packages.

2002-07-26  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c, rc-debman.c (check_database): pass a bool to
	determine whether to emit the database_changed signal at all.
	This is always set to FALSE except in the timeout function

2002-07-26  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (open_database): rescan the db mtime before
	reenabling the db watch timeout

	* rc-debman.c (lock_database): ditto

2002-07-26  Ian Peters  <itp@ximian.com>

	* rc-packman.c, rc-packman.h: Add _lock and _unlock methods.  Add
	a database_changed signal.

	* rc-rpmman.c, rc-rpmman.h: Remove the global lock, make each
	function specifically ask for the minimum lock it requires.  Add
	_lock and _unlock methods.  Add a timeout to watch for database
	changes and emit database_changed when it does.

	* rc-debman.c, rc-debman-private.h: pretty much same as above, but
	I'm less confident about this code.  It's not really my fault,
	though, because the locking in debian really sucks.  So, let's
	call it alpha quality.  *shrug*

2002-07-25  Ian Peters  <itp@ximian.com>

	* rc-package.c (rc_package_slist_copy): actually copy.  duh.

2002-07-25  Joe Shaw  <joe@ximian.com>

	* rc-xml.c (RCPackageSAXContext): Add an obsoletes list.
	(parser_package_start): If the tag is named "conflicts", check to
	see if there is an obsoletes attribute and set the dep list to be
	the temporary obsoletes list.  This handles the
	<conflicts obsoletes="1">...</conflicts> case.
	(parse_dep_attrs): Change to return a gboolean on whether or not
	the dep is actually an obsolete.  This handles the
	<conflicts><dep blah blah obsoletes="1"/></conflits> case.
	(parser_dep_start): If parse_dep_attrs() returns TRUE, add it to
	the temporary obsoletes list.  Otherwise, tack it onto the current
	dep list (should only ever be conflicts).
	(parser_package_end): Concatenate the actual obsolete list (from
	<obsoletes></obsoletes>) with the one in the temporary list.

2002-07-25  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_transact): fix a small memory leak caught
	by Jon

2002-07-25  Jon Trowbridge  <trow@ximian.com>

	* rc-queue-item.c (conflict_process_cb): If this is actually an
	obsolete, log an obsoletes info item instead of a conflicts-with
	info item.

	* rc-resolver-info.c (rc_resolver_info_obsoletes_new): Added.
	(rc_resolver_info_to_str): Added handling of _TYPE_OBSOLETES.

	* rc-resolver-info.h: Added RC_RESOLVER_INFO_TYPE_OBSOLETES to
	RCResolverInfoType enum.

2002-07-25  Ian Peters  <itp@ximian.com>

	* rc-package.h, rc-package.c (rc_package_slist_copy): added

	* rc-rpmman.c (rc_rpmman_transact): massively fixed.  Now only
	runs one transaction, instead of two.  Filters out packages from
	the remove list that are obsoleted by packages in the install
	list, which gets rid of the entire problem we had that caused us
	to use two transactions in the first place.

2002-07-25  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: whoops, fix _transact in the case where the
	to-be-installed package is not an upgrade

2002-07-25  Ian Peters  <itp@ximian.com>

	* rc-packman.h, rc-packman.c: rc_packman_transact takes a final
	gboolean, if set to TRUE, the transaction is actually run, if
	FALSE, equivalent to settting RC_JUST_KIDDING.

	* rc-rpmman.c, rc-debman.c: update to new _transact.

2002-07-25  Jon Trowbridge  <trow@ximian.com>

	* rc-debman.c (query_all_read_line_cb): The epoch is now a
	bitfield, so we can't take the address of it.

	* rc-xml.c (rc_channel_to_xml_node): Added.

	* rc-channel.h: Removed the prototype for rc_xml_node_to_channel,
	which doesn't actually exist.

	* rc-package-dep.h: Make the relation a 28-bit bitfield,
	shaving a few bytes off of our struct.

	* rc-package-spec.h: Make the epoch a 29-bit bitfield, shaving
	a few bytes off of our struct.

	* rc-dep-or.c (rc_dep_string_to_or_dep_slist): The epoch is now a
	bitfield, so we can't take the address of it.

	* rc-world-import.c (debian_packages_helper): The epoch is now
	a bitfield, so we can't take the address of it.

	* rc-world.c: (rc_world_dump): Moved to rc-world-dump.c, renamed
	rc_world_dump_to_xml.

	* rc-world-dump.c (rc_world_dump_to_xml): Added.  Basically a
	slightly revised version of the rc_world_dump function that used
	to be in rc-world.c.
	(rc_world_dump): Added.  A convenience routine that writes the xml
	to a buffer.
	(rc_world_undump_from_xml): Added.  Reassembles the dump
	information into the world.
	(rc_world_undump): Added.  A convenience routine that reads the
	xml from a buffer.

	* libredcarpet.h: Added #include "rc-world-dump.h"

2002-07-25  Ian Peters  <itp@ximian.com>

	* rc-packman.c, rc-packman.h: rc_packman_query now returns an
	RCPackageSList

	* rc-rpmman.c: rc_rpmman_query, rc_rpmman_query_v3, and
	rc_rpmman_query_v4 now all return an RCPackageSList.  Streamlined
	rc_rpmman_read_header to now take an RCPackage, got rid of
	rc_rpmman_check_match, and fixed rc_rpmman_transact to use _query
	properly.

	* rc-debman.c: rc_debman_query now returns an RCPackageSList.
	rc_debman_find_file updated to use _query properly.

2002-07-24  Peter Bowen  <pzb@ximian.com>

	* rc-xml.c (rc_package_to_xml_node): Put the dependencies in a 
	deps tag.  This allows the addition of additional dependency types
	without changes to the parser used in the server code.

2002-07-23  Jon Trowbridge  <trow@ximian.com>

	* rc-world-import.c (rc_world_add_channels_from_xml): Look for a
	channel alias in the XML and use it, if possible.
	(rc_world_add_channel_from_buffer): Added a new argument to
	specify the channel's alias.  Also, now returns a boolean
	indicating if adding the packages was successful or not.
	
	* rc-world.c (rc_world_add_channel): Added a new argument to
	specify the channel's alias.
	(rc_world_get_channel_by_alias): Added.

	* rc-channel.c (rc_channel_get_alias): Added.  An accessor for the
	alias field.

	* rc-channel-private.h: Added "alias" field to the RCChannel
	struct.

	* rc-queue-item.c (install_item_process): Generate a "needed by"
	info item whenever we can.  For some weird reason we were
	explicitly not creating the proper info items in the case of
	upgrades.

2002-07-22  Joe Shaw  <joe@ximian.com>

	* rc-debug.c (rc_debug): Changed the signature of the RCDebugFn
	callback to pass in the level of the current message.

2002-07-21  Jon Trowbridge  <trow@ximian.com>

	* rc-resolver-context.c (rc_resolver_context_uninstall_package):
	Fix a totally harmless logical glitch.

	* rc-queue-item.c (require_item_process): Gracefully handle the case 
	of ->requiring_package being NULL.  This happens when a requirement
	is added as an extra dependency.
	

2002-07-15  Jon Trowbridge  <trow@ximian.com>

	* rc-resolver-context.c (rc_resolver_context_foreach_info): Filter
	by package and priority before we merge info items, not
	afterwards.  Since merging is a relatively expensive operation,
	operating on a much shorter list can result in a substantial
	improvement in performance when dealing with complex resolutions
	(i.e. removing glibc).

2002-07-12  Frank Belew  <frb@ximian.com>

	* Makefile.am: add libredcarpet_a_SOURCES to fix make dist

2002-07-12  Joe Shaw  <joe@ximian.com>

	* rc-packman.c (rc_packman_query_file): Make sure we're returned a
	valid package (and not NULL) before we try to set things in it.

2002-07-12  Jon Trowbridge  <trow@ximian.com>

	* rc-resolver.c (rc_resolver_resolve_dependencies): Fix a cast
	that was causing a compiler warning.

2002-07-11  Joe Shaw  <joe@ximian.com>

	* rc-resolver.c (rc_resolver_resolve_dependencies): When we are
	building the initial queue, add the extra dependencies to the
	queue.

2002-07-11  Jon Trowbridge  <trow@ximian.com>

	* rc-resolver-queue.c (rc_resolver_queue_add_extra_dependency): A
	corresponding "extra dependency" function, which just creates
	a RCQueueItem_Require item for the given RCPackageDep and adds
	it to the item queue.

	* rc-resolver.c (rc_resolver_add_extra_dependency): Add an "extra
	dependency", which is just a RCPackageDep which we want to have
	satisfied.
	(rc_resolver_free): Clean up our list of extra dependencies.

	* rc-xml.c (rc_package_to_xml_node): Add the file_size and
	installed_size to the XML.

	* rc-packman.c (rc_packman_query_file): Stat the file and set
	the file_size of the RCPackage, but only if the implementation
	of query_file didn't do so already.

2002-07-10  Joe Shaw  <joe@ximian.com>

	* rc-xml.c (rc_package_to_xml_node): Add back in writing out the
	epoch, version, and release to the XML file.

2002-07-10  Joe Shaw  <joe@ximian.com>

	* rc-util.c (rc_compress_memory): Added.  Returns a zlib
	compressed byte array, like rc_uncompress_memory().

2002-07-09  Joe Shaw  <joe@ximian.com>

	* rc-world.c (add_channel_xml_cb): Include the channel name and ID
	when listing the channel packages.

2002-07-09  Joe Shaw  <joe@ximian.com>

	* rc-world.c (rc_world_dump): First pass at a function which will
	XMLify the RCWorld.  Currently dumps subscriptions, system
	packages, and packages in each channel, so output is huuuuuuuuge.

	* rc-world-import.c: Fix a couple of g_error()s which should be
	g_warning()s.

2002-07-04  Jon Trowbridge  <trow@ximian.com>

	* rc-world.c: Added "own_dep" flag to the RCPackageAndDep struct.
	(rc_package_and_dep_new_package): Set own_dep to TRUE, since we
	create the RCPackageDep ourselves.
	(rc_package_and_dep_new_pair): Just use the passed-in RCPackageDep
	pointer and set own_dep to FALSE.  We used to copy the object, but
	that ended up consuming a lot of memory unnecessarily.
	(rc_package_and_dep_free): Only free the RCPackageDep if own_dep
	is TRUE.

	* rc-distro.c (rc_figure_distro): Fixed a small memory leak.

	* rc-world-import.c (rc_world_add_channels_from_xml): Fixed a
	small memory leak.

2002-07-02  Joe Shaw  <joe@ximian.com>

	* rc-line-buf.c (rc_line_buf_class_init): Set the parameter type
	to INT from ENUM, since the latter wasn't working.

	* rc-rpmman.c (split_rpm): Don't free uninitialized memory.  Doh.

2002-07-01  Jon Trowbridge  <trow@ximian.com>

	* rc-world.c (rc_world_guess_package_channel): Added.  Guesses
	which channel a package came from.	

2002-06-14  Joe Shaw  <joe@ximian.com>

	* rc-packman.h: Add a RC_PACKMAN_STEP_PREPARE

	* rc-rpmman.c (transact_cb): Set the step to be
	RC_PACKMAN_STEP_PREPARE instead of RC_PACKMAN_STEP_CONFIGURE,
	since that's more accurate as to what it's actually doing.

2002-06-14  Joe Shaw  <joe@ximian.com>

	* rc-rpmman.c (split_rpm): Use g_file_open_tmp () instead of
	mkstemp () things like TMPDIR are obeyed.
	(rc_rpmman_verify): Don't need to bother passing in templates to
	split_rpm ().

2002-06-13  Joe Shaw  <joe@ximian.com>

	* rc-util.c (rc_rmdir): Argument should be const.

2002-06-12  Joe Shaw  <joe@ximian.com>

	* rc-rpmman.c (GTKFLUSH): Reenable this macro so we can get decent
	responsiveness from the RPM transaction callbacks.

2002-06-12  Joe Shaw  <joe@ximian.com>

	* rc-xml.c (parser_update_end): Get the description tag.  Must
	have missed it before.

2002-06-12  Joe Shaw  <joe@ximian.com>

	* rc-xml.c (parser_update_end): Assign the installed size to the
	correct struct element.

2002-06-11  Jon Trowbridge  <trow@ximian.com>

	* rc-package.c (rc_package_get_latest_update): Just return NULL if
	package->history is NULL, rather than complaining via
	g_return_val_if_fail.

2002-06-07  Joe Shaw  <joe@ximian.com>

	* rc-world.c (rc_world_foreach_channel): Protect against removing
	a channel from inside a foreach function.

2002-06-06  Ian Peters  <itp@ximian.com>

	* rc-debman.c (mark_status_read_line_cb): remove an unused
	variable

	* rc-rpmman.c (transact_cb): handle two more enum cases to kill a
	warning

2002-06-06  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: no more RC_RPM4, now check #if RPM_VERSION >= 40000

2002-06-05  Ian Peters  <itp@ximian.com>

	* rc-package-spec.c (rc_package_spec_version_to_str): man solaris
	sucks

2002-06-05  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (parse_version): added, guts of parse_versions
	(parse_versions): just calls parse_version now

2002-06-05  Ian Peters  <itp@ximian.com>

	* rc-verification.h: add RC_VERIFICATION_TYPE_ALL, add bit values
	to RC_VERIFICATION_TYPE_*

	* rc-packman.h, rc-packman.c: rc_packman_real_verify
	takes a type argument

	* rc-rpmman.c (rc_rpmman_verify): only run the requested
	verifications as per the type parameter

	* rc-debman.c (rc_debman_verify): only run the requested
	verifications as per the type parameter

2002-06-05  Ian Peters  <itp@ximian.com>

	* rc-package-spec.c (rc_package_spec_version_to_str): fix a stupid
	solaris crash, because solaris sucks

2002-06-04  Ian Peters  <itp@ximian.com>

	* rc-world-import.c (debian_packages_helper): this package update,
	like all of them in debian, has an epoch
	* rc-xml.c (parse_dep_attrs): set has_epoch when we find an epoch
	(rc_xml_node_to_package): has_epoch isn't always 1, it depends on
	the update spec
	(rc_xml_node_to_package_dep_internal): don't blindly check for an
	epoch with a default value, check if there is one instead, and set
	has_epoch appropriately

2002-06-04  Ian Peters  <itp@ximian.com>

	* rc-package-spec.h (struct _RCPackageSpec): add a has_epoch
	bitfield
	(rc_package_spec_init): take a has_epoch parameter
	(rc_package_spec_equal): take the has_epoch flag into account

	* rc-package-spec.c (rc_package_spec_init): has_epoch parameter
	(rc_package_spec_copy): has_epoch parameter
	(rc_package_spec_to_str, rc_package_spec_to_str_static,
	rc_package_spec_version_to_str,
	rc_package_spec_version_to_str_static): rewritten to not suck
	(rc_package_spec_equal): take the has_epoch flag into account

	* rc-package-dep.h (rc_package_dep_new): take a has_epoch flag

	* rc-package-dep.c (rc_package_dep_new): has_epoch flag, pass it
	to rc_package_spec_init
	(rc_package_dep_new_from_spec): pass the has_epoch from the spec
	to rc_package_dep_new
	(rc_package_dep_verify_relation): reformat flow, make
	modifications as appropriate for the has_epoch flag according to
	comments in the code from pzb

	* rc-debman-general.c (rc_debman_fill_depends): rc_package_dep_new
	takes has_epoch now

	* rc-dep-or.c (rc_dep_or_new_provide): rc_package_dep_new never
	has an epoch here

	* rc-world-import.c (rc_world_parse_debian): all debian packages
	have epochs

	* rc-debman.c (query_all_read_line_cb): all debian packages have
	epochs

	* rc-rpmman.c (rc_rpmman_read_header): take a has_epoch parameter,
	and use it wisely
	(parse_versions): take a has_epochs parameter, use it right
	(depends_fill_helper): parse_versions needs has_epochs, pass that
	into rc_package_dep_new
	(rc_rpmman_depends_fill): when we provide ourselves, note whether
	we have an epoch or not.  when we provide or require files, they
	never have epochs
	(rc_rpmman_check_match): take has_epoch into account
	(rc_rpmman_query_file, rc_rpmman_query_all_v4,
	rc_rpmman_query_all_v3, rc_rpmman_find_file_v4,
	rc_rpmman_find_file_v3): take has_epoch into account
	(rc_rpmman_version_compare): take has_epoch into account as per
	pzb's comments in the code

	* rc-xml.c: only write out epochs if has_epoch is set, set
	has_epoch when we find an epoch in the xml -- if there's no epoch
	in the xml, has_epoch remains 0

2002-06-04  Ian Peters  <itp@ximian.com>

	* rc-debman.c, rc-debman.h: compiles again against glib 2.0

2002-06-03  Joe Shaw  <joe@ximian.com>

	* rc-package.c (rc_package_slist_ref): Added.
	(rc_package_slist_unref): Don't free the list after unreffing it.

	* rc-rpmman.c (rc_rpmman_query_all_v3):
	* rc-world-import.c (rc_world_parse_helix): Free the list after
	unreffing it here.

2002-06-03  Jon Trowbridge  <trow@ximian.com>

	* rc-queue-item.c (install_item_process): Fix the relation tag on
	the RCPackageDep we build to find conflicting packages.  This
	fixes a bug with versioned conflicts.

	* rc-debug.c (rc_debug): Make the format string arg const.

2002-05-30  Joe Shaw  <joe@ximian.com>

	* rc-world.c (rc_world_get_packman): Get the packman associated
	with the RCWorld.
	(rc_world_get_system_packages): rc_packman_get_reason() returns a
	const gchar *, so declare reason const and don't free it afterward.

2002-05-29  Jon Trowbridge  <trow@ximian.com>

	* rc-world-subscriptions.c: Added.  Functions for
	importing/exporting the RCWorld's subscription data to/from XML.

	* rc-world-import.c (rc_world_add_packages_from_buffer): Added.  We
	want to make maximum use of our cool SAX parser.

	* rc-channel.c (rc_channel_get_last_update): Added.

2002-05-28  Jon Trowbridge  <trow@ximian.com>

	* rc-world-import.c (rc_world_add_channels_from_xml): Added.
	Processes the red-carpet channel XML file, filtering out channels
	that don't match our distro.

	* rc-util.c (rc_uncompress_xml): Added.  Uncompresses & xml-parses
	a block of memory.

	* rc-debug.c (rc_debug_set_display_handler): Added the ability to
	set a displayed message handler.
	(rc_debug): If a displayed message handler is set, use it.

	* rc-channel.c: Removed rc_chanel_parse_xml, Worldifiying it and
	moving it to rc-world-import.c.

	* rc-world.c (rc_world_add_channel): Added debug spew.

2002-05-23  Jon Trowbridge  <trow@ximian.com>

	* rc-resolver.c: (rc_resolver_add_subscribed_channel) Removed.
	(rc_resolver_resolve_dependencies): Don't worry about propogating
	any lists of subscribed channels.

	* rc-resolver-context.c
	(rc_resolver_context_get_channel_priority): Get the subscription
	status directly from the channel.

	* rc-channel.c (rc_channel_subscribed): Added.
	(rc_channel_set_subscription): Added.

	* rc-channel-private.h: Added subscribed flag (and made two other
	gbooleans into single-bit entries.)

	* rc-world.c (rc_world_register_packman): The beginnings of
	our RCWorld/RCPackman integration...
	(rc_world_get_system_packages): Use the packman to find all of
	the packages installed on the system and store them in the world.

2002-05-23  Joe Shaw  <joe@ximian.com>

	* rc-util.c (rc_buffer_map_file): Added, mmap()s a file into an
	easy-to-use structure!
	(rc_buffer_unmap_file): Unmaps an RCBuffer.

2002-05-23  Jon Trowbridge  <trow@ximian.com>

	* rc-packman.h: Don't include rc-packman-private.h; actually make
	it private instead.

	* Makefile.am: Fixed to install libredcarpet and its headers like
	any other library.

	* rc-package.c (rc_package_get_best_upgrade): Added.

2002-05-10  Jon Trowbridge  <trow@ximian.com>

        * rc-queue-item.c (install_item_process): When installing,
        uninstall any packages that explicitly conflicts with us.

        * rc-world.c (rc_world_new): Initialize ->conflict_by_name.
        (rc_world_freeze): Freeze ->conflict_by_name.
        (rc_world_thaw): Thaw ->conflict_by_name.
        (rc_world_add_package): Populate ->conflict_by_name.
        (rc_world_foreach_conflicting_package): Added.  Iterate over
        conflicts.

	* rc-xml.c (rc_package_to_xml_node): Properly write out obsoletes.

2002-05-09  Jon Trowbridge  <trow@ximian.com>

	* rc-package.c (rc_package_unref): Unref our channel.

	* rc-xml.c (parser_toplevel_start): Ref our channel.
	(rc_xml_node_to_package): Ref our channel.

	* rc-world-import.c (rc_world_add_channel_from_buffer): Renamed
	from rc_world_parse_channel, and better integrated with the new
	"the world constructs and contains all channels".
	(rc_world_parse_debian): Ref our channel.

	* rc-world.c (rc_world_free): Set the channel's world pointer to
	NULL before we unref it.
	(rc_world_add_channel): Store the world pointer inside the
	channel.
	(rc_world_remove_channel): Set the channel's world pointer to
	NULL before we unref it.

	* rc-channel.c (rc_channel_ref): Added.
	(rc_channel_unref): Added.
	(rc_channel_foreach_package): Added.  Use the channel's
	RCWorld (which we now carry around inside of the struct)
	to iterate over the channel's packages.
	(rc_channel_package_count): Added.

	* rc-channel-private.h: Store the associated
	RCWorld * in the channel's struct.

	* rc-channel-private.c (rc_channel_new): Set refs to 1 initially.
	(rc_channel_free): Removed.

2002-05-08  Joe Shaw  <joe@ximian.com>

	* rc-package-dep.c, rc-package-dep.h (rc_package_dep_new): The
	string arguments should really be const.

	* rc-package-spec.c, rc-package-spec.h (rc_package_spec_init): Ditto.

2002-05-07  Jon Trowbridge  <trow@ximian.com>

	* rc-xml.c: Include rc-channel-private.h.

	* rc-world-import.c: Include rc-channel-private.h.

	* rc-world.c: Moved the RCWorld struct definition into the .c file
	to make it opaque.
	(rc_world_free): Free our channels.
	(rc_world_add_channel): Added.  Creates a new channel and stores
	it in the RCWorld.
	(rc_world_remove_channel): Added.
	(rc_world_foreach_channel): Added.
	(rc_world_get_channel_by_name): Added.
	(rc_world_get_channel_by_id): Added.
	(rc_world_foreach_system_upgrade): Used to be called
	rc_world_foreach_system_package_with_upgrade, but that was just
	too long.
	
	* rc-package.c (rc_package_to_str): Use rc_channel_get_name
	accessor function.

	* rc-channel.c: Moved rc_channel_new and rc_channel_free to
	rc-channel-private.c.
	(rc_channel_get_id): Added.
	(rc_channel_get_name): Added.
	(rc_channel_get_description): Added.
	(rc_channel_get_type): Added.
	(rc_channel_slist_free): Removed.

	* rc-channel-private.c (rc_channel_new): Moved from rc-channel.c.
	(rc_channel_free): Moved from rc-channel.c.

	* rc-channel-private.h: Moved the RCChannel struct into a private
	header to make it opaque.

2002-05-06  Jon Trowbridge  <trow@ximian.com>

	* rc-world.c: (hashed_slist_*): Added a set of functions for
	dealing with hashtables of slists.  This gets rid of our
	extensive use of g_slist_append... now all list additions
	are done via prepends.
	(remove_packages_generic): Removed.
	(remove_package_structs_generic): Removed.
	(rc_world_new): Use hashed slists.
	(rc_world_free): Use hashed slists.
	(rc_world_add_package): Use hashed slists.
	(remove_package_cb): Use hashed slists.
	(remove_package_struct_cb): Use hashed slists.
	(rc_world_remove_package): Use hashed slists.
	(remove_package_by_channel_cb): Use hashed slists.
	(remove_package_struct_by_channel_cb): Use hashed slists.
	(rc_world_remove_packages): Use hashed slists.
	(rc_world_find_installed_version): Use hashed slists.
	(rc_world_get_package): Use hashed slists.
	(rc_world_foreach_package): Use hashed slists.
	(rc_world_foreach_package_by_name): Use hashed slists.
	(rc_world_foreach_providing_package): Use hashed slists.
	(rc_world_check_providing_package): Use hashed slists.
	(rc_world_foreach_requiring_package): Use hashed slists.

	* rc-resolver-info.c (rc_resolver_info_misc_add_action): Added.
	(rc_resolver_info_misc_add_trigger): Added.  These two functions
	are related to improved error reporting in the dependency code.

	* libredcarpet.h: include rc-xml.h.

2002-05-02  Jon Trowbridge  <trow@ximian.com>

	* rc-xml.c (sax_end_document): Set ctx->text_buffer to NULL so
	that we won't double-free it.

	* rc-xml.c (sax_end_document): Just to be sure, free
	->text_buffer.
	(parser_package_end): Set our package variables using a
	g_strstripped version of ->text_buffer.
	(parser_update_end): Set of update variables using a g_strstripped
	version of ->text_buffer.
	(sax_end_element): Clear ->text_buffer when we hit channel or
	subchannel elements.
	(sax_characters): If we get multiple sax_characters calls in a
	row, concatenate the characters into text_buffer instead of
	leaking/dropping the previous characters.

	* rc-resolver.c (rc_resolver_resolve_dependencies): Don't leak the
	split resolver queue.

	* rc-xml.c (parser_package_end): strdup the version and release
	when copying the update spec info to the package spec, thus
	avoiding a segfault when the package is unrefed.
	(parser_update_end): Use the rc_package_add_update instead of
	directly accessing the package's ->history.
	(rc_package_sax_context_done): s/rc_package_free/rc_package_unref/
	(rc_xml_node_to_package): Use rc_package_add_update.
	(rc_xml_node_to_package): strdup the version and release when
	copying the update spec info to the package spec.

	* rc-world.c (rc_package_and_dep_new_package): Added as a
	convenience function.
	(rc_package_and_dep_new_pair): Added as a convenience function.
	(rc_package_and_dep_free): Added as a convenience function.
	(rc_world_free): Actually try to free all of our resources when we
	free the world.  Previously we've just leaked with gusto.
	(rc_world_add_package): Use our rc_package_and_dep_* convenience
	functions.
	(remove_package_structs_generic): Use our rc_package_and_dep_*
	convenience functions.  Since we no longer have RCPackageAndSpec
	structs, this code now is slightly less generic, and thus easier
	to understand.

	* rc-world-import.c (rc_world_add_packages_from_xml): Unref
	package after adding it to the world.
	(rc_world_parse_helix): Unref package after adding it to the
	world.
	(rc_world_parse_debian): Unref package after adding it to the
	world.
	(debian_packages_helper): Call rc_package_add_update instead
	of directly manipulating the package's ->history.

	* rc-package.c (rc_package_new): Add leak-checking code.
	(rc_package_unref): Add leak-checking code.
	(rc_package_spew_leaks): Added.  If leak-checking is enabled,
	dump a list of all leaked packages.
	(rc_package_add_update): Added.

	* rc-package-update.c (rc_package_update_free): Don't cast the
	update to a spec, just pass a pointer to that element of the
	structure.

2002-05-01  Joe Shaw  <joe@ximian.com>

	* Makefile.am: Add rc-xml.[ch].

	* rc-package-dep.[ch], rc-package-update.[ch], rc-package.[ch]:
	Move the DOM XML routines out of these files.

	* rc-xml.c: New file, contains the DOM routines above and a new
	SAX parser for packageinfo files.

	* rc-util.c (rc_string_to_guint32_with_default): Added.

	* rc-world-import.c (rc_world_parse_helix): Conditionalize whether
	the SAX or DOM parser is used depending on the RC_OLD_XML
	environment variable.

2002-05-01  Jon Trowbridge  <trow@ximian.com>

	* rc-packman.c (rc_packman_query_file_list): Use rc_package_unref.

	* rc-rpmman.c (rc_rpmman_query_all_v3): Use
	rc_package_slist_unref.
	(rc_rpmman_transact): Use rc_package_unref instead of _free.

	* rc-world-import.c (rc_world_parse_debian): Use rc_package_new
	to create an RCPackage, not g_new0.

	* rc-world.c (rc_world_add_package): Ref our packages when added.
	(remove_packages_generic): Unref our packages when removed.

	* rc-package.c (rc_package_new): Set initial refcount to 1.
	(rc_package_ref): Added.
	(rc_package_unref): Added.
	(rc_package_free): Removed.
	(rc_package_slist_unref): Created from rc_package_slist_free.

2002-04-30  Joe Shaw  <joe@ximian.com>

	* rc-distro.c (rc_figure_distro): The semantics of the
	g_strsplit() function changed in glib2.  Update.

	* *.[ch]: Update libxml header includes, check the xmlNode's types
	to ensure that we only get XML_NODE_ELEMENTs and not
	XML_NODE_TEXTs which break the fragile DOM parsing.
	
2002-04-30  Jon Trowbridge  <trow@ximian.com>

	* Ported to glib2.

2002-04-24  Jon Trowbridge  <trow@ximian.com>

	* rc-queue-item.c (require_item_process): Attach the requiring
	package to the "There are no installable providers..." log entry.
	(require_item_process): Attach both packages foo and bar to the
	"Upgrade to foo to avoid removing bar..." log entry.
	(conflict_process_cb): Attach packages to the "A conflict over foo
	(bar) requires..." log entry, and flag it as an error.  Attach
	packages to the "Marking foo as uninstallable due to conflicts..."
	log entry.
 
	* rc-resolver-context.c (rc_resolver_context_install_package):
	"Can't install foo since it is already marked as needing to be
	uninstalled" and "Can't install foo, since a package of the same
	name..."  are error conditions, so add them to the log via
	_add_error_str.
	(rc_resolver_context_uninstall_package): "Can't uninstall the
	to-be-installed..." is an error condition, log it via
	_add_error_str.
	(rc_resolver_context_invalidate): Removed.
	(rc_resolver_context_add_info): Set the propagated_importance flag
	to FALSE.  If the info item that we are adding is flag as an
	error, invalidate the context.  This replaces the need for
	explicit calls to rc_resolver_context_invalidate.
	(rc_resolver_context_add_error_str): Added.  A convenience routine
	for logging errors.
	(rc_resolver_context_propagate_importance): Repeatedly walk across
	the log items, flagging as important any items that are mentioned
	in an "important" or "error" info item.  We repeat this process
	until no new items are flagged.  The point of this is, in the case
	of an error, to try to distinguish a subset of the entire log and
	allow us to highlight the "important" log entries.
	(rc_resolver_context_foreach_info): Call _propagate_importance
	before iterating.
	(spew_cb): Preceed "important" items with "[!!!!!]" and "error"
	items with "[ERROR]" when spewing.

	* rc-resolver-info.c (rc_resolver_info_add_related_package):
	Added.  Pushes a package onto the package_list.
	(rc_resolver_info_is_error): Added.  Accessor for is_error flag.
	(rc_resolver_info_flag_as_error): Added.  Sets is_error to TRUE.
	(rc_resolver_info_is_important): Added.  Returns is_error ||
	is_important.  After all, errors are inherently important. :)
	(rc_resolver_info_flag_as_important): Added.  Sets is_important to
	TRUE.
	(rc_resolver_info_copy): Copy is_error and is_important flags.

	* rc-resolver-info.h: Add is_error and is_important
	flags to the RCResolverInfo struct.

2002-04-18  Jon Trowbridge  <trow@ximian.com>

	* rc-queue-item.c (rc_queue_item_branch_is_empty): Added.
	(require_item_process): If none of the potential upgrades are
	actually installable, we have no choice but to just go ahead and
	remove the package in question.

2002-04-16  Jon Trowbridge  <trow@ximian.com>

	* rc-package.c (rc_package_to_xml_node): Restored.

	* rc-package-update.c (rc_package_update_to_xml_node): Restored.

	* rc-package-dep.c (rc_package_dep_or_slist_to_xml_node): Restored.
	(rc_package_dep_to_xml_node): Restored.

2002-04-16  Jon Trowbridge  <trow@ximian.com>

	* rc-package.c (rc_xml_node_to_package): Treat a conflicts section
	in the XML as obsoletes if the 'obsoletes' property is set.

2002-04-12  Peter Bowen  <pzb@ximian.com>

	* rc-distro.c: YDL2.2, MDK8.2, SuSE 8.0, RHL7.3, and Debian 3.0 support

	* rc-rpmman.c (vercmp): use STRICT_RPM_VERCMP define to decide sort
				order for alpha and numeric chars and whether
				we string "mdk" from the end of strings

2002-04-11  Jon Trowbridge  <trow@ximian.com>

	* rc-queue-item.c (install_item_process): Check to make sure that
	a package with the same version number isn't already installed.
	If it is, do nothing.  (Previously this case got treated like an
	upgrade, and we would try to add and remove the same package,
	which is not cool.)

2002-04-09  Jon Trowbridge  <trow@ximian.com>

	* rc-package.c (rc_xml_node_to_package): Check if the "obsoletes"
	property is set in a RCPackageDep in the conflict section.  If so,
	treat it like an obsolete.

	* rc-world.c: Moved rc_world_add_packages_from_xml and
	rc_world_add_packages_from_slist to rc-world-import.c.  Added some
	gtk-doc docs.

	* rc-world-import.c (rc_world_add_packages_from_xml): Moved here
	from rc-world.c.
	(rc_world_add_packages_from_slist): Moved here from rc-world.c.

2002-03-29  Peter Bowen  <pzb@ximian.com>

	* rc-rpmman.c (rc_rpmman_version_compare): always use epochs in
	version comparisions

2002-03-27  Jon Trowbridge  <trow@ximian.com>

	* rc-queue-item.c (install_item_process): Add support for
	_DUE_TO_OBSOLETE.  If the conflict item is generated from an
	obsolete, flag it as such.
	(require_process_cb): Add support for _DUE_TO_OBSOLETE.
	(conflict_process_cb): If the conflict comes from an obsolete,
	flag the uninstall items as such.  Add support for
	_DUE_TO_OBSOLETE.
	(conflict_item_process): If the conflict item comes from an
	obsolete, set a flag in the ConflictProcessInfo struct.
	(uninstall_item_process): Pass a flag to
	rc_resolver_context_uninstall_package which indicates whether or
	not the uninstall is due to an obsolete.

	* rc-resolver-context.c (rc_package_status_to_string): Add support
	for _DUE_TO_OBSOLETE.
	(rc_resolver_context_set_status): Add support for
	_DUE_TO_OBSOLETE.
	(rc_resolver_context_install_package): Add support for
	_DUE_TO_OBSOLETE.
	(rc_resolver_context_upgrade_package): Add support for
	_DUE_TO_OBSOLETE.
	(rc_resolver_context_uninstall_package): Added an argument to
	indicate whether or not this uninstall is due to an obsolete.
	Change the status accordingly.
	(rc_resolver_context_package_is_absent): Add support for
	_DUE_TO_OBSOLETE.
	(uninstall_pkg_cb): Add support for _DUE_TO_OBSOLETE.
	(requirement_possible_cb): Add support for _DUE_TO_OBSOLETE.

	* rc-resolver-context.h: Added new element to RCPackageSpec enum:
	RC_PACKAGE_STATUS_TO_BE_UNINSTALLED_DUE_TO_OBSOLETE.

	* rc-package.h: Added a list of obsoletes to the RCPackage struct.

	* rc-package.c (rc_package_copy): Copy the list of obsoletes.
	(rc_package_free): Free the list of obsoletes.
	(rc_xml_node_to_package): Read obsoletes in from XML.

	* rc-rpmman.c (rc_rpmman_depends_fill): Store obsoletes in a
	separate list, instead of just treating them as conflicts.

	* rc-queue-item.c (install_item_process): Generate conflict items
	from a package's obsoletes.

2002-03-26  Jon Trowbridge  <trow@ximian.com>

	* rc-world.c (rc_world_add_packages_from_xml): Added.
	(rc_world_get_package): Fixed input variable checks.
	(rc_world_get_package_with_constraint): Added.  Replaces the
	similarly-named function from rc-package-info.c.

	* rc-verification.c: #include <stdlib.h> to get rid of
	compiler warnings. 
	(rc_verify_gpg): Removed unused local variable.

	* rc-resolver.c: Each RCResolver now carries around an RCWorld,
	which is to be used for all package queries related to that
	resolution.
	(rc_resolver_set_world): Added.
	(rc_resolver_get_world): Added.  Use the global RCWorld as a
	fallback.
	(rc_resolver_verify_system): Use our local RCWorld.
	(rc_resolver_resolve_dependencies): Initialize our root context
	with our local world.

	* rc-resolver-queue.c (rc_resolver_queue_add_package_to_install):
	Initialize the install item using the RCResolverContext's RCWorld.
	(rc_resolver_queue_add_package_to_remove): Ditto with the
	uninstall item.
	(rc_resolver_queue_add_package_to_verify): Ditto with the require
	and conflict items.

	* rc-resolver-context.c: Each RCResolverContext now carries around
	an RCWorld, which it uses for all package queries.

	* rc-queue-item.c: Each RCQueueItem now carries around an RCWorld,
	which it uses for all package queries.  This change leads to a
	bunch of small changes throughout the API and in the code.

	* rc-package.c (rc_xml_node_to_package): If a package doesn't have
	any history, we try to guess the version number information by
	looking for a provide with the same name as the package.

	* rc-package-spec.c (rc_package_spec_get_type): Added an
	RCWorld argument.

	* rc-package-info.c (rc_channel_parse): Took all of this code
	and...

	* rc-world-import.c (rc_world_parse_channel): ...moved it
	here, along with some renaming.

	* rc-dep-or.c: Removed rc_dep_or_process_system_and_channels and
	associated helper functions.

	* rc-channel.c: Removed inclusion of "rc-package-info.h".
	Removed rc_xml_node_process and rc_xml_node_to_channel.

2002-03-22  Peter Bowen  <pzb@ximian.com>

	* rc-rpmman.c (vercmp): add comments, remove #if 0 code,
				small amount of refactoring
	(rc_rpmman_version_compare): bring code inline with rpmlib

2002-03-20  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: minor fix to how we parse EVRs

2002-03-20  Jon Trowbridge  <trow@ximian.com>

	* rc-world.c (rc_world_foreach_requiring_package): The order of
	the arguments to rc_package_dep_verify_relation matters, or
	so I'm told...

	* rc-world.c (rc_world_get_best_upgrade): Added.  Returns the best
	upgrade for a package, or NULL if none is available.  Right now
	this function just returns the package of the same name with the
	highest version number, but it would be nice to do something a bit
	more nuanced later.
	(rc_world_foreach_system_package_with_upgrade): Added.  Iterates
	across the installed system packages, invoking the callback for
	each one that has an upgrade.

2002-03-19  Jon Trowbridge  <trow@ximian.com>

	* rc-world.c (rc_world_get_package): Added.  Looks up a
	package by channel and name.

2002-03-18  Jon Trowbridge  <trow@ximian.com>

	* rc-resolver-info.c (rc_resolver_info_merge): Fix logic bug
	that was causing non-duplicate _TYPE_MISC info messages to be
	incorrectly "merged".

2002-03-18  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: minor build fixes for static linking, ie solaris

2002-03-14  Ian Peters  <itp@ximian.com>

	* rc-rpmman.h: added rpmExpandNumeric

	* rc-rpmman.c: if we're using a new enough version of RPM, and
	there are stale concurrent db files in /var/lib/rpm, and we're not
	supposed to be using concurrent access shit, clean up after the
	library.

2002-03-14  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_transact): reverse the order we run
	removes and installs in, to work around some previously unknown
	behaviour with rpm obsoletes.  Also, make one error fatal instead
	of abort, so that the client will exit correctly.

2002-03-12  Jon Trowbridge  <trow@ximian.com>

	* rc-world.c (foreach_package_cb): Doh!  We weren't using the
	iter variable.

2002-03-12  Joe Shaw  <joe@ximian.com>

	* rc-packman-private.h: Move RC_PACKMAN_CAP_* out of here, move
	rc_packman_set_capabilities() into here.

	* rc-packman.h: Move RC_PACKMAN_CAP_* into here, move
	rc_packman_set_capabilities() out of here.

2002-03-12  Jon Trowbridge  <trow@ximian.com>

	* rc-package-info.c (rc_channel_parse_debian): Store packages
	in RCWorld only, not in the channel.
	(pkginfo_find_package_with_constraint): Find the package in
	the RCWorld, not in the channel.

	* rc-dep-or.c (package_process_helper_fn): Changed to work with
	rc_world_foreach_package_by_name instead of g_hash_table_foreach.
	(rc_dep_or_process_system_and_channels): Use
	rc_world_foreach_package.

	* rc-channel.c (rc_channel_new): Removed initialization of
	->packages, ->dep_table, ->dep_name_table.
	(rc_channel_free): Removed clean-up of ->packages, ->dep_table,
	->dep_name_table.
	(rc_xml_node_process): Only store the loaded package in RCWorld,
	not in the channel.

	* rc-world.c (foreach_package_cb): Doh!  We weren't using the
	iter variable.

2002-03-12  Joe Shaw  <joe@ximian.com>

	* rc-packman-private.h: Move RC_PACKMAN_CAP_* out of here, move
	rc_packman_set_capabilities() into here.

	* rc-packman.h: Move RC_PACKMAN_CAP_* into here, move
	rc_packman_set_capabilities() out of here.

2002-03-12  Jon Trowbridge  <trow@ximian.com>

	* rc-world.c (channel_match): Added.  A small function to do our
	channel compares for us, properly handling
	RC_WORLD_SYSTEM_PACKAGES, RC_WORLD_ANY_CHANNEL and our new
	RC_WORLD_ANY_NON_SYSTEM.
	(remove_packages_generic): Use channel_match.
	(remove_package_structs_generic): Use channel_match.
	(foreach_package_cb): Use channel_match.
	(rc_world_foreach_package_by_name): Use channel_match.
	(rc_world_foreach_providing_package): Use channel_match.
	(rc_world_check_providing_package): Use channel_match.
	(rc_world_foreach_requiring_package): Use channel_match.

2002-03-11  Joe Shaw  <joe@ximian.com>

	* rc-channel.c (rc_channel_priority_parse): Step through the
	priority_str so we don't infinitely loop.

2002-03-10  Peter Bowen  <pzb@ximian.com>

	* rc-package-dep.c: (rc_package_dep_verify_relation): Fix dumb typo 
				that was causing a segfault.  Also initialize 
				compare_ret at function start.

2002-03-10  Peter Bowen  <pzb@ximian.com>

	* rc-debman.c: (rc_debman_init): set capabilities instead of rpmish
	* rc-package-dep.c: remove rpmish
			    (rc_package_dep_verify_relation): rewrite to 
				support paking two RCPackageDeps
			    (rc_package_dep_verify_package_relation): removed
			    (rc_package_dep_equal): removed
			    (rc_package_dep_slist_is_item_subset): removed
			    (rc_package_dep_is_subset): removed
			    (rc_package_dep_is_subset_real): removed
			    (rc_package_dep_invert): removed
			    (rc_package_dep_slist_invert): removed
			    (rc_package_dep_weaken): removed
			    (rc_package_dep_slist_weaken): removed
			    (rc_package_dep_is_fully_weak): removed
			    (rc_package_dep_slist_is_fully_weak): removed
			    (rc_package_dep_slist_has_dep): removed
			    (rc_package_dep_system_is_rpmish): removed
	* rc-package-dep.h: removed prototypes for removed functions
	* rc-package-update.h: include rc-util.h
	* rc-packman-private.h: add RC_PACKMAN_CAP_* defines and add
				capabilities to _RCPackmanPrivate struct
	* rc-packman.c: (rc_packman_init): initial capabilities field
			(rc_packman_set_capabilities): new
			(rc_packman_get_capabilities): new
	* rc-packman.h: add rc_packman_{get,set}_capabilities prototypes
	* rc-rpmman.c: (rc_rpmman_init): set capabilities instead of rpmish

2002-03-09  Ian Peters  <itp@ximian.com>

	* rc-deps.c, rc-deps.h, rc-deps-util.c, rc-deps-util.h,
	rc-deps-private.h: removed

	* rc-dep-or.c: added

	* rc-dep-or.h: added

	* Makefile.am: remove and add the above files from the build

	* libredcarpet.h: remove rc-deps.h

	* rc-debman-general.c: s/rc-deps-util.h/rc-dep-or.h/

	* rc-debman.c: remove rc-deps.h

	* rc-debug-misc.h: remove rc-deps.h

	* rc-package-dep.h (rc_package_dep_verify_relation): take a second
	RCPackageDep, not an RCPackageSpec

	* rc-package-dep.c: s/rc-deps-util.h/rc-dep-or.h
	(rc_package_dep_slist_verify_relation): removed
	(rc_package_dep_verify_relation): take a second RCPackageDep, not
	an RCPackageSpec
	(rc_package_dep_verify_package_relation): update for new
	rc_package_dep_verify_relation, no need to check the package by
	hand, since it provides itself

	* rc-package-info.c (pkginfo_find_package_with_constraint): update
	to handle new rc_package_dep_verify_relation -- this one is
	special, because we don't have an RCPackageDep here, so we make
	one

	* rc-package-spec.c: minor das_global_packman changes

	* rc-packman.h, rc-packman.c (rc_packman_set_packman): added

	* rc-queue-item.c (uninstall_item_process): new
	rc_package_dep_verify_relation behaviour

	* rc-world.h (rc_world_foreach_requiring_package): take an
	RCPackageDep, not an RCPackageSpec

	* rc-world.c: s/rc-deps-util.h/rc-dep-or.h/
	(rc_world_foreach_providing_package): pass pad->dep, not
	pad->dep->spec, to rc_package_dep_verify_relation
	(rc_world_foreach_requiring_package): take a dep not a spec

2002-03-09  Jon Trowbridge  <trow@ximian.com>

	* rc-world.c (remove_package_structs_generic): Uh, don't go
	into an infinite loop if we decide not to remove a specific
	package struct.  Double-doh!

	* rc-queue-item.c (require_process_cb): Screen out "impossible"
	installs from the list.  This could save us a lot of fruitless
	branchless in some cases.

	* rc-world.c (remove_packages_generic): Don't test for a non-NULL
	channel parameter when removing by channel, since a NULL value is
	perfectly legal (and denotes a system package).  Doh!
	(remove_package_structs_generic): Ditto.  These two changes together
	fix Ximian #21344.

2002-03-08  Jon Trowbridge  <trow@ximian.com>

	* rc-queue-item.c (require_item_process): Don't search our
	"uninstall" branch if it looks like the upgrade will install
	cleanly.  Filter out uninstallable upgrades.  (Fixes case #39)

	* rc-resolver-context.c
	(rc_resolver_context_requirement_is_possible): Added.

	* rc-world.c (rc_world_add_package): Track provides as
	RCPackageDeps, not RCPackageSpecs.
	(rc_world_foreach_providing_package): Provides are now
	RCPackageDeps.
	(rc_world_check_providing_package): Provides are now
	RCPackageDeps.  Added "filter_dups_of_installed" flag.  Fixed
	idiotic bug of the century: we were looking at the first list
	element repeatedly, instead of actually iterating.  Doh!

2002-03-08  Ian Peters  <itp@ximian.com>

	* rc-deps-util.c (free_package_hash_helper): not needed
	(rc_dep_or_process_system_and_channels): i knew there had to be a
	function to destroy our unique hash tables, just couldn't find it;
	now uses rc_hash_table_slist_free

2002-03-07  Ian Peters  <itp@ximian.com>

	* rc-debman.c (rc_debman_init): the extension was only being set
	after the abort for non-root, leading to a crash for normal users.

	* rc-deps-util.c (rc_dep_or_new): we were leaking the depstr when
	we found an identical or_dep in the hash table.
	(free_package_hash_helper): added
	(rc_dep_or_process_system_and_channels): free the hash table and
	shallow free the element slists, using free_package_hash_helper

	* rc-package.c (rc_package_to_str_static): the local variable
	wasn't flagged as static, so it was never freed.  whoops!

	* rc-rpmman.c (load_fake_syms): whoops, the hdrVec stuff is
	conditional at compile, not runtime, in the static case.

	* rc-world.c (rc_world_check_providing_package): plug a huge
	memory leak, the hash table constructed in this function was only
	freed if our search was a failure and we returned FALSE.  Our
	search succeeds quite a bit, is the thing.

2002-03-06  Joe Shaw  <joe@ximian.com>

	* rc-rpmman.c (rc_rpmman_transact): Free the correct transaction
	set; cut-and-paste error.

2002-03-05  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: renamed configuring to installing in the
	InstallState struct
	(transact_cb): since we're doing installs and removes in separate
	transactions, some of the hairy logic here gets a lot cleaner.
	still have to count to get configures and removes right,
	though... :(
	(render_problems): added.  takes an rpmProblemSet, and adds it,
	formatted, to the RCPackman error string.
	(rc_rpmman_transact): massive rewriting.  now assembles an
	install/remove transaction set, tests it, but then constructs two
	more, an install only and remove only, to actually run them
	separately.  please test heavily.

2002-03-05  Joe Shaw  <joe@ximian.com>

	* rc-channel.c (rc_xml_node_to_channel): Move the priority stuff
	from here (basically parsing packageinfo.xml.gz) to...
	(rc_channel_parse_xml): ... here (parsing channels.xml.gz).  Man,
	these function names are confusing.

2002-03-05  Jon Trowbridge  <trow@ximian.com>

	* rc-queue-item.h: Add concept of priority to queue items.	

	* rc-queue-item.c (package_slist_to_string): Added back.
	(install_item_to_string): Made more verbose.
	(rc_queue_item_new_uninstall): Boost the priority of uninstall
	items, so that they get processed first.
	(install_item_process): If we have ->needed_by packages, and if
	they are all marked as to-be-uninstalled, do nothing.  (This fixes
	verification case #37.)

	* rc-resolver-queue.c (rc_resolver_queue_process_once): Process
	items in order of priority.

	* rc-world.c (rc_world_remove_package): Added.  Allows a single
	package to be removed from the RCWorld.
	(remove_packages_generic): Added.  This is a static function for
	removing packages from slists -- the code was originally in one of
	the g_hash_table_foreach_remove callbacks, but I've split it out
	to avoid some code duplication.
	(remove_package_structs_generic): Added.  Same as above, except it
	acts on package structs (RCPackageAndSpec, RCPackageAndDep)
	instead of packages.

2002-03-04  Jon Trowbridge  <trow@ximian.com>

	* rc-queue-item.c (rc_queue_item_uninstall_set_dep): Changed from
	_add_dep; only allow one dep per uninstall item.
	(require_item_process): s/_add_dep/_set_dep/
	(conflict_process_cb): s/_add_dep/_set_dep/
	(uninstall_item_process): Use rc_package_dep_to_str to set
	dep_str.
	(uninstall_item_destroy): There is no more dep slist to free.
	(uninstall_item_to_string): If we have a dep, add it to the
	string.
	(uninstall_item_copy): Copy the single dep, not a list.

	* rc-package-dep.c (rc_package_dep_to_str): Added.
	(rc_package_dep_to_str_static): Added.

2002-03-01  Jon Trowbridge  <trow@ximian.com>

	* rc-package-spec.c (rc_package_spec_get_type): Added.  Tries to
	figure out whether or not a provide is virtual.

	* rc-resolver-context.c (rc_resolver_context_new_child): Track
	whether or not we want to allow conflicts w/ virtual provides.

	* rc-queue-item.c (conflict_process_cb): Check our context whether
	or not we should allow conflicts w/ virtual provides.

	* rc-world.c (rc_world_add_package): Mark our self-provides as
	being of type 'package'.

	* rc-channel.c (rc_channel_parse_xml): Removed unused variable.

	* rc-world.c (rc_world_check_providing_package): Handle Debian
	'or'-dependencies.

	* rc-resolver.c (rc_resolver_resolve_dependencies):
	s/RC_EXTEMELY_NOISY/RC_SPEW/.  There is no reason to have two
	separate "dump everything to the console with extreme prejudice"
	environment variables.

	* rc-resolver-queue.c (rc_resolver_queue_process): Ditto.

2002-02-28  Jon Trowbridge  <trow@ximian.com>

	* rc-queue-item.c: Replaced several instances of
	rc_package_spec_to_str with rc_package_to_str.

	* rc-resolver.c (rc_resolver_resolve_dependencies): Added more
	RC_EXTREMELY_NOISY spew.

	* rc-resolver-context.c
	(rc_resolver_context_get_channel_priority): Call
	rc_channel_get_priority with the arguments in the correct order.
	Doh!
	(rc_resolver_context_new_child): OK, once and for all, we do need
	to hash on package spec.

	* rc-package.c (rc_package_to_str_static): Added.
	(rc_package_to_str): Added.  Produces a string of the package
	name w/ the channel name attached.

	* rc-channel.c (rc_channel_get_priority): Fixed to make the
	current channel implicitly subscribed.
	(rc_channel_parse_xml): Don't try to read the channel priority
	here...
	(rc_xml_node_to_channel): ...do it here instead.  Looking at the
	correct xmlNode can work wonders.

	* rc-resolver-compare.c (rc_resolver_context_partial_cmp): Get all
	inequalities pointed in the right direction, so we don't
	accidentally favor worse solutions.
	(rc_resolver_context_cmp): Ditto.

	* rc-queue-item.c (install_item_process): Don't generated the
	"needed-by" info on upgrades.
	(require_item_process): When upgrading due to a codependency,
	explicity attach a "needed-by" log item for the package that
	triggering the upgrade.

	* rc-resolver.c (rc_resolver_free): Free ->packages_to_verify.
	(rc_resolver_verify_system): Added.  Adds all system packages to
	->packages_to_verify, then calls rc_resolver_resolve_dependencies.
	(rc_resolver_resolve_dependencies): Iterate across
	->packages_to_verify and add them to our initial queue.

	* rc-resolver-queue.c (rc_resolver_queue_add_package_to_verify):
	Added.  Walks across the package's list of requires and conflicts
	and converts them into queue items.

	* rc-world.c (rc_world_foreach_package): Added.

2002-02-28  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (load_rpm_syms): RPM 4.0.4 marked two functions that
	we need as static, making them unavailable through dlsym.  The
	answer turns out to be to dlsym a global virtual function table
	and find the functions we need through absolute offset.  Ick.
	(load_fake_syms): same fix, one less dlsym, for static linking
	(rc_rpmman_init): add the RPM 4.0.4 specific stub file to the
	list, use rpmEVR rather than RPMVERSION to get the version of the
	RPM library.

	* Makefile.am: build an RPM 4.0.4 specific stub file

2002-02-27  Jon Trowbridge  <trow@ximian.com>

	* rc-package-info.c (rc_channel_parse_debian): Store packages
	in our RCWorld as we parse them.

	* rc-world.c (rc_world_foreach_providing_package): If we are
	handed an or-dependency, split it up and call
	rc_world_foreach_providing_package on each of the component
	pieces.

	* rc-resolver.c (rc_resolver_set_current_channel): Added.
	(rc_resolver_add_subscribed_channel): Added.
	(rc_resolver_resolve_dependencies): Store the current/subscribed
	channel info in the context.

	* rc-resolver-queue.c (copy_queue_except_for_branch): Get
	priorities from the context instead of directly from the channel.

	* rc-resolver-info.c (rc_resolver_info_merge): Use a hash to make
	sure that our package list contains only unique entries when we
	merge.
	(rc_resolver_info_to_str): Add default stringifications for our
	new types.
	(rc_resolver_info_conflicts_with_new):
	s/NEEDED_BY/CONFLICTS_WITH/.  The peril of cut&pasting code...
	(rc_resolver_info_depends_on_new): Added.

	* rc-resolver-context.c (rc_resolver_context_install_package):
	Remove "favored" arg, get priorities from the new, improved
	rc_resolver_context_get_channel_priority function.
	(rc_resolver_context_upgrade_package): Ditto.
	(rc_resolver_context_get_channel_priority): Added.  Use our
	locally stored info about current/subscribed channels and
	rc_channel_get_priority to compute priorities properly.

	* rc-queue-item.c (rc_queue_item_free): Free pending info items.
	(rc_queue_item_copy): Copy pending info items.
	(rc_queue_item_add_info): Added.  Allows a pending info item to be
	attached to a queue item.  The idea is that this info item will be
	logged into the context if the queue item is successfully
	processed.
	(rc_queue_item_log_info): Added.  Moves any pending info items out
	of the queue item and into the context.
	(install_item_process): Use rc_r_c_install_package's new
	signature.  Properly log our NEEDED_BY info.  Produce better
	verbose logging in the case of upgrades.
	(require_item_process): Log DEPENDS_ON info.
	(conflict_process_cb): Log CONFLICTS_WITH info.
	(uninstall_process_cb): Track the "lost" package in our require
	queue item.
	(uninstall_item_process): Log pending queue items on success.

	* rc-channel.c (rc_channel_new): Set the various channel
	priorities to -1, so that the default values will be used if no
	other value is set.
	(rc_channel_get_priority): Changed to return different priorities
	depending on whether or not the channel is current or subscribed.

2002-02-26  Jon Trowbridge  <trow@ximian.com>

	* rc-queue-item.c (codependent_pair): Recognize codependent pairs
	by name.
	(require_item_process): An evil optimization -- when doing an
	upgrade involving codependency (that we can recognize via the
	codependent_pair fn)q, don't explore the "remove" branch.
	(uninstall_item_process): Avoid copying the list of require items,
	instead just add them directly to the to the *new_items list.

	* rc-package-spec.c (rc_package_spec_hash): As long as we are
	optimizing, we might as well be able to do this hash without any
	function calls.

	* rc-resolver-context.c (rc_resolver_context_new_child): Since we
	now do proper dup-checking in our rc_world_foreach functions, we
	can go back to hashing on package pointers.
	(rc_resolver_context_get_status): Cache the results of the last
	get_status call, and return it w/o any hash lookups if we ask for
	the same info in the next call.  This actually happens a lot, and
	this optimization lets us avoid hash lookups in about 50% of all
	cases.
	(rc_resolver_context_set_status): Update the cache if we change
	the status of the last package we called get_status on.

2002-02-25  Jon Trowbridge  <trow@ximian.com>

	* rc-resolver-queue.c (rc_resolver_queue_add_package_to_install):
	Remove used variable.

	* rc-resolver-context.c (upgrade_pkg_cb): Make sure to_be_upgraded
	isn't NULL.

	* rc-queue-item.c (rc_queue_item_new_install): Make sure upgrades
	!= package.

	* rc-resolver-queue.c (rc_resolver_queue_add_package_to_install):
	We don't need to check if this install is an upgrade here, since
	it now happens automatically when we construct a install item.

	* rc-queue-item.c (rc_queue_item_new_install): Check if this is an
	upgrade, and do the appropriate magic, every time we construct an
	install item.

	* rc-util.c (rc_maybe_merge_paths): g_strconcat-ing printf
	format strings is not a good idea.

	* rc-package-spec.c (rc_package_spec_hash): Constructing the whole
	RCPackageSpec string only to call g_str_hash is pretty wasteful,
	so I've changed this to build up a hash value out of the spec's
	various string elements.
	(rc_package_spec_to_str_static): Changed to just call
	rc_package_spec_to_str.  This avoids a bunch of snprintfs, but
	means that the previous pointer becomes invalid each time this is
	called.  But this isn't really a problem, since that pointer would
	contain the wrong answer anyway under the old implementation.
	(rc_package_spec_version_to_str_static): Ditto.
	(rc_package_spec_to_str): Replaced g_strdup_printf with
	g_strconcat.
	(rc_package_spec_version_to_str): Ditto.

	* rc-queue-item.c: Replaced g_strdup_printf with g_strconcat in
	a whole bunch of places.

	* rc-resolver-context.c (rc_resolver_context_install_package):
	Replaced g_strdup_printf with g_strconcat.
	(rc_resolver_context_uninstall_package): Ditto.

	* rc-util.c (rc_mkdir): Replaced g_strdup_printf with g_strconcat.
	(rc_rmdir): Ditto.
	(rc_is_program_in_path): Ditto.
	(rc_maybe_merge_paths): Ditto.

	* rc-resolver-context.c (rc_resolver_context_foreach_upgrade):
	Implemented.
	(rc_resolver_context_foreach_uninstall): Build a hash of all of
	our upgrade-related removals, and use it to make sure that we
	don't report and of those as uninstalls.

	* rc-resolver-info.c (rc_resolver_info_merge): Merge misc info
	items with identical message strings.

	* rc-queue-item.c (install_item_process): Track the upgraded
	package when we generate an uninstall item associated with an
	upgrade.
	(require_item_process): If we need to remove items because of lost
	dependencies associated with an upgrade, make a branch and try
	upgrading the to-be-removed items.  (This is the foo/foo-devel
	co-dependency case.)
	(require_item_process): The requiring package in the require item
	is now a singleton, not a list.
	(require_item_copy): Ditto.
	(rc_queue_item_require_add_package): Ditto.
	(uninstall_process_cb): Track the upgraded package.  Don't try to
	consolidate require items --- consolidation will happen when info
	items are merged.
	(uninstall_item_process): Track the upgraded package.
	(uninstall_item_copy): Ditto.
	(rc_queue_item_uninstall_set_upgraded_to): Ditto.

	* rc-resolver-context.c (rc_resolver_context_foreach_info): Add a
	merging pass.
	
	* rc-resolver-info.c (rc_resolver_info_copy): Added.
	(rc_resolver_info_conflicts_with_new): Added.

	* rc-resolver-queue.c (rc_resolver_queue_process): 

	* rc-world.c (rc_world_foreach_upgrade): Added.
	(rc_world_add_package): Use _slist_insert instead of
	_slist_insert_unique.

2002-02-23  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-package-update.c (rc_xml_node_to_package_update): use
	rc_maybe_merge_paths instead of g_strconcat, so that we can
	handle absolute URLs in history file paths.

2002-02-22  Jon Trowbridge  <trow@ximian.com>

	* rc-resolver-queue.c (rc_resolver_queue_add_package_to_install):
	Print a message if we try to install an already-installed package.
	(rc_resolver_queue_process): Spew lots of debugging info if
	the RC_EXTREMELY_NOISY env variable is set.

	* rc-package-info.c (rc_channel_parse_debian): Store the channel
	in the RCPackages we construct.

	* rc-world.c (rc_world_foreach_package_by_name): Filter out
	non-installed duplicates of an installed package.
	(rc_world_foreach_providing_package): Ditto.
	(rc_world_check_providing_package): Ditto.
	(rc_world_foreach_requiring_package): Ditto.

	* rc-queue-item.c (conflict_process_cb): Check package equality
	using rc_package_spec_equal, not pointer equality.

	* rc-queue-item.c (uninstall_process_cb): Group multiple packages
	with a common requirement.

	* rc-world.c (remove_package_cb): Comment out rc_package_free.
	Why does this fix our memory corruption problem?  Where else is it
	being freed?
	(rc_world_spew): Added.

	* rc-resolver-context.c (dup_name_check_cb): Make sure we don't
	mistake two identical packages for a parallel install situation.

2002-02-21  Jon Trowbridge  <trow@ximian.com>

	* rc-channel.c: Removed misleading comment about priorities.

	* rc-resolver-info.c (rc_resolver_info_to_str): Renamed from
	rc_resolver_info_to_text.
	(rc_resolver_info_packages_to_str): Added.  Return a string with
	comma-separated list of the names of the packages in package_list.
	(rc_resolver_info_needed_by_new): Added.
	(rc_resolver_info_needed_add): Added.
	(rc_resolver_info_needed_add_slist): Added.

	* rc-resolver-context.c (rc_resolver_context_is_parallel_install):
	Added.  Check to see if a package with the same name is
	to-be-installed.
	(rc_resolver_context_install_package): Move the parallel install
	check logic into its own function.

	* rc-queue-item.c (install_item_process): Make our text-string log
	messages have priority _VERBOSE.  Log what packages need the
	installed package.
	(rc_queue_item_install_add_needed_by): Added.
	(require_process_cb): Packages that would be parallel installs do
	not satisfy requires, since they are uninstallable.
	(require_item_process): Track the packages that this requirement
	comes from by passing them along to the newly-created install
	items.

2002-02-20  Jon Trowbridge  <trow@ximian.com>

	* rc-resolver-queue.c (rc_resolver_queue_add_package_to_install):
	If another version of the package is already installed, mark our
	install queue item as being an upgrade.

	* rc-resolver-context.c (rc_resolver_context_unref): Free info
	items in log list.
	(rc_resolver_context_install_package): Replaced log entries with
	info items.
	(rc_resolver_context_uninstall_package): Track if we are part of
	an upgrade, adjust stats accordingly.  Replaced log entries with
	info items.
	(rc_resolver_context_invalidate): Replaced log entry with info
	item.
	(rc_resolver_context_add_info): Replaces _add_log_entry.
	(rc_resolver_context_add_info_str): Added.  A convenience function
	that creates a misc info item and adds it to the log.
	(rc_resolver_context_foreach_info): Replaces _foreach_log_entry.
	(rc_resolver_context_spew_info): Replaces _spew_log.

	* rc-queue-item.c (install_item_process): If this is an upgrade,
	add a request to remove the currently-installed version.
	(rc_queue_item_install_set_upgrade_package): Added.  Specify
	that this install is upgrading (or downgrading, for that matter)
	the given package.
	(require_item_process): Replaced log entry with info items.
	(conflict_process_cb): Replaced log entries with info items.
	(uninstall_item_process): Replaced log entries with info items.
	(rc_queue_item_uninstall_is_part_of_upgrade): Added.  Indicates
	that this uninstall is really half of an upgrade.

	* rc-world.c (remove_package_struct_cb): Check that our_struct !=
	NULL.

	* rc-resolver-queue.c (rc_resolver_queue_add_package_to_install):
	If there is another version of the package already installed,
	remove the old version.  (In other words, do the right thing for
	upgrades.)

	* rc-resolver-context.c (rc_resolver_context_new_child): Hash by
	package spec, not pointer.
	(rc_resolver_context_install_package): Don't flag a package as
	needing to be installed if another package of the same name is
	already scheduled for installation.

2002-02-18  Jon Trowbridge  <trow@ximian.com>

	* rc-resolver-queue.c (copy_queue_except_for_branch): Use new
	generalized branches.
	(rc_resolver_queue_split_first_branch): Use new generalized
	branches.

	* rc-resolver.c (rc_resolver_add_packages_to_install_from_slist): Added.
	(rc_resolver_add_packages_to_remove_from_slist): Added.

	* rc-resolver-context.c (rc_resolver_context_install_package):
	Attach packages to log entries.
	(rc_resolver_context_upgrade_package): Attach packages to log
	entries.
	(rc_resolver_context_uninstall_package): Attach packages to log
	entries.
	(rc_resolver_context_foreach_marked_package): Change callback
	function type to RCMarkedPackageFn.
	(rc_resolver_context_add_log_entry): Allow a package to be tied to
	a log entry.
	(rc_resolver_context_foreach_log_entry): Allow the log messages to
	be selected by package.
	(rc_resolver_context_log_to_string): Added.  Get the log messages
	(possibly for a single package) as one big string.
	(rc_resolver_context_foreach_install): Added.
	(rc_resolver_context_foreach_uninstall): Added.
	(rc_resolver_context_invalidate): Attach NULL package to log
	entry.
	(rc_resolver_context_spew_log): Changed for
	rc_resolver_context_foreach_uninstall's new signature.

	* rc-queue-item.c (rc_queue_item_is_redundant): Added.
	(rc_queue_item_is_satisfied): Added.
	(item_slist_to_string): Added.
	(install_item_is_satisfied): Added.
	(install_item_process): Attach package to log entry.
	(install_item_destroy): Remove our needed-by list.
	(install_item_copy): Copy some stuff I forgot to copy before.
	Doh.
	(rc_queue_item_new_install): Initialize ->is_satisfied.
	(require_item_process): Attach packages to log entries.  Use the
	new-style generalized branches.
	(require_item_copy): Copy the remove-only flag.
	(branch_item_process): Generalized processing no longer assumes
	that a branch is just a set of installs.
	(branch_item_destroy): Don't leak the branch items.
	(branch_item_copy): Generalized.
	(branch_item_to_string): Generalized.
	(rc_queue_item_branch_add_item): Added, replaces
	rc_queue_item_add_package.
	(conflict_process_cb): Attach packages to log entries.
	(uninstall_item_process): Attach packages to log entries.
	(uninstall_item_copy): Copy the remove-only flag.

	* rc-package.c: Include stdlib.h to get rid of warning.

2002-02-18  Jon Trowbridge  <trow@ximian.com>

	* rc-world.c (rc_world_find_installed_version): Added.

	* rc-resolver.c (rc_resolver_resolve_dependencies): When removing
	packages, always do so in remove-only mode.

	* rc-resolver-queue.c (rc_resolver_queue_add_package_to_remove):
	Add remove_only_mode arg, which causes the approrpriate flag to be
	set in the uninstall item that is added to the queue.

	* rc-resolver-context.c (rc_resolver_context_package_is_absent):
	Doh!  Replaced a == with a != in a g_return_val_if_fail.

	* rc-queue-item.c (rc_queue_item_require_set_remove_only): Added.
	(rc_queue_item_uninstall_set_remove_only): Added.
	(require_item_process): Modified so that remove-only-mode require
	items will only generate (set-remove-only) uninstall items, and
	will never try to pull in alternative providers.
	(uninstall_process_cb): Make sure that set-remove-only uninstall
	items generate set-remove-only require items.

2002-02-17  Jon Trowbridge  <trow@ximian.com>

	* rc-resolver.c (remove_head): The type of thing that really
	should be one line in glib (and is in 2.0, IIRC).
	(rc_resolver_resolve_dependencies): Store invalid solutions in
	their own list.  The processing of pending_queues has been
	re-designed to do on-the-fly scoring and pruning.
	Also, I've dropped our iterator functions.  For now, just read
	the lists and other data directly from the struct (ugh).

	* rc-resolver-queue.c (copy_queue_except_for_branch): Take a
	penalty value as an argument, and attach it to the created install
	item.
	(rc_resolver_queue_split_first_branch): Track penalties, pass them
	along to copy_queue_except_for_branch.
	
	* rc-resolver-context.c (rc_resolver_context_new_child): Copy
	stats from the parent.
	(rc_resolver_context_set_status): I've moved the intelligence out
	of this routine and into the _(un)?install_package functions.
	(rc_resolver_context_get_status): Simplified, no longer recursive.
	(rc_resolver_context_install_package): Added.  Updates info
	relevant to scoring.
	(rc_resolver_context_upgrade_package): Added.  Updates info
	relevant to scoring.  Currently unused.
	(rc_resolver_context_uninstall_package): Added.  Updates info
	relevant to scoring.
	(rc_resolver_context_add_channel_priority): Added.
	(rc_resolver_context_add_log_entry): If the log entry duplicates
	the previous entry, drop it.
	(requirement_met_cb): Return TRUE until we find a match.
	(rc_resolver_context_requirement_is_met): Changed to use
	rc_world_check_providing_package.

	* rc-queue-item.c (install_item_process): Changed to use
	rc_resolver_context_install_package.
	(rc_queue_item_install_set_channel_priority): Added.
	(rc_queue_item_install_get_channel_penalty): Added.
	(rc_queue_item_install_set_other_penalty): Added.
	(rc_queue_item_install_get_other_penalty): Added.
	(uninstall_item_process): Changed to use
	rc_resolver_context_uninstall_package.

	* rc-package.c (rc_package_is_installed): Added.
	(rc_xml_node_to_package): Parse file size and installed size out
	of the package XML.

	* rc-channel.c (rc_channel_priority_parse): Added.  Convert a
	string into a priority rating.
	(rc_channel_new): Set ->priority and ->favored_priority to the
	default values.
	(rc_channel_get_priority): Added.  A simple accessor.
	(rc_channel_get_favored_priority): Ditto.
	(rc_channel_parse_xml): Parse channel priorities.

	* rc-world.c (rc_world_check_providing_package): Added.  This is
	like rc_world_foreach_providing_package, except that it terminates
	when the callback function returns FALSE.
	(rc_world_foreach_requiring_package): Deal with list items with
	NULL data.
	(rc_world_foreach_providing_package): Deal with list items with
	NULL data.
	(rc_world_remove_packages): Implemented.

2002-02-15  Jon Trowbridge  <trow@ximian.com>

	* rc-queue-item.c (conflict_process_cb): Add a missing break that
	was causing us to fall through into our default:
	g_assert_not_reached () case.

	* rc-channel.c (rc_xml_node_process): Moved our call to
	rc_world_add_package down into the if (package) block so we don't
	get warnings on empty channels.

	* rc-channel.h: Added 'priority' to RCChannel struct.
	(Still not used for anything.)

	* rc-package.h: Added RCPackageAndSpecFn.

	* rc-world.c: Finished initial implementation.

	* rc-resolver-context.c: Finished initial implementation.

	* rc-queue-item.c: Finished initial implementation.

	* rc-resolver-queue.c: Finished initial implementation.

	* libredcarpet.h: Including rc-resolver.h, rc-world.h.

2002-02-12  Jon Trowbridge  <trow@ximian.com>

	* rc-resolver-queue.c: Added.  Still under development.

	* rc-queue-item.c: Added.  Still under development.

	* rc-resolver-context.c: Added.  Still under development.

	* rc-world.c: Added.  Still under development.

	* rc-package-dep.h: Added RCPackageAndDepFn typedef.

	* rc-package.h: Added RCPackageFn typedef.

2002-02-05  Jon Trowbridge  <trow@ximian.com>

	* rc-channel.c: Removed RCSubchannel struct and functions.
	(rc_channel_new): Initialize ->package, ->dep_table and
	->dep_name_table hashes.
	(rc_channel_free): Free the ->package, ->dep_table and
	->dep_name_table hashes.  Removed subchannel stuff.
	(rc_xml_node_process): This used to be rc_channel_get_subchannel.
	Removed all subchannelisms.
	(rc_xml_node_to_channel): Removed subchannel stuff.  Call
	rc_xml_node_process to do the actual work.

	* rc-deps-private.h: Remove pref argument from all prototypes.

	* rc-deps-util.c (rc_dep_fix_system): Removed pref argument in
	call to rc_dep_resolution_new.
	(rc_dep_or_process_system_and_channels): Removed subchannel logic,
	get channel directly from package.

	* rc-deps.c: Drop pref arguments everywhere -- they were used for
	selecting subchannels, which no longer exist.
	(deps_find_provide): Get channel directly from package.
	(deps_update_install_list): Get channel directly from package.

	* rc-package-dep.c (rc_xml_node_to_package_dep): Removed libxml
	version check, using ->xmlChildrenNode instead.

	* rc-package-info.c: Renamed rc_subchannel_foo functions to
	rc_channel_foo, and removed all subchannel-related logic.
	(pkginfo_find_package_with_constraint): Removed subchannel-related
	stuff, including the max_pref argument.
	(pkginfo_find_package): Removed the max_pref argument and fix our
	call to pkginfo_find_package_with_constraint.

	* rc-package-set.c (rc_package_set_parse): Changed to use
	->xmlChildrenNode.

	* rc-package-update.c (rc_xml_node_to_package_update): Get the
	channel directly from the package struct.  Changed to use
	->xmlChildrenNode.

	* rc-package.c (rc_package_copy): s/subchannel/channel/.
	(rc_xml_node_to_package): s/subchannel/channel/.  Removed libxml
	version check, using ->xmlChildrenNode instead.

	* rc-package.h: Replace occurances of RCSubchannel by
	RCChannel.

	* rc-pretty-name.c (rc_pretty_name_parse_xml): Removed libxml
	version check, using ->xmlRootNode and ->xmlChildrenNode instead.

	* rc-rpmman.c (rc_rpmman_query_file): Wrap some unreachable code
	in #if 0/#endif.

	* xml-util.c (xml_get_value): Removed #if check for libxml version,
	using ->xmlChildrenNode instead.

2002-02-06  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: only look in unsubscribed channels if and only if
	nothing appropriate was found in any subscribed channels.

2002-01-29  Joe Shaw  <joe@ximian.com>

	* rc-package-info.c (rc_subchannel_parse_helix): If we don't have
	an XML document, we really shouldn't be continuing to parse that.
	This function was crack-smoking.

	* rc-util.c (rc_hash_table_slist_insert_unique): Fix a potential leak.

2002-01-14  Joe Shaw  <joe@ximian.com>

	* rc-rpmman.c (rc_rpmman_query_file): First check to see if the
	file exists, and then try to open it, but bail out if it doesn't
	work.

2002-01-11  Joe Shaw  <joe@ximian.com>

	* rc-debman.c (i18n_fixer): Set the PATH environment variable to
	include /sbin, /usr/sbin, and /usr/local/sbin, where dpkg and
	friends are located.  Fixes #18157.

2002-01-04  Joe Shaw  <joe@ximian.com>

	* rc-rpmman.c (rc_rpmman_transact): Add back in my RC_JUST_KIDDING
	envvar that Ian backed out for some reason.  Boo!  Hiss!

2001-12-17  Ian Peters  <itp@ximian.com>

	* rc-deps.c: some stuff I don't understand

2001-12-07  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: fix the /usr/share/magic.mime problem, don't ask

2001-11-20  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: readd RPMPROB_FILTER_REPLACE[NEW|OLD]FILES for a
	little while because of broken packages

2001-11-08  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (parse_versions): take out an unnecessary assert
	that caused problems for a customer :-)

2001-11-08  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c, rc-deps.h: rc_dep_resolution_new now takes a flage as
	to whether you will be doing an INSTALL or a REMOVE mainly with
	this resolution.  If Install, it will try to resolve all
	dependencies and will do its best to never remove packages.  If
	REMOVE, it will remove things more aggressively.

	* rc-deps-util.c: Update call to rc_dep_resolution_new.

	* rc-rpmman.c: Add patch to ignore rpm epochs as appropriate to
	conform to RPM behaviour.
	
2001-11-08  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: get rid of RPMPROB_FILTER_REPLACEPKG,
	_REPLACENEWFILES, and _REPLACEOLDFILES.  The only problem we're
	left filtering is _OLDPACKAGE, which isn't really a problem.

2001-11-06  Joe Shaw  <joe@ximian.com>

	* rc-channel.[ch]: Remove the channel_select field from the
	RCChannel struct.  Mmmm, bitrot.

2001-10-30    <itp@ximian.com>

	* rc-distro.c: add ydl 2.1 and suse 7.3

2001-10-30  Joe Shaw  <joe@ximian.com>

	* rc-channel.c (rc_channel_parse_xml): Get the new channel tier,
	if it's there.

2001-10-25  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: don't assume that only things which are an ANY
	relation are a virtual provide; instead use the provide's virtual
	setting.

	* rc-package-dep.c: When verifying a spec, take into account rpm
	conflicts and virtual provides.
	
2001-10-24  Joe Shaw  <joe@ximian.com>

	* rc-package-update.c (rc_xml_node_to_package_update): Get the
	HID.
	* rc-package-update.h (RCPackageUpdate): add the HID.

2001-10-17  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-util.c: oops, really make it work

	* rc-util.c (rc_unompress_memory): Complain if zlib uncompression
	fails.  This will require changes to the tools.

2001-10-04  Ian Peters  <itp@ximian.com>

	* Makefile.am: only build rc-dpkg-helper.so when dpkg support
	enabled, only build the rpm helpers when non-static rpm support
	enabled

2001-10-04  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c, Makefile.am: change it one more time

2001-10-04  Ian Peters  <itp@ximian.com>

	* rc-rpmamn.c, Makefile.am: change the .so file names -again- for
	broken old rpm

2001-10-04  Ian Peters  <itp@ximian.com>

	* Makefile.am: add things to CLEANFILES in a few places

2001-10-04  Ian Peters  <itp@ximian.com>

	* make_stub.sh: simplified

	* Makefile.am: new calling convention for make_stub.sh

	* rc-package-dep.c, rc-package-info.c, rc-package-spec.c,
	rc-package-spec.h: revert accidental commit

2001-09-30  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: don't try to add packages if all we're doing is
	removing them.

2001-09-28  Joe Shaw  <joe@ximian.com>

	* rc-debman.c (do_unpack): Don't change the "--no-act" parameter
	(hence just "testing" an install) if we have the RC_JUST_KIDDING
	environment variable set.

	* rc-rpmman.c (rc_rpmman_transact): Set the transaction_flags to
	RPMTRANS_FLAG_TEST if RC_JUST_KIDDING is set.

2001-09-25  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: minor mem leak fixes, also make sure
	deps_find_newer finds the biggest version package it can

2001-09-24  Ian Peters  <itp@ximian.com>

	* rc-packman.c: add some sanity checks to the rc_packman_transact
	wrapper to check for duplicate installs, duplicate removes, and
	install/removes of the same package

2001-09-24  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: Don't add a package if we're removing a newer
	version of it.

2001-09-24  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c, rc-deps.h: give a reason when we abort, so the GUI
	can display a useful message.

2001-09-21  Ian Peters  <itp@ximian.com>

	pulled in from red-carpet-1-1 branch

	* rc-rpmman.c: fix a typo that resulted in memory corruption after
	each install

2001-09-21  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: caught one of the odd counting cases -- in the case
	of an install of an already installed package, we'll get a
	configure, remove, and install callback event -- unless the
	package of the same version is already installed, in which case
	the remove event doesn't occur.  Note that this shouldn't happen
	in the RC gui anyway, so it's probably a dependency bug as well,
	but for correctness...

2001-09-21  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: check what version of RPM we're using before we add
	a self-dependency -- RPM 4.0 and beyond don't need this

2001-09-21  Ian Peters  <itp@ximian.com>

	* rc-rpm-helper-1.so, rc-rpm-helper-2.so, rc-rpm-helper-3.so:
	removed.

	* [rpm].so.0, [rpm_rpmio].so.0, [rpm_rpmio_rpmdb]-4.0.3.so,
	[rpm_rpmio_rpmdb].so: added

	* Makefile.am, rc-rpmman.c: handle the new shared stubs.

2001-09-20  Ian Peters  <itp@ximian.com>

	* rc-rpm-helper-1.so, rc-rpm-helper-2.so, rc-rpm-helper-3.so:
	rebuilt all of these using an amazingly simple and clever
	technique I just now worked out.  We should be able to ship all of
	our RC builds on i386 platforms using just --enable-backend-rpm,
	which gives us near-maximal flexibility for dealing with the
	various RPM versions.  I haven't bothered to fix the build process
	to handle the other architectures, so we'll continue to ship those
	static.  Joe, I apologize for making you have to redo the
	installer stuff...

2001-09-20  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: Also, do a sanity check of the results to make
	sure we don't return packages with the same name in the install
	list, or in the install/remove lists.

2001-09-19  Ian Peters  <itp@ximian.com>

	* rc-verification.c: pull up fixes

2001-09-19  Ian Peters  <itp@ximian.com>

	* rc-deps.c, rc-distro.c: fixes from red-carpet-1-1

2001-09-19  Ian Peters  <itp@ximian.com>

	* rc-deps.c: bug fix to multiple install problem as dictated by
	vlad over a cell phone from europe

	* rc-distro.c: mandrake 81 strings added

	* rc-verification.c: check for ~/.gnupg, and if it doesn't exist,
	attempt to run gpg --list-keys before verifying the signature.  If
	gpg is unable to find ~/.gnupg, it creates it, and then aborts,
	giving a spurious signature failure.

2001-09-19  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: lame hacks to avoid over/under counts during
	transactions

2001-09-19  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: Call deps_find_provide after adding a non-older package
	in deps_find_provide, since it probably just added the package that
	we want (if we wait for the outside loop to catch it, we might add
	a bad package);  also use rc_package_slist_sort_by_spec_reverse to
	get the latest versions of a package first.

	* rc-package.c, rc-package.h: rc_package_slist_sort_by_spec_reverse,
	and a secial static c_sucks_rc_package_spec_compare_reverse() to
	inverse the sense of rc_package_spec_compare.

2001-09-14  Ian Peters  <itp@ximian.com>

	* Makefile.am: new rpm-helper .so files

	* rc-rpmman.c, rc-rpmman.h: some rpmProblemString fixes, new .so
	files

2001-09-14  Ian Peters  <itp@ximian.com>

	* rc-rpmman.h: forgot the 04000* comparisons here

2001-09-14  Ian Peters  <itp@ximian.com>

	* rc-distro.c: add RH 7.2 support

	* rc-rpmman.c: sigh, forgot all about that octal shit... get
	rid of the leading 0 in the rpm version

2001-09-13  Ian Peters  <itp@ximian.com>

	* rc-rpm-helper-with-rpmio-and-rpmdb.so: another shared
	object, works with RPM 4.0.3

	* Makefile.am: dist and install
	rc-rpm-helper-with-rpmio-and-rpmdb.so

	* rc-rpmman.c, rc-rpmman.h: conditionalize a lot of stuff
	on both the API and ABI version using both the preprocessor and
	runtime checks.  Add the third shared object to the list of things
	we attempt to dlopen.

2001-08-27  Joe Shaw  <joe@ximian.com>

	* rc-deps-util.c (rc_dep_string_to_or_dep_slist): Fix a crash that
	would happen in the case where a munged string would come in as
	(||package1|package2|package3&>=&1.0) and when processing the
	first package (package1) it would strchr() for the '&' and get
	the one in package3 and barf trying to allocate negative memory
	because of bad pointer arithmetic.

2001-08-17  Joe Shaw  <joe@ximian.com>

	* rc-channel.c (rc_channel_parse_xml): Don't panic if there aren't
	any channels. Sean found this.

2001-08-17  Joe Shaw  <joe@ximian.com>

	* rc-channel.c (rc_channel_parse_xml): Don't panic if there isn't
	a distro_target.

2001-08-17  Joe Shaw  <joe@ximian.com>

	* rc-channel.c (rc_xml_node_to_subchannel): Don't puke on empty
	subchannels.

2001-08-16  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-package-dep.c: Add print statements for RELATION_NOT_EQUAL
	and RELATION_NONE

2001-08-15  Joe Shaw  <joe@ximian.com>

	* Merge the redcarpet-parternet branch into HEAD.

2001-08-04  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: create the system packages hash tables even if
	we don't have system packages, to avoid null hash table
	lookup warnings later on.

2001-08-01  Ian Peters  <itp@ximian.com>

	* rc-distro.c: undo, sigh

	* rc-distro.c: s/sun4/sun4u/

2001-08-01  Vladimir Vukicevic  <vladimir@ximian.com>

	* libredcarpet/src/rc-package-dep.c: Don't return TRUE
	if RC_RELATION_NONE on a dep with no release/version, argh.

2001-07-31  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps-util.c: Don't keep rof as a static struct,
	and make sure we update the subchannel's hash tables
	if they exist.

	* rc-deps-util.c: Keep rof as a static struct, so that
	we can call dep_or_process multiple times.

	* rc-deps.c: Oops, get rid of references to a package
	that probably just got deleted.  Pesky FMR's and SEGV's!
	I wish C didn't suck.

2001-07-27  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: Oops, sort a list correctly

	* rc-deps-private.h, rc-deps.c: Don't blindly reject
	all but the first package in a list

2001-07-26  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-distro.c: Add solaris 5.7

	* rc-deps.c: Fixed memory corruption resulting from using
	uninitialized variable; also fixes bug with removes
	and the "control center" issue

2001-07-26  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-rpmman.c: fix a memleak

2001-07-26  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: Try to find another package that can
	provide a missing dependency before removing packages
	that depend on it.

2001-07-25  Joe Shaw  <joe@ximian.com>

	* rc-channel.h (RCChannel): Rename subs_url and unsubs_url to
	subs_file and unsubs_file respectively, for consistency (and to
	intentionally break compatibility).

	* rc-channel.c (rc_channel_parse_xml): Build as much of a path
	as possible for file_path, icon_file, pkginfo_file, pkgset_file,
	subs_file and unsubs_file.
	(rc_channel_free): (un)subs_url -> (un)subs_file

	* rc-util.c (rc_build_url): Kill.
	(rc_maybe_merge_paths): Takes a "parent path" and a "child path"
	and merges them, depending on the semantics of the child path.
	FQURLs and absolute child paths are left in tact, and relative child
	paths are merged with the parent path.
	(rc_url_is_absolute): Add https.
	
2001-07-25  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-package-spec.c, rc-package-spec.h: New
	rc_package_spec_to_str_static and version_to_str_static
	functions.

	* rc-deps.c, rc-deps.h: Use new _static functions for all
	debugging output to avoid memory leaks.  Also plug some more
	leaks where the RCDepProvide struct wasn't getting freed,
	and where some deps that were created weren't being kept
	track of.

	* rc-deps.c: Fix a good chunk of memory leaks, thanks Purify!

	* rc-line-buf.c: Minor array bounds read fix.

2001-07-24  Ian Peters  <itp@ximian.com>

	* Makefile.am: look for *, not *.o, in the static libraries we
	unpack, as libdb-3.1.a isn't make up of .o files, apparently

2001-07-24  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_depends_fill): add /usr/local/bin and
	/usr/local/sbin to the list of directories for which we honor
	files as provisions, needed to support msc linux according to
	peter -- note that this shouldn't be necessary, as packages are
	not supposed to provide files in the /usr/local tree.  Bah.

2001-07-24  Vladimir Vukicevic  <vladimir@rain.ximian.com>

	* rc-deps.c: deep copy the dep structure in a DAP; I'm really
	going to need to get purify working to make sure everything
	gets cleaned up right.  Also use rpmish from rc-package-dep
	to decide whether to call debian_find_self_provides.

	* rc-package-dep.c: make rpmish be not static

2001-07-24  Joe Shaw  <joe@ximian.com>

	* rc-packman.h: Fix an erroneous comment about a signal's parameters.

2001-07-24  Vladimir Vukicevic <vladimir@rain.ximian.com>

	* rc-deps.c: Don't do a stupid check for a dependency
	based on the name of the package; use the new function
	that checks the package's dependencies.

2001-07-23  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: erm, don't return the same system package
	multiple times, causing a nasty loop

2001-07-20  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-distro.c: added suse 7.2 string

	* rc-deps.c: Got rid of fix_missing, needs testing; changed
	rc_package_dep_verify_relation to use new
	rc_package_dep_verify_package_relation

	* rc-package-dep.c, rc-package-dep.h: Added new
	rc_package_dep_verify_package_relation call.

2001-07-19  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (transact_cb): send the basename of the package
	we're installing, not the full path
	(transact_cb): double the install_total and add the install_extra
	to account for a) packages we're installing being both configured
	and installed, and b) packages we're installing that are really
	upgrades being removed, configured, and installed.

2001-07-12  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps-private.h, rc-deps.c: Add an extra parameter to
	upgrade_or_remove so that we can create correct remove info.

2001-07-12  Ian Peters  <itp@ximian.com>

	* rc-debman.c: #if 0 out some more code for more testing later

2001-07-12  Ian Peters  <itp@ximian.com>

	* rc-debman.c: #if 0 out the last commit until Vlad and I work
	through some issues

2001-07-12  Ian Peters  <itp@ximian.com>

	* rc-debman.c (query_all_read_line_cb): some code to handle
	Conflicts: + Replaces: == Provides:

2001-07-11  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: Fix merging of require short-circuit; it isn't working
	for some reason.

2001-07-11  Ian Peters  <itp@ximian.com>

	* rc-debman.c: #if 0 out some currently unused code

	* rc-packman.c: fix two warnings

2001-07-11  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps-private, rc-deps.c, rc-deps-util.c, rc-md5.c, rc-package-dep.h,
	rc-package-spec.h, rc-pretty-name.c, rc-util.c: Fix compiler warnings

2001-07-11  Ian Peters  <itp@ximian.com>

	* rc-deps.c (deps_create_extra_info): s/_append/_prepend

	* rc-util.c (rc_slist_unique): actually return out at the end ;-)

2001-07-11  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: Oops, we need to look at what a package provides,
	not what it requires, when figuring out what other packages
	depend on it.
	
	* rc-deps.c: Oops, rc_hash_table_slist_insert_unique needs
	a comparison function argument

	* rc-deps.c, rc-package-dep.c, rc-package-spec.c, rc-package-spec.h:
	Some speed optimizations

2001-07-11  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: #if 0 the rpmGetRpmlibProvides for now, as this
	interface -is- only in rpm 4.0.2 as I feared

2001-07-11  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_section_to_package_section): fix stupid
	crash

2001-07-11  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c, rc-deps.h: Add some helper functions to give better
	info about what packages depend on others to the GUI (include
	packages that are pulled in because of things like library provides
	instead of just the package name itself)

	* rc-util.c, rc-util.h: rc_slist_unique()

2001-07-11  Ian Peters  <itp@ximian.com>

	* rc-debman.c: added the fake version hack to the mark purge step,
	now renamed to mark_status.  This should make RC more resilient in
	the face of strangely ordered packages.

	* rc-distro.c: applied patch from Rodney to add support for
	Mandrake 8.0, SuSE 7.1, and LinuxPPC 2000 Q4.

	* rc-package-info.c (debian_packages_helper): correctly offset the
	buf pointer by the length of the initial string when calling
	rc_debman_fill_depends so we stop getting completely bogus
	dependency information.

2001-07-11  Ian Peters  <itp@ximian.com>

	* rc-debman-general.h: rc_debman_fill_depends no longer takes a
	list to append to, but instead returns a new list

	* rc-debman-general.c: no more list paramater, instead declare and
	return a new RCPackageSList *

	* rc-package-dep.h: add the pre field to the RCPackageDep struct
	-- when set, this is a Pre-Depends, only used in Debian

	* rc-package-dep.c (rc_package_dep_new): set pre to FALSE by
	default
	(rc_package_dep_copy): copy the pre field

	* rc-package-info.c (debian_packages_helper): call
	rc_debman_fill_depends correctly, concatenate the returned list

	* rc-packman-private.h: get rid of the features member

	* rc-package.h: cosmetic fixes

	* rc-package.c (rc_package_new): set package->section to MISC

	* rc-packman.h: remove the RCPackmanFeatures enum, no longer used.
	Add the RCPackmanStep enum, which describes what kind of step
	occured during a transaction_step.  Ditch all of the configure_*
	signals, and update/reorder the arguments to the transact_*
	signals.
	(rc_packman_get_features): removed

	* rc-packman.c: remove CONFIGURE_* from the class signals.  Remove
	reference to ->priv->features.
	(rc_packman_get_features): removed

	* rc-rpmman.h: add rpmGetRpmlibProvides to the RCRpmman struct

	* rc-rpmman.c: s/g_slist_append/g_slist_prepend/ in lots of places
	(transact_cb): fixes to emit the correct signals -- no more
	configure_*, lots more transact_* with a few extra arguments.
	(rc_rpmman_section_to_package_section): fixes to stop using
	g_strsplit, stop using g_strcasecmp, stop being stupid.
	(parse_versions): stop using g_strsplit, stop being so slow and
	stupid.
	(in_set): fix a warning
	(depends_fill_helper): added, single code path to read a variety
	of dependency information from the Header
	(rc_rpmman_depends_fill): rewritten to use depends_fill_helper,
	now much shorter and fewer bugs
	(rc_rpmman_query_all): use rpmGetRpmlibProvides to create the
	rpmlib-internal package, to provide all of the "rpmlib(...)" 
	provides used for internal rpm package format versioning
	(load_rpm_syms): grab rpmGetRpmlibProvides
	(load_fake_syms): grab rpmGetRpmlibProvides
	(rc_rpmman_init): no more features

	* rc-debman.c (split_status): added, breaks a status line into
	three words
	(verify_status_read_line_cb): use split_status where possible,
	downcase some words and stop using g_strcasecmp, rewrote the logic
	to detect acceptable/unacceptable status lines
	(do_purge_read_line_cb): updates to new signal prototype
	(do_unpack_read_line_cb): emit new signal, including step_type
	(do_configure_read_line_cb): emit new signal
	(node_new): added
	(node_free): added
	(node_add_prereq): added
	(construct_graph): added
	(process_predeps): added
	(resolve_graph): added
	(order_packages): added.  uses the previous helper functions to
	construct the dependency graph of the pre-deps and walk it using a
	BFS to correctly order packages.  Not actually used yet, sigh.
	(rc_debman_transact): new signals
	(query_all_read_line_cb): speedups including getting rid of
	g_strcasecmp, some small bug fixes, fixes to use
	rc_debman_fill_depends correctly.

2001-07-10  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-debman.c: get rid of warning

2001-06-25  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: Don't be fascist about removing packages;
	give 'em a chance to get upgraded.

	* rc-deps-util.c: finish up package_hash_helper.

2001-06-21  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-line-buf.c: debugging output die die die

	* rc-deps.c, rc-deps-private.h: minor cleanup

	* rc-deps-util.c: minor cleanup

2001-06-20  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-package-info.c: Oops, dep_name_table needs slists to be
	hashed into it, not packages

	* rc-deps-util.c: Added the one line to make debian work

	* rc-deps.c, rc-deps-private.h: Fixed some memory corruption
	double-free issues.

	* rc-channel.c: Fixed compile warning

2001-06-19  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-package-info.c: forgot to merge

	* merge in from libredcarpet-or-dep-fixup branch
	
	* Makefile.am: dist rc-deps-private.h
	
2001-06-19  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-channel.c, rc-channel.h: Added dep_name_table along with dep_table
	which is indexed by name not by spec.  Also changed both to have values
	which are slists of packages, instead of just one package.  dep_table
	might go away in the near future.

	* rc-debman-general.c, rc-debman.c: Updated to handle or deps using
	the rc_dep_or interface.

	* rc-deps-private.h: added.

	* rc-deps-util.c, rc-deps-util.h: renamed rc_deps_fix_system to
	rc_dep_fix_system;  added rc_dep_or interface functions, and first
	pass at debian package list munging to provide the right things.

	* rc-deps.c: Updated to understand and use dep_name_table correctly.

	* rc-package-dep.c, rc-package-dep.h: fixed xml parsing bits to create
	ors

	* rc-util.c, rc-util.h: added utility functions to manage hash tables
	of slists.
	
	* rc-debug-misc.c: minor typo fixes

2001-06-07  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-channel.c, rc-debman-general.c, rc-debug-misc.c,
	rc-debug-misc.h, rc-debug-misc.c, rc-deps-util.c,
	rc-deps.c, rc-deps.h, rc-distro.c, rc-package-dep.h,
	rc-package-info.c, rc-rpmman.c: 

	Changes to make a RCPackageDep into what used to be a
	RCPackageDepItem.  RCPackageDep isn't a SList anymore; the debian
	backend hasn't been fully fixed to understand this -- as it is now,
	it will only use the first part of an or dep.  To be fixed later.

2001-06-14  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_transact):
	s/RPMDBI_PACKAGES/RPMDBI_AVAILABLE/

	* rc-rpmman-types.h: remove the unneeded definition of
	RPMDBI_AVAILABLE

2001-06-14  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_transact): use RPMDBI_PACKAGES, an rpm4
	specific define, to decide what kind of rpmProblem we have at our
	disposal.

2001-06-14  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (transaction_add_install_packages): clarify the
	INSTALL_UPGRADE bit
	(rc_rpmman_transact): fix the rpmProblem fuckup
	(split_rpm): s/close/rc_close/
	(load_fake_syms): fix two typos, we never statically link against
	rpm4 so this never came up before

	* rc-md5.c (rc_md5): s/close/rc_close/

2001-05-15  Joe Shaw  <joe@ximian.com>

	* rc-packman-private.h (RCPackmanPrivate): Add an extension field for
	the default file extension. Added prototype for
	rc_packman_set_file_extension().

	* rc-packman.c (rc_packman_init): Set extension to NULL.
	(rc_packman_set_file_extension): Added.
	(rc_packman_get_file_extension): Added.
	
	* rc-debman.c (rc_debman_init): Set the file extension to "deb".

	* rc-rpmman.c (rc_rpmman_init): Set the file extension to "rpm".

2001-05-14  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-channel.c (rc_channel_parse_xml): if file_path isn't specified,
	don't copy path into it -- it should be null, since path is always
	prepended.
	
2001-05-07  Joe Shaw  <joe@ximian.com>

	* rc-md5.c (rc_md5): Close the file descriptor when we're done. Plugs
	the infamous fd leak.

2001-05-01  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: Oops. fix bug where some dependants weren't getting
	correctly upgraded.

2001-05-01  Joe Shaw  <joe@ximian.com>

	* rc-distro.c: Change the string for Yellow Dog because it was totally
	wrong before.

2001-04-23  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: if the provide we read out of the
	RPMTAG_PROVIDENAME is the same as the name of the package we're
	in, don't include the provide, since it looks like rpmlib picked
	up the same hack we did.

2001-04-23  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: add some stupid /opt/gnome SuSE directories

2001-04-23  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: sort of reverted older commit where we were passing a
	dep to upgrade_or_remove package -- this doesn't make sense,
	as we're trying to upgrade the /package/ not the dep -- so, the case
	of foo-dev 1.0 requiring foo 1.0; we don't want to know about the
	foo 1.0 dependency, we just want a newer foo.

	* rc-deps.c: don't pull in an older version while trying to remove
	the intermediate failed dependency on system package version; we
	need to check if the "existing" package is newer, not merely
	equal.  I now realize that this makes no sense to anyone but me,
	and I might as well have written about pink elephants and blue
	clouds in this changelog.
	

2001-04-23  Ian Peters  <itp@ximian.com>

	* rc-debman.c: a questionable but apparently necessary fix to no
	longer break up the unpack onto multiple lines.  Ugh.

2001-04-22  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-package.c: It helps to return a new packages array
	from rc_package_slist_remove_older_duplicates.

	* rc-package.c, rc-package.h: Added
	rc_package_slist_remove_older_duplicates.

2001-04-21  Ian Peters  <itp@ximian.com>

	* rc-distro.c: cleaned up, put YDL 1.2 in the list, removed
	Caldera, fixed a LinuxPPC naming issue

2001-04-21  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: some speed fixes; fixed the doubling bug (oops), also
	we're a bit more smarter in finding an upgrade/remove package case.

	* rc-package-dep.c: On rpm systems, don't merge dep items with
	different epochs since the dependency semantics with epochs on
	rpm are too weird.

2001-04-20  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: only mark provides to avoid in provide_require_check
	if nothing succeeds; otherwise we run the risk of marking something
	as avoid that's really providing what we want.

2001-04-20  Ian Peters  <itp@ximian.com>

	* rc-debman.c: fix my last commit

2001-04-20  Ian Peters  <itp@ximian.com>

	* rc-debman.c: in rc_debman_verify, check the size of the file as
	well

2001-04-20  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-distro.c: We can't create a hash in dtype->extra_hash
	if dtype is NULL.  "Oops."

	* rc-distro.c, rc-distro.h: add a RC_DISTRO_NO_GLIB conditional
	section, for compiling rc-distro without a glib dependency.

	* rc-distro.c: Mandrake uses -i586, debian potato is
	debian-potato-i386, not -22-.

	* rc-distro.c: recognize RH 7.1 by 7.1 in redhat-release, not
	7.0.9

2001-04-19  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: oops. process system packages /before/ the package
	that's about to be installed, so that we catch conflicts and the
	like correctly.

	* rc-deps.c: stopped calling deps_fix_missing in loop.  This
	probably isn't necessary any more; will need a good chunk of testing
	to make sure, though.

2001-04-19  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: don't make a conflict in some cases, but wait until
	the end to see if it can indeed be provided

2001-04-18  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (split_rpm): close the payload file when we're done
	writing to it.  This will fix a fd leak, as well as allowing the
	unlink to actually succeed, meaning that the disk space will be
	returned to the user.  Reported to me from tigert via joe.

2001-04-18  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: oops, get rid of some fprintfs

	* rc-deps.c: Make sure that the require is added with the joined
	name before we start adding other things, so that we don't get into
	a nasty loop.  Also break out of a loop of daps after we
	upgrade_or_remove, as we probably lost the pointer at this point.
	The duplicate dep bug exists now.

2001-04-18  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (fill_depends): attempt to handle both the the pre
	3.0.3 and 3.0.4 and above cases for file dependencies.  This
	commit may be broken; I'll revert this commit if testing doesn't
	pan out.

2001-04-17  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (fill_depends): when adding the contents of an RPM
	file in the provides list, handle the rpm < 3.0.4 case where we
	don't have RPMTAG_BASENAMES, RPMTAG_DIRNAMES, or
	RPMTAG_DIRINDEXES.  Here we use the RPMTAG_FILENAMES tag, which
	was renamed to RPMTAG_OLDFILENAMES in rpm 3.0.4 and above, and no
	longer works.

2001-04-16  Ian Peters  <itp@ximian.com>

	* rc-line-buf.c: corrected bizarre ben-bug behaviour

	* rc-rpmman.c: add my file-deps hack, we can remove this later if
	people object too much

2001-04-13  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: when rpmRunTransactions returns < 0, don't treat
	this as a bad error.  Stupid rpm.

2001-04-10  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c, rc-rpmman.h: introduce rc_rpm_open, rc_rpm_close,
	and rc_rpm_read to wrap fdOpen, fdClose, fdRead, Fopen, Fclose,
	and Fread.  jbj makes me upset sometimes.  Also get those symbols
	from rpmlib when necessary.

2001-04-10  Ian Peters  <itp@ximian.com>

	* rc-rpmman-types.h: the borrowed FDIO struct from rpmio.h

	* rc-rpmman.c: if we can't get fdOpen, maybe that's because fdOpen
	is actually fdio->_open.  did you ever think of that?

2001-04-09  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: oops, fix an infinite loop case..

2001-04-09  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: if we can't open rc-rpm-helper.so, try
	rc-rpm-helper-with-rpmio.so, not rc-rpm-helper.so again.  I suck.

2001-04-05  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c, rc-rpmman.h: rename fd* to rc_fd*, because jbj is
	an idiot.  fixes a bug that only shows up on rpm 3.0.4.  god what
	a fucker.

2001-04-04  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: sigh, s/RPMTAG_NAMES/RPMTAG_NAME/, this is the
	problem with editing code you can't actually compile.
	
2001-04-04  Ian Peters  <itp@ximian.com>

	* Makefile.am: whoops, fix the rpmlead and signature references

2001-04-04  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: the rpmlead and signature includes were the same
	for rpm 3.0.x and 4.0.x, so just include the one copy regardless
	of rpm version

	* rpmlead-3-0-x.h, rpmlead-4-0-x.h, signature-3-0-x.h,
	signature-4-0-x.h: removed

	* rpm-rpmlead.h, rpm-signature.h: added

2001-04-04  Ian Peters  <itp@ximian.com>

	* rc-rpmman.h, rc-rpmman.c: comment out all references to Ferror
	for the time being.  i was only using this twice, and in both
	places if there's an error fdOpen should just return NULL anyway,
	so this seems harmless.  this was required because rpm 3.0.3 lacks
	Ferror.  sigh.

2001-04-04  Ian Peters  <itp@ximian.com>

	* rc-packman.h, rc-packman.c: added rc_packman_set_libdir and
	rc_libdir, which let you configure the directory that rc-debman
	and rc-rpmman look for the rc-*-helper.so files.

	* rc-debman.h (rc_debman_set_helper): removed

	* rc-debman.c (rc_debman_set_helper): removed
	use rc_libdir where appropriate

	* rc-rpmman.c: use rc_libdir to find the rc-rpm-helper*.so files

2001-04-04  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_init): remove unused variable

2001-04-04  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_init): reverse the order that we dlopen
	the rc-rpm-helper files in.  this is a weak attempt to get around
	a potential glibc bug, this shouldn't affect how anything else
	goes.

2001-04-03  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_init): d'oh, it's rc-rpm-helper.so not
	rpm-rpm-helper.so

2001-04-03  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (vercmp): add a hack to correctly sort/compare alpha
	and numeric chunks, so that ximian.1 is larger than 0_helix_1.

2001-04-03  Ian Peters  <itp@ximian.com>

	* rc-md5.c: #include <config.h> to pick up on the endian check

	* rc-rpmman.c: #if 0 out some code that just causes memprof to get
	mad at me.  It's not like rpmlib is ever going to free this shit
	anyway.

2001-04-02  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: Fixed an unreported conflict case. Oops.
	Not sure if this breaks anything else, shouldn't...

2001-04-01  Ian Peters  <itp@ximian.com>

	* Makefile.am: only add rpmhelperdir and rpmhelper_DATA if
	ENABLE_RPM and not STATIC_RPM.  don't get rid of libredcarpettmp.a
	at the end of the libredcarpet.a STATIC_RPM case -- i don't know
	why i did this in the first place, and now it doesn't get rebuilt
	every time you pass over this target.  i think.  automake is still
	my bitch.

2001-04-01  Ian Peters  <itp@ximian.com>

	* Makefile.am: add rc-rpmman-types.h to rpm_sources.  add
	rc-rpm-helper-with-rpmio.so and rc-rpm-helper.so to EXTRA_DIST.
	Get rid of helperdir and helper_DATA, and conditionally use
	rpmhelperdir, rpmhelper_DATA, dpkghelperdir, dpkghelper_DATA.
	conditionally compile rc-dpkg-helper.c into rc-dpkg-helper.so,
	otherwise just touch this file.  remove libredcarpet.a in
	clean-local.  automake is now my bitch.

2001-04-01  Ian Peters  <itp@ximian.com>

	* Makefile.am: pick more proper names for the rpm .so files

	* rc-rpmman.c: use those more proper names

	* rc-rpm-helper.so, rc-rpm-helper-with-rpmio.so: here are those
	more proper names we were speaking of

2001-04-01  Ian Peters  <itp@ximian.com>

	* Makefile.am: hacked it up to parse RPM_STATIC_LIBS and do some
	ar magic to put the object files from those libraries into
	libredcarpet.a.

	* rc-rpmman.c: if RC_RPM4 is defined in the STATIC_RPM case, use
	the rpm4 symbols, otherwise rpm3

2001-03-30  Ian Peters  <itp@ximian.com>

	* Makefile.am: dist rpm-sucks-with-rpmio.so and
	rpm-sucks-without-rpmio.so

	* rc-rpmman.h: include gmodule.h.  Make major_, minor_, and
	micro_version gint instead of guint.  Optionally include a GModule
	for the rpm_lib if we're using the dlopen hack.

	* rc-rpmman.c: if RC_NO_RPM_DB is set, don't try to close the
	database on destroy.  Possibly g_module_close the rpm_lib on
	destroy.  Store the rpm_lib GModule in the rpmman struct.
	g_module_open rpm-sucks-with-rpmio.so or
	rpm-sucks-without-rpmio.so, not librpm.so and librpmio.so
	directly.
	(parse_rpm_version): correctly rip a version string, like x.y.z,
	into major, minor, and micro parts.

	* rpm-sucks-with-rpmio.so, rpm-sucks-without-rpmio.so: little
	shared objects that link against the assorted rpm libraries.
	These are generated with:
		ld -shared -o rpm-sucks-with[out]-rpmio.so \
		-lrpm [-lrpmio] -lpopt

2001-03-30  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: Got rid of a stray fprintf

	* rc-package-dep.c: Make dep_to_str take an arg of '2' if you
	want html-ized symbols (&lt; instead of <, etc.)  It's a gint
	now instead of a boolean.

2001-03-30  Ian Peters  <itp@ximian.com>

	* Makefile.am: if we're building the static version, do the evil
	hack, otherwise don't, just build the libredcarpet.a

	* rc-rpmman-types.h: added.  evil file with types we need to
	compile on either rpm3 or rpm4 base platforms.

	* rc-rpmman.c, rc-rpmman.h: eww.  either dlopen the librpm.so file
	and read symbols out of it, or use the statically linked versions.
	wrap all rpm functions through function pointers in the rpmman
	struct.

2001-03-29  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c (deps_find_best_package_for_dep): Doh. Don't iterate
	over the variable you just made a copy of in a temporary iterator.
	
	* rc-deps.c (deps_find_provide):  Only upgrade at most one package
	per pass, since we might have the same package in there twice
	at this point and we don't want to remove the wrong thing.

2001-03-29  Ian Peters  <itp@ximian.com>

	* rc-debman.c, rc-verification.c, rc-debman.h, rc-verification.h:
	add some nasty hacks so that joe can override the location of the
	.so and the .gpg files

2001-03-27  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c (deps_add_anonymous_package): Do a bit of sanity
	checking, make sure we never add an anonymous package that already
	exists in some other form.
	(deps_find_provide): don't assume that just because we found a
	newer package for fixing a pdi that it will indeed fix it -- check
	to make sure that package hasn't already been added to the list.

2001-03-27  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (split_rpm): no need to set *md5sum to NULL
	(rc_rpmman_verify): initialize md5sum to NULL, fixes BUG:1890,
	BUG:2002

	* rc-packman.c: make the marshaller static void to shut the whiny
	compiler up ;-)

2001-03-21  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c, rc-deps.h: Add creating of extra_info structures for
	why packages need to be installed/upgraded.

2001-03-21  Joe Shaw  <joe@ximain.com>

	* rc-distro.c (distro_types[]): Change the "extra_stuff" parameters of
	the distros.
	(rc_figure_distro): Added a hash table to the RCDistroType struct
	called extra_hash and parse the extra_stuff string here.
	(rc_distro_option_lookup): Added. Looks up an option in the extra_hash
	hash table.

2001-03-20  Joe Shaw  <joe@ximian.com>

	* rc-debman.c (rc_debman_verify): Do not crash if package->history
	is NULL; don't do the md5sum if so.

2001-03-20  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-package-info.c: When parsing debian packages.gz files, set
	the installed_size on the update, not on the package -- this fixes
	the debian package size calculation bug.

2001-03-19  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps-util.c: Oopsie!  Data allocated outside
	of a loop should /not/ be freed inside the loop.

2001-03-16  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: moved back to the older deprecated but still
	functioning rpmio api.  I think we maybe compile on RPM 3.0.3 now?

2001-03-16  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_transact): switch back to "\n" instead of
	"<br>" in the error strings, we'll handle this in the GUI.  New
	approach to handling all of the different RPMSENSE_FOO defines,
	try to avoid the ?? relation.

2001-03-13  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_transact): put "<br>" instead of "\n"
	into error strings, sigh

2001-03-12  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (vercmp): handle the broken "mdk" stuff

2001-03-12  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_read_header): revert last, we'll fix it
	in vercmp instead, otherwise users would see this in the GUI

2001-03-12  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_read_header): handle the broken "mdk"
	parts of the release when dealing with Mandrake, sigh

2001-03-09  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_transact): cast the transact_cb to
	rpmCallbackFunction to avoid one last warning, since Vlad went to
	all this trouble

2001-03-09  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_transact): g_string_sprintfa probably
	wants a GString as the first argument

2001-03-09  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps-util.c, rc-deps.c, rc-deps.h, rc-pretty-name.c: Made
	these warning clean.  Also cought a bug in rc-deps.c (oops!)

	* rc-package-section.c, rc-package-section.h: Created
	rc_package_section_to_user_string ().

2001-03-08  Ian Peters  <itp@ximian.com>

	* rc-debman.c (do_unpack_read_line_cb): handle "Unpacking
	replacement foo" as well as "Unpacking foo"
	move the verify_status stuff to the top of the file to fix a
	warning

2001-03-08  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_init): only open the database for writing
	if we're root; otherwise open the database for reading only

2001-03-08  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_transact): avoid using the
	rpmErrorCallback stuff, instead use the rpmProblemSet information
	as appropriate given the return value of rpmRunTransactions.
	Let's see if this approach works any more reliably.

2001-03-07  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-package-spec.c, rc-package-spec.h: Added
	rc_package_spec_slist_find_name -- to search
	for a name in a list of packages, for example.

2001-03-07  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_transact): so this should work for
	reporting conflict errors through the rc_packman_set_error pathway

	* rc-rpmman.c (rc_rpmman_transact): some loving to the rpm
	dependencies reporting stuff.  It still just dumps it to stderr,
	but we'll work on that.

	* rc-rpmman.c (transaction_add_remove_packages): don't shadow the
	definition of count and trample all over things.  D'oh.

	* rc-packman.c: define my marshaller correctly to avoid stupid
	warnings.  La la la.

	* rc-rpmman.c (rc_rpmman_transact): correctly initialize elements
	of state to avoid a segfault, and then some nasty counting errors.

2001-03-07  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps-util.c, rc-deps-util.h: Some code for getting nice
	user-style error strings about missing packages and conflicts.

	* rc-package-spec.c, rc-package-spec.h: Created
	rc_package_spec_version_to_str.

	* rc-package-dep.h: Minor comment.

2001-03-07  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (transaction_add_install_packages): guint instead of
	gboolean, return the expected number of package installations, 0
	on error
	(transaction_add_remove_packages): same as above, more pertinent
	given the multi-install problem addressed on 3/5.  Some other
	random cleanups / clarifications when handling rpm return values
	to hopefully be more clear about what's an error and what's not.
	(rc_rpmman_transact): put state on the stack so we don't need to
	worry about leaking it, I was leaking it before.  Get
	install_total and remove_total from _add_install_packages and
	_add_remove_packages.  Pass it by reference into the callback.
	Only add install and remove packages if install_packages or
	remove_packages are non-NULL.  General clarifications.

2001-03-06  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (transaction_add_remove_packages): move the
	rpmdbFreeIterator call to outside of the while look, I'm a moron,
	and remove a spurious call to rpmdbNextIterator, I'm a moron
	(rc_rpmman_query_all): remove an unneeded call to headerFree, and
	free the iterator at the end of the scan

2001-03-05  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (transaction_add_remove_packages): comment out the
	code paths that error out when multiple packages match the string
	we're removing on.  Apparently, in the real world this isn't such
	an error case.  Also, for RPM 4.0 make sure we remove all packages
	which match the label.

2001-03-04  Ian Peters  <itp@ximian.com>

	* rc-line-buf.c (rc_line_buf_cb): handle G_IO_ERR in addition to
	G_IO_HUP, perhaps this will fix the defunct dpkg problem.  I don't
	know how to recreate, so this is just a guess, but it makes sense
	to me.

2001-02-28  Ian Peters  <itp@ximian.com>

	* rc-debman.c (i18n_fixer): added.  fixes the language issues with
	dpkg I think.  Switch to new RCPackman signals

	* rc-packman.c, rc-packman.h: make sane the signals RCPackman
	emits

	* rc-rpmman.c, rc-rpmman.h: use these new sane signals

2001-02-27  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: ewpz. don't get rid of old provides conflicts if the
	new one is the same as the old one.

	* rc-deps.c: updated rant

	* rc-deps.c: Get rid of old provides conflicts if there is a new one
	coming in, doh.

	* rc-deps.c: Fix typo causing segfault due to a variable being NULL

2001-02-26  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: Made remove and install work correctly. Removes are
	correctly partial now as well.

	* rc-package-dep.c: undef'd DEBUG -- it spews way too much info than
	necessary at -d 6

	* rc-deps.c, rc-deps.h: New nifty partial tree stuff.  Should work,
	I hope.  Any package that is installed on the system is assumed to be
	"ok", and its dependencies are not checked.

	* rc-deps-util.c: Call rc_dep_resolution_resolve_system

	* rc-distro.c: add linuxppc
	
	* rc-rpmman.c: Changed a break to a continue to make the
	verrev-string splitting thing work.

2001-02-25  Ian Peters  <itp@ximian.com>

	* Makefile.am: add -DLIBDIR=... to the INCLUDES line, and install
	rc-dpkg-helper.so into $(libdir)/redcarpet

	* rc-debman-private.h: make the status_file member const

	* rc-debman.c: grab the helper out of LIBDIR instead of SHAREDIR,
	access the status_file and rc_status_file from the debman
	consistantly

	* rc-rpmman.h: rename db to read_db for clarity

	* rc-rpmman.c: s/db/read_db/ where appropriate.  Open the rpm
	database O_RDONLY initially, hold this lock while RC is running.
	(rc_rpmman_transact): open the rpm database O_RDWR and use this
	for creating and running the transaction.

2001-02-24  Joe Shaw  <joe@ximian.com>

	* rc-distro.c (rc_figure_distro): Don't error out if we can't
	determine what architecture the user is on. Instead return NULL and
	let the front-end deal with it.
	
	* rc-distman.c (rc_distman_new): Ditto, except with the distro instead
	of the arch. (BUG:1425)

2001-02-20  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps-util.c, rc-deps-util.h: GPL message

	* rc-md5.c: license notice

2001-02-20  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_transact):
	s/install_flags/transaction_flags/

	* rc-rpmman.c (rc_rpmman_transact): add some install_flags and
	problem_filter action, woowoo

2001-02-19  Vladimir Vukicevic  <vladimir@ximian.com>

	* Makefile.am: oops, fix typo for dist

	* rc-package-dep.c: rpm sucks my ass and ignores epochs and/or releases
	in comparisons if they're not specified in the dependency -- so now
	we do that for all deps, not just equals.

	* rc-deps-util.c: Oops. Remove all but the /newest/ duplicate,
	not all but the oldest (doh!)

2001-02-16  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps-util.c, rc-deps-util.h: New files that have some verification
	stuff in them.

	* rc-package.c, rc-package.h: rc_package_slist_find_duplicates (for
	verification)

	* Makefile.am: Add rc-deps-util.[ch]

2001-02-12  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-package-set.h: Fix #endif to get rid of compiler warning

	* rc-deps.c: Attempt to fix brokenness introduced by earlier
	commit.  Removes are more intelligent and robust now (we can use
	upgrade_or_remove knowing that the remove will happen corerctly
	later).

	* rc-debug-misc.c, rc-debug-misc.h: Added debug_rc_package_slist_dump.

2001-02-10  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: Do more intelligent checking when deciding what to
	remove due to a conflict.  Set the channels before populating
	hashes with system pkgs, in case something needs to be fixed. Also
	protect against installing the same package multiple times.  This
	needs some testing love.

2001-02-09  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_transact): check the number of conflicts
	as well as the return code, don't I suck

2001-02-09  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: Fix conflict resolution (fixes Mandrake 7.0 bug)

2001-02-08  Joe Shaw  <joe@ximian.com>

	* rc-distro.c (distro_figurers): Move Mandrake ahead of Red Hat, 
	because Mandrake (7.0, anyway) has /etc/redhat-release.

2001-02-08  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-distro.c: Oops. check for architecture the "correct" correct way.

	* rc-deps.c: Fixed rpm breakage introduced.

	* rc-deps.c: Okay, so even more fixications. Will test on redhat.

2001-02-07  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.h: oops, this one too

	* rc-deps.c: More fixications for debian. All known breakage cases don't
	break now.

	* rc-deps.c: Fix for installing packages that conflict with eachother in the
	install step.

2001-02-07  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_section_to_package_section): stop leaking
	and give it love

2001-02-07  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_section_to_package_section): added.  don't look at this function
	(rc_rpmman_read_header): use it here

2001-02-06  Joe Shaw  <joe@ximian.com>

	* rc-package-importance.c: Ditch RC_IMPORTANCE_NEW and RC_IMPORTANT_MAX

2001-02-06  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: Fixed a few debian issues...

2001-02-06  Joe Shaw  <joe@ximian.com>

	* rc-distro.c: Add Caldera to distro_figurers and distro_types.

2001-02-06  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: Fix for fixing RPM systems.  Debian might
	feel ignored.

2001-02-05  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: finish moving the db into the RCRpmman struct

2001-02-02  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: Yay for typos. Made debian conflicts (mostly) work
	again.  Nuked a single line so a list wasn't getting looked up
	and was always null..

2001-02-01  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: bite me

	* rc-rpmman.h: move the rpmdb into the RCRpmman struct

	* rc-rpmman.c: remove all calls to rpmdbOpen, rpmdbClose, etc.
	(rc_rpmman_init): rpmdbOpen here
	(rc_rpmman_destroy): rpmdbClose here
	(rc_rpmman_transact): check the rpmRunTransactions return code and
	do something intelligent with it

2001-01-31  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: Made redhat 6 and 7 work. Yay. Broke things
	on debian. Boo.


2001-01-31  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_error_cb): Stupid rpmlib doesn't
	differentiate between fatal and non-fatal errors

2001-01-31  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_transact): add a call to rpmdepCheck on
	the transaction before we try to run it, duh

2001-01-30  Vladimir Vukicevic  <vladimir@ximian.com>

	* Makefile.am: use $srcdir for dpkg-helper to make distcheck
	correctly.

	* rc-deps.c: EEEEK. What was I thinking? Unbreak deps on redhat
	(and possibly lots on debian too).

	* rc-package-info.c: minor align fix

2001-01-30  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (vercmp): try again

2001-01-30  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (vercmp): fixed to be more like the one in rpm4,
	fixes the xinetd bug on rh7

2001-01-30  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: Tasty treats for debian users. Less crash, more happy!
	Kozmo can't touch this!

2001-01-30  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (transact_cb): with a hack hack here and a hack hack
	there, here a hack, there a hack, everywhere a hack hack...

2001-01-30  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c, rc-deps.h: More yum yum fixes. Shouldn't
	crash now, purify is happy.. also added some _frees
	so that we can recover that memory usage!

2001-01-29  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: ewpz. don't get stuck in an infinite iteration
	when removing a require at some point.

2001-01-29  Ian Peters  <itp@ximian.com>

	* rc-debman.c (make_unpack_commands): correctly sysconf for
	ARG_MAX instead of guessing

2001-01-29  Joe Shaw  <joe@ximian.com>

	* rc-packman.c (rc_packman_get_error): If there is no packman object,
	that's a fatal error.

2001-01-29  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_transact): get rid of a broken
	transaction step, add some rpmError handling, etc

	* Makefile.am: add $(GLIB_CFLAGS) to the includes

2001-01-29  Ian Peters  <itp@ximian.com>

	* rc-verification.c (rc_verify_gpg): set --logger-fd to 1 instead
	of 2, which is the fd the RCLineBuf is listening on.  It's ok,
	since it'll ignore hte lines that don't begin with [GNUPG:], and
	this shuts up the
	I'm-gpg-I-won't-shut-up-even-with-the-quiet-option-crap that
	everyone has complained about.

2001-01-29  Joe Shaw  <joe@ximian.com>

	* rc-channel.h: Added pkgset_file and pkgset_compressed.

	* rc-channel.c (rc_channel_parse_xml): Parse pkgset_file and
	pkgset_compressed.
	(rc_channel_free): Free pkgset_file and pkgset_compressed.

	* rc-pretty-name.c (rc_pretty_name_lookup): Handle the case if
	the hash table is NULL.

2001-01-29  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-package.c: do de de

	* rc-package.c, rc-package.h: Add
	rc_package_slist_sort_by_pretty_name.

	* rc-deps.c: la la la

	* rc-deps.c: Okay, so, try to do some sort of conflict
	notification.

	* rc-deps.c, rc-deps.h: Oops. count /correctly/ for the recursion.
	Also add notification of abort.

	* rc-pretty-name.c: get rid of debug fprintf

2001-01-29  Ian Peters  <itp@ximian.com>

	* rc-debman.c: pass some carefully chosen --force-foo options to
	dpkg to avoid failures on fairly benign situations

2001-01-29  Vladimir Vukicevic  <vladimir@ximian.com>

	* Makefile.am, rc-pretty-name.c, rc-pretty-name.h, libredcarpet.h:
	Pretty names, pretty names.

	* rc-distro.c: Figure out that debian is x86, assbarn.

2001-01-28  Ian Peters  <itp@ximian.com>

	* rc-distman.c: change the ENABLE_RPM3 / ENABLE_RPM4 to ENABLE_RPM

2001-01-28  Vladimir Vukicevic  <vladimir@ximian.com>

	* rc-deps.c: Lots of yummy fixes.  Removes work better,
	debian works better, etc.

	* rc-distro.c: added mdk 7.2

2001-01-26  Ian Peters  <itp@ximian.com>

	* rc-debman.c (make_unpack_commands): overhauled, made it use
	const strings, since that's all that was ever there, a little more
	efficient I think
	(do_unpack): make all dpkg --unpack commands once first with the
	--no-act option, and only if this succeeds do we proceed to
	actually screw things up
	(rc_debman_init): add call to rc_package_dep_system_is_rpmish

	* rc-rpmman.c (rc_rpmman_init): add call to
	rc_package_dep_system_is_rpmish

2001-01-26  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-package-dep.c, rc-package-dep.h: New
	rc_package_dep_system_is_rpmish call.

	* rc-deps.c: VASTLY improved debian dependency code.  Conflits
	are moslty handled correctly.  Debian stupid-self-conflicts are
	handled.  Packages are correctly uninstalled.  The code itself
	has a lot of cruftiness laying around; it's going to need some
	massaging to look pretty, but it, apparently, works.

	* rc-deps.h: added dep_print_results
	
	* rc-debug-misc.c, rc-debug-misc.h: Moved dep_print_results into
	rc-deps.c.

	* rc-package-dep.c: Oops, keep iterating the list, silly!

	* rc-package-dep.h: new warning about RCPackageDepItem

	* rc-package-info.c: fixed some formatting bugs.

	* ChangeLog: Fixed itp's HR blunder.

2001-01-25  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_query): BLEEP me.  I hate rpmlib.  Not
	finding something in a database isn't a failure, it's a successful
	search.

2001-01-25  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-deps.c: oops. don't remove the list we're traversing
	from under us.

2001-01-25  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-deps.c, rc-deps.h: More yummy fixes.  I'm feeling much more
	confident about debian now.  gaim-gnome $!@# doesn't work, still.
	I know why, just haven't poked the right place to fix it.

2001-01-24  Ian Peters  <itp@ximian.com>

	* rc-package-info.c (debian_packages_helper): Instead of "No
	information available", we instead say "Upstream Debian release"

	* rc-debman.c (do_unpack): add the --auto-deconfigure option to
	the unpack line

2001-01-24  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: global cleanup, pkg to package, p to packman, hdr
	to header, etc
	(GTKFLUSH): added this macro to flush pending gtk events
	(transact_cb): add calls to GTKFLUSH after every signal emission
	(transaction_add_install_packages): renamed, cleaned up, add lots
	of calls to rc_packman_set_error
	(transaction_add_remove_packages): ditto
	(rc_rpmman_transact): updated to name changes, cleanup, error
	handling
	(split_rpm): added, does much of the work that used to be in
	rc_rpmman_verify
	(rc_rpmman_verify): call split_rpm, factor the code better

2001-01-24  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-package-dep.c: If you're going to use autoconf config.h
	flags in your code, it helps to include config.h.  It also
	helps to get the right name of the variable.

2001-01-23  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-package-dep.c: Use rpmish semantics only if RPM is compiled in

	* rc-deps.c: use rc_package_slist_sort_by_spec, not the one that
	got renamed to _by_name!

	* rc-package-spec.c, rc-package-spec.h: rc_package_spec_compare

	* rc-package.c, rc-package.h: rc_package_slist_sort_by_spec

2001-01-23  Ian Peters  <itp@ximian.com>

	* red-carpet.gpg: added keys for Red Hat, Caldera, TurboLinux,
	Linux Mandrake, and SuSE

2001-01-23  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-distro.c: erm, get it right.

	* rc-distro.c: Add Scyld Beowulf 2.0

	* rc-package.c: Hmmm. You really -can't- strcmp() two
	RCPackage *'s, no matter how much you try.

2001-01-23  Ian Peters  <itp@ximian.com>

	* rc-debman.c (do_purge): s/dpkg-helper/rc-dpkg-helper/
	(do_unpack): ditto
	(do_configure): ditto

2001-01-23  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-package-spec.c, rc-package-spec.h: I want
	(g-slist-find-custom requestd_pkgs pkg
		(lambda (a b) (not (package-spec-equal a b))))
	(Added package_spec_not_equal)

2001-01-23  Ian Peters  <itp@ximian.com>

	* rc-packman.c (rc_packman_query): remove busy check
	(rc_packman_query_file): remove busy check
	(rc_packman_query_all): remove busy check
	(rc_packman_verify): remove busy check
	(rc_packman_find_file): remove busy check

2001-01-23  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c: add install_extra to InstallState
	(transact_cb): add the install_extra to the transaction total.
	Only switch to the configuring state if we're installing things.
	(rc_rpmman_transact): calculate the install_extra by querying if
	packages to be installed have older already installed versions

2001-01-23  Ian Peters  <itp@ximian.com>

	* rc-packman.c (rc_packman_query): comment out busy check
	(rc_packman_query_file): comment out busy check
	(rc_packman_query_all): comment out busy check
	(rc_packman_verify): comment out busy check
	(rc_packman_find_file): comment out busy check

2001-01-23  Ian Peters  <itp@ximian.com>

	* rc-rpmman.c (rc_rpmman_transact): first pass at code to handle
	the additional transactions generated by upgrading rpm packages

2001-01-23  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-debug-misc.c, rc-debug-misc.h: Add an optional debug level
	to printing routines.

	* rc-deps.c, rc-deps.h: Revert to a little older version which works
	well for redhat, has some issues for debian.

	* rc-package-dep.c: Change verify_and_relation to take an is_virtual
	parameter, for debian.  Also some epoch/release hacks for RPM.

	* rc-package-info.c: Add the is_virtual stuff to find_package.

2001-01-23  Ian Peters  <itp@helixcode.com>

	* rc-rpmman.c: replaced some tabs with the correct number of
	spaces
	(rc_rpmman_query): back to using RPMDBI_LABEL, I guess
	(rc_rpmman_find_file): nothing changed here; I just wanted to
	point out that my first attempt at writing this for rpm4 worked.
	;-)

2001-01-23  Ian Peters  <itp@helixcode.com>

	* rc-rpmman.c (rc_rpmman_query): s/RPMDBI_LABEL/RPMDBI_NAME/,
	after conversation with msw
	(rc_rpmman_find_file): rpm4 version initial pass, let's see if
	this works

2001-01-22  Ian Peters  <itp@helixcode.com>

	* rc-channel.h: distro_target is now a GSList* of gchar*, not just
	gchar*

	* rc-channel.c: as above; split the xml distro_target on : to get
	a list of distros to work with.  Basically this is channel
	aliasing; we can now say
	distro_target="redhat-60-i386:redhat-61-i386:redhat-62-i386" and
	it'll just work

2001-01-22  Ian Peters  <itp@helixcode.com>

	* rc-rpmman.c (rc_rpmman_find_file): stubbed out for rpm4, need to
	talk to msw.  fixed a memory leak in the rpm3 version

2001-01-22  Ian Peters  <itp@helixcode.com>

	* rc-rpmman.c (rc_rpmman_find_file): added.  rpm3 only right now,
	I'll test it and then write rpm4

	* rc-debman.c (rc_debman_find_file): add one last
	rc_packman_set_error

2001-01-22  Ian Peters  <itp@helixcode.com>

	* rc-debman.c (rc_debman_find_file): add some rc_packman_set_error
	calls where appropriate

2001-01-22  Ian Peters  <itp@helixcode.com>

	* rc-rpmman.c: remove some spurious rpm includes

2001-01-22  Ian Peters  <itp@helixcode.com>

	* rc-verification.c (rc_verify_gpg): don't pass the
	--no-auto-key-retrieve option, as it does not appear to be present
	in gpg 1.0.1 on RH6.2.  Initialize the verification as
	RC_VERIFICATION_STATUS_UNDEF instead of the default,
	RC_VERIFICATION_STATUS_FAIL

2001-01-22  Ian Peters  <itp@helixcode.com>

	* rc-channel.c, rc-channel.h, rc-debman-general.c,
	rc-debman-general.h, rc-debman-private.h, rc-debman.h,
	rc-debug-misc.c, rc-distman.c, rc-line-buf-private.h,
	rc-line-buf.c, rc-pakcage-dep.c, rc-package-importance.c,
	rc-package-info.c, rc-package-section.c, rc-package-set.c,
	rc-package-set.h, rc-package-spec.c, rc-package-update.c,
	rc-package-update.h, rc-package.c, rc-package.h,
	rc-packman-private.h, rc-packman.c, rc-packman.h, rc-rpmman.c,
	rc-rpmman.h, rc-util.c, rc-verification.c, xml-util.h: fixed some
	include files

2001-01-21  Ian Peters  <itp@helixcode.com>

	* libredcarpet.h: this hasn't been maintained in a while, so I
	just fixed it

2001-01-21  Ian Peters  <itp@helixcode.com>

	* rc-dpkg-helper.c: moved from dpkg-helper.c

	* Makefile.am: s/dpkg-helper/rc-dpkg-helper/g

2001-01-21  Ian Peters  <itp@helixcode.com>

	* dpkg-helper.c, libredcarpet.h, rc-channel.c, rc-channel.h,
	rc-debman-general.c, rc-debman-general.h, rc-debman-private.h,
	rc-debman.c, rc-debman.h, rc-debug-misc.c, rc-debug-misc.h,
	rc-debug.c, rc-debug.h, rc-deps.c, rc-deps.h, rc-distman.c,
	rc-distman.h, rc-distro.c, rc-distro.h, rc-line-buf-private.h,
	rc-line-buf.c, rc-line-buf.h, rc-package-dep.c, rc-package-dep.h,
	rc-package-importance.c, rc-package-importance.h,
	rc-package-info.c, rc-package-info.h, rc-package-section.c,
	rc-package-section.h, rc-package-set.c, rc-package-set.h,
	rc-package-spec.c, rc-package-spec.h, rc-package-update.c,
	rc-package-update.h, rc-package.c, rc-package.h,
	rc-packman-private.h, rc-packman.c, rc-packman.h, rc-rpmman.c,
	rc-rpmman.h, rc-util.c, rc-util.h, rc-verification-private.h,
	rc-verification.c, rc-verification.h, xml-util.c, xml-util.h:
	fixed licensing and copyright

2001-01-21  Ian Peters  <itp@helixcode.com>

	* rc-debman.c (do_purge): check if dpkg exists in /usr/bin/dpkg
	before trying to run it
	(do_unpack): ditto
	(do_configure): ditto

2001-01-21  Ian Peters  <itp@helixcode.com>

	* rc-verification.c (gpg_read_line_cb): don't create the
	verification in several places, it was already created and passed
	in initialized
	(rc_verify_gpg): create the RCVerification, initialize it
	correctly, return an RC_VERIFICATION_STATUS_UNDEF instead of NULL
	if we fail for some reason.  Fucking check if gpg is in the PATH
	before we blindly exec it like the dumbass I am.  Closes mothra
	#something or other.  execlp the gpg_command instead of "gpg".  If
	exec fails, _exit instead of returning

	* rc-util.c (rc_is_program_in_path): added rc_file_exists, which I
	shamelessly stole from gnome-libs

	* rc-util.h: added rc_file_exists

2001-01-19  Ian Peters  <itp@helixcode.com>

	* rc-package-info.c (debian_packages_helper): replace strcmp mess
	with call to rc_debman_section_to_package_section

	* rc-package-importance.c, rc-package-importance.h: added.
	contains the RCPackageImportance stuff moved from
	rc-package-update.[ch], and optimized a bit.

	* rc-package-update.c, rc-package-update.h: remove
	RCPackageImportance stuff.

	* Makefile.am: add rc-package-importance.[ch] to
	libredcarpet_a_SOURCES

	* rc-package-update.h: rename SECTION_* to RC_SECTION_*

	* rc-package-update.c: ditto.
	(rc_package_update_to_string): change strings output from
	SECTION_FOO to foo
	(rc_string_to_package_update): ditto

	* rc-debman-general.c (rc_debman_section_to_package_section):
	s/SECTION_/RC_SECTION_/

	* rc-rpmman.c (rc_rpmman_check_match): s/SECTION_/RC_SECTION_/

2001-01-19  Ian Peters  <itp@helixcode.com>

	* rc-package-update.c (rc_xml_node_to_package_update):
	s/"installed_size"/"installedsize"/ so we stop getting installed
	size's of 0

2001-01-18  Ian Peters  <itp@helixcode.com>

	* red-carpet.gpg: added.  contains our public key, so far

	* Makefile.am: install red-carpet.gpg in $(datadir)/redcarpet, and
	put it in EXTRA_DIST

2001-01-18  Ian Peters  <itp@helixcode.com>

	* rc-deps.c, rc-deps.h (rc_dep_resolution_new): remove the packman
	paramater
	(rc_dep_set_packman): added

2001-01-18  Ian Peters  <itp@helixcode.com>

	* rc-package-section.c, rc-package-section.h: added.  Some stuff
	moved out of rc-package.[ch]

	* Makefile.am: add rc-package-section.[ch] to
	libredcarpet_a_SOURCES

	* rc-packman-private.h, rc-packman.c
	(rc_packman_generic_version_compare): Added.  Compares to
	RCPackageSpec's given a strcmp-like comparison function

	* rc-rpmman.c (vercmp): added.  The hacked up vercmp function
	originally stolen from rpm, freshly moved from rc-package-spec.c,
	with a few more changes
	(rc_rpmman_version_compare): added.  Call
	rc_packman_generic_version_compare with vercmp

	* rc-debman.c (verrevcmp): added.  Stolen from dpkg, much like
	vercmp from rpm
	(rc_debman_version_compare): added.  Call
	rc_packman_generic_version_compare with verrevcmp
	(rc_debman_class_init): insert rc_debman_version_compare into
	packman_class

	* rc-debman-general.c (rc_debman_parse_version): alloca the input
	before we modify it to protect against const strings, changes as
	appropriate.  Find the /last/, not the first '-' when we split
	version and release apart, bug discoverd in gdm
	2.0-0.beta4-helix1.12.

	* rc-channel.c, rc-channel.h (rc_find_best_package): moved to
	gui-channel.c

	* rc-package-spec.c, rc-package-spec.h (rc_package_spec_compare):
	removed.  This isn't possible to get right without knowing which
	backend we're using, which is why it's in the RCPackman now.
	(rc_package_spec_copy): get the order right -- dest, src

	* rc-package-info.c (debian_packages_helper): fix call to
	rc_package_spec_copy

	* rc-package-update.c (rc_package_update_copy): fix call to
	rc_package_spec_copy

	* rc-package.h, rc-package.c: fix some naming conventions, rename
	rc_package_slist_sort to rc_package_slist_sort_by_name for
	clarity.  Break out the RCPackageSection stuff, as above
	(rc_package_compare_func): removed, unused and broken

	* rc-deps.h, rc-deps.c (rc_dep_resolution_new): add an RCPackman
	to the interface, which sets das_global_packman variable -- gross
	hack to deal with the broken design.  Change all calls to
	rc_package_spec_compare to rc_packman_compare_version

	* rc-package-dep.c: extern das_global_packman, change all calls to
	rc_package_spec_compare to rc_packman_compare_version

2001-01-16  Ian Peters  <itp@helixcode.com>

	* rc-debman.c: Fix a couple cases where I forgot to update a
	format string when I got rid of one of the inputs, this explains
	the real garbage Joe was seeing

2001-01-16  Ian Peters  <itp@helixcode.com>

	* rc-debman.c (debman_poll_write_cb): only need to handle \t, not
	\r here anymore

	* rc-line-buf.c (rc_line_buf_cb): handle the \r\n case -- when we
	hit a \n, backtrack a step and see if we should chop off the \r
	too

2001-01-16  Ian Peters  <itp@helixcode.com>

	* rc-util.c, rc-util.h: Added rc_close

	* rc-line-buf.c, rc-line-buf.h, rc-line-buf-private.h: Added
	license information.  Made the fd get/settable via GtkArg.
	rc_line_buf_new now takes no paramaters, use rc_line_buf_set_fd

	* rc-verification.c, rc-verification.h: update to the new
	RCLineBuf API, generic cleanups, license information, #include
	file fixes, and debugging code added

	* rc-rpmman.c: #include file fixes, twiddle with some calls to
	rc_packman_set_error

	* rc-packman.h: tweak the RCPackmanError values

	* rc-packman-private.h: Add rc_packman_clear_error, and make
	rc_packman_set_error use varargs, and prepend the passed string,
	colon separated, to the current error reason, and calculate the
	new RCPackmanError value

	* rc-packman.c: add some calls to rc_packman_clear_error, change
	some calls to rc_packman_set_error to reflect the new
	RCPackmanError values, add rc_packman_clear_error, and rewrite
	rc_packman_set_error

	* rc-debman-general.h: fix some #include lines, add
	rc_debman_section_to_package_section

	* rc-debman-general.c: add rc_debman_section_to_package_section

	* rc-debman-private.h: move status_file and rc_status_file into
	the RCDebmanPrivate struct

	* rc-debman.c: where oh where to start.  Handle all the possible
	Debian interactive cases, including interactive unpack,
	interactive configure, interactive purge.  Handle the broken
	conf-file crap to STDERR.  Make the little dialog use a fixed
	width font.  Catch all sorts of error conditions, and call
	rc_packman_set_error appropriately, including the severity and a
	valid description of what occured.  Change lots of calls to use
	rc_debug.  Clean up a lot of code.  Push the PAGER environment
	variable as cat to avoid some nasty surprises.  Lots of other
	stuff that I'm forgetting, but it's all good.  ;-)
	
2001-01-06  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-deps.c, rc-deps.h: Fix some more conflict handling
	love.  Debian hates me.

2001-01-05  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-channel.c, rc-debman-general.c,
	rc-debug-misc.c, rc-deps.c,
	rc-package-dep.c, rc-package-info.c,
	rc-package-spec.c: use rc_debug instead of
	g_warning/g_print/fprintf/etc

2001-01-04  Ian Peters  <itp@helixcode.com>

	* rc-channel.h: remove the dep_table pointer in the
	RCChannel struct

	* rc-channel.c: assorted cleanups, reflect the above
	change

	* rc-package-info.c (rc_subchannel_parse_debian):
	create the dep_table in the subchannel, not the channel

2001-01-04  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-distman.c: Bail if we can't figure out
	what kind of distro this is (don't crash)

	* rc-distro.c: Call debian testing/unstable
	unstable.

	* rc-deps.c: Look for the dep_table in the
	correct subchannel, not the channel's main dep_table. Also
	some more conflict loving.

	* rc-deps.h: Conflict loving changes.

2001-01-03  Ian Peters  <itp@helixcode.com>

	* rc-debman-general.c: add some includes, fix some
	other includes, contribute a faster version of
	rc_debman_parse_version, and add some debugging code

	* Makefile.am: add BUILD_CFLAGS to INCLUDES

2001-01-03  Ian Peters  <itp@helixcode.com>

	* rc-common.h: removed

	* rc-debug.c, rc-debug.h: added.
	contains RC_ENTRY, RC_EXIT, and some simple structure for
	debugging levels, etc.  Not really used anywhere yet.

	* Makefile.am: add rc-debug.[ch], remove rc-common.h

	* libredcarpet.h: fix include paths, kill reference
	to rc-common.h, add rc-debug.h

	* rc-debman.c: s/rc-common/rc-debug/

	* rc-channel.c: s/rc-common/rc-debug/ and fix the
	include paths

	* rc-package-info.c: ditto

2000-12-28  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-deps.c: Oops. don't crash if what is null
	in a conflict when printing it.

2000-12-27  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-deps.c, rc-deps.h: Some intelligent
	things about conflicts. They are mostly recognized now. The info
	that comes out isn't perfect, but it's a start. gaim vs. gaim-gnome
	works now ;-)

2000-12-22  Vladimir Vukicevic  <vladimir@helixcode.com>

	* Makefile.am: typo

	* rc-package-info.c, rc-debman.c:
	include debman-general

2000-12-22  Vladimir Vukicevic  <vladimir@helixcode.com>

	* Makefile.am: fixing for new config.in

	* rc-debman-general.c: New file containing	useful things,
	even if rc-debman isn't compiled in

	* rc-distman.c: fixes for selecting the right packmans
	to include

	* rc-debman.c: removed stuff into rc-debman-general.c

	* rc-distro.c: some new distros

2000-12-22  Ian Peters  <itp@helixcode.com>

	* rc-package-update.h, rc-package-update.c:
	General sanity checking, throw some const's in, g_return(_val)_if_fail
	in a few places, yada yada yada

2000-12-19  Ian Peters  <itp@helixcode.com>

	* rc-channel.c, rc-channel.h: added
	rc_channel_get_subchannel to return a pointer to the subchannel by
	id

2000-12-18  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-deps.c: Small fix to fix things
	that need fixing. (Vague? Yes.)

2000-12-18  Vladimir Vukicevic  <vladimir@helixcode.com>

	* Makefile.am: add rc-debman-private.h,
	rc-verification-private.h, rc-line-buf-private.h to
	sources line for dist

2000-12-18  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-deps.c: Small fix to avoid
	bizzare unnecessary conflicts.

2000-12-15  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-debman.c: Change deps.h to rc-deps.h

2000-12-15  Vladimir Vukicevic  <vladimir@helixcode.com>

	* Makefile.am: Added rc-debug-misc and rc-deps

	* rc-deps.c: New dependency bits. Somewhat
	less broken than the old code, right now somewhat more
	in some ways. Conflicts, in particular, need help (and the
	whole virtual conflict thing on redhat).

	* deps.c: removed.

	* libredcarpet.h: Changed deps -> rc-deps

	* rc-channel.c: fixes to find_best_package
	to use new pkginfo API

	* rc-package-dep.c: Added lots of code
	to verify AND relationships in deps
	(rc_package_dep_verify_and_relation,
	rc_package_dep_verify_and_slist_relation), also fixed
	rc_package_dep_item_verify_relation. Also code to merge
	dependencies (for deps code).

	* rc-package-info.c: code to handle
	AND dependencies for finding new packages.

2000-12-07  Joe Shaw  <joe@helixcode.com>

	* rc-channel.c (rc_subchannel_free): Don't destroy the 
	dep_table if it is NULL.

2000-11-29  Joe Shaw  <joe@helixcode.com>

	* rc-channel.c (rc_xml_node_to_channel): Back out the
	#if 0.

2000-11-29  Joe Shaw  <joe@helixcode.com>

	* rc-channel.c (rc_xml_node_to_channel): #if 0ed out some
	code that was keeping channel lists from parsing. Ian, please fix this
	up if it's not right.

2000-11-21  Joe Shaw  <joe@helixcode.com>

	* rc-channel.c (rc_channel_free): Removed reference to
	RCChannel->title_file.
	(rc_channel_parse_xml): Ditto.

	* rc-channel.h (RCChannel): Removed title_file, added
	featured, although it isn't handled at all yet.

2000-11-09  Joe Shaw  <joe@helixcode.com>

	* rc-verification.h: Change the order of the
	RCVerificationStatus enum to be ordered by "severity".

2000-11-09  Ian Peters  <itp@helixcode.com>

	* rc-debman.h, rc-debman.c,
	rc-debman-private.h: move all fields into RCDebmanPrivate,
	make rc_debman_transact take an RCPackageSList*, and lots of other
	cleanups.  Add rc_debman_find_file.

	* rc-line-buf.h, rc-line-buf.c,
	rc-line-buf-private.h: move all fields into
	RCLineBufPrivate, lots of other cleanups

	* rc-packman.h, rc-packman.c,
	rc-packman-private.h: move all fields into
	RCPackmanPrivate, lots of other cleanups.  _transact takes an
	RCPackageSList.  Add rc_packman_find_file.
	Add rc_packman_get_features.

	* rc-rpmman.c: _transact takes ...

	* rc-verification.c: fixicate to a little RCLineBuf
	change

2000-11-09  Ian Peters  <itp@helixcode.com>

	* rc-package.c (rc_package_get_latest_update): change the
	g_return_if_fail to g_return_val_if_fail.

2000-11-08  Joe Shaw  <joe@helixcode.com>

	* rc-package.c (rc_package_get_latest_update): Added a
	convenience function for getting the latest update from a package.

2000-11-02  Ian Peters  <itp@helixcode.com>

	* rc-package-spec.h, rc-package-spec.c:
	removed all of the RCPackageSection stuff, put it into rc-package.[ch].
	(struct _RCPackageSpec): remove the section, installed, installed_size,
	channel, and subchannel fields.  These belong in struct _RCPackage.
	(rc_package_spec_init): this now takes a few less arguments

	* rc-package-update.h, rc-package-update.c:
	move the typedef's above the included libredcarpet files
	(struct _RCPackageUpdate): add a const RCPackage * back to the package
	that we are an update to, and an installed_size field

	* rc-package.h, rc-package.c:
	move the typedef's above the included libredcarpet files
	Move all of the RCPackageSection stuff into here
	(struct _RCPackage): add the section field, the installed_size and
	installed fields, a const pointer back to our parent subchannel,
	and handle all of these new fields in _copy and _free.

	* rc-packman.c:
	(rc_package_slist_add_package): fix the call to rc_package_spec_init

	* rc-rpmman.c, rc-debman.c:
	update all references to ->spec.installed, ->spec.installed_size,
	and ->spec.section to ->installed, ->installed_size, and ->section

	* rc-package-dep.c, rc-package-dep.h:
	move the typedef's above the included libredcarpet files
	Add a few const's in places

	* rc-channel.h: move all of the typedef's above the
	included libredcarpet files

	* rc-channel.c:
	(rc_xml_node_to_subchannel): pass the RCChannel* instead of the
	url_prefix and channel_id separately.  Set the subchannel->channel to
	the channel passed in.  Pass the channel into rc_xml_node_to_subchannel

	* rc-package-info.c:
	(rc_subchannel_parse_debian): fix some references to the channel
	and subchannel fields in the RCPackageSpec, now gone, and point to
	the installed and installed_size fields in the package, not the spec

	* rc-package-set.h:
	Move the typedef's above the included libredcarpet files

	* xml-util.c, xml-util.h:
	Add a lot of const's where appropriate

2000-11-02  Ian Peters  <itp@helixcode.com>

	* rc-package-update.h, rc-package-update.c:
	(rc_xml_node_to_package_update): pass the url_prefix and name of the
	package into this function, to avoid some annoying post processing

	* rc-package.h, rc-package.c:
	(rc_xml_node_to_package): pass the url_prefix, channel_id, and
	subchannel_id into the function, to avoid some annoying post
	processing; pass the url_prefix, along with my own name, into
	rc_xml_node_to_package_update

	* rc-channel.c:
	(rc_xml_node_to_subchannel): take the url_prefix and channel_id,
	passing them along to rc_xml_node_to_package [along with my own
	subchannel preference], don't try to fix the url's in post
	processing
	(rc_xml_node_to_channel): pass the extra information needed into
	rc_xml_node_to_subchannel

2000-11-02  Ian Peters  <itp@helixcode.com>

	* pkginfo.c, pkginfo.h: removed these in
	favor of rc-package-info.c and rc-package-info.h.

	* rc-package-info.c, rc-package-info.h:
	Rewrote rc_subchannel_parse_helix in favour of making each structure
	responsible for remembering how to parse itself
	[rc_xml_node_to_package, for example].  If any structure changes, you
	need to modify only functions in rc-<structure>.c to make sure
	everything continues to parse.  Assorted other cleanups to other
	functions inherited directly from pkginfo.c.  I pretty much left the
	Debian stuff alone.

	* Makefile.am: remove pkginfo, add rc-package-info

	* deps.c: fix the include lines [<foo.h> in
	favour of "foo.h", as the automake book suggests], and
	s/pkginfo\.h/rc-package-info.h/

	* libredcarpet.h: fix the include lines as per the
	automake book, s/pkginfo\.h/rc-package-info.h/

	* rc-channel.h: include <gnome-xml/tree.h> for the xml
	stuff, fixicate the include lines
	(struct _RCSubchannel): move the dep_table from the RCChannel into
	here, as it would otherwise be /really/ broken
	(rc_xml_node_to_channel): convert an xmlNode* to an RCChannel*

	* rc-channel.c: fixicate the include lines, include some
	xml loving
	(remove_helper): static function, added.  Free the packages in the
	package hash table
	(rc_subchannel_free): after talking with vlad, there's no longer any
	reason not to deep free the package hash table, using remove_helper.
	Shallow free on the dep_table [which just has pointers into the
	package hash]
	(rc_channel_free): free a few elements that people added and forgot to
	free, free the package set list, free the subchannels.  Whoops.
	(my_little_helper): a static helper function to add children to an
	xmlNode	from a hash table
	(rc_xml_node_to_subchannel): static, given an xmlNode*, recreate the
	RCSubchannel.  Using the url_prefix given by the RCChannel, fix the
	package_url and signature_url fields of the RCPackageUpdates deep in
	the nested mess.  Also create the package and dep_table hashes.
	(rc_xml_node_to_channel): given an xmlNode* and the RCChannel*, fill in
	the missing parts of the structure [mostly using
	rc_xml_node_to_subchannel]

	* rc-debman.c, rc-debman.h: fixicate some
	includes
	(rc_debman_query_file): make any file we query provide itself, which
	means we don't have to remember to keep adding this in so many places.
	(rc_debman_verify): update to work with the structure changes.
	Look for the package and signature local filenames in the RCPackage
	struct, filled in after they are downloaded.  Correctly reference
	the RCPackageUpdate where appropriate.

	* rc-rpmman.c, rc-rpmman.h: fixicate some
	includes
	(rc_rpmman_verify): aim for the right elements of the RCPackage struct

	* rc-package-dep.c, rc-package-dep.h:
	fixicate some includes
	(rc_string_to_package_relation): added.
	(rc_package_relation_to_string): added.
	(rc_xml_node_to_package_dep_item): static, added.  Used by
	rc_xml_node_to_package_dep.
	(rc_xml_node_to_package_dep): added.

	* rc-package-set.c, rc-package-set.h:
	fixicate some includes
	(rc_package_set_new): added
	(rc_package_set_free): added
	(rc_package_set_slist_free): added
	It's only slightly worrisome that these functions didn't exist before.

	* rc-package-spec.h, rc-package-spec.c:
	fixicate some includes
	(struct SecTable): removed
	(extern sectable[]): removed
	use the rc_package_section_to_string and rc_string_to_package_section
	functions now
	(rc_package_section_to_string): added
	(rc_string_to_package_section): added
	They do the obvious things

	* rc-package-update.h, rc-package-update.c:
	fixicate an include
	(enum _RCPackageImportance): add RC_IMPORTANCE_NEW
	(struct _RCPackageUpdate): fiddle with some fields, renaming and moving
	them around
	(rc_string_to_package_importance): added
	(rc_package_importance_to_string): added
	(rc_xml_node_to_package_update): added
	There's a pattern here, pay close attention

	* rc-package.h, rc-package.c: fixicate some includes,
	fiddle with some field names
	(rc_xml_node_to_package): added

	* rc-verification.c: fixicate some includes
	(rc_verify_gpg): add the --no-auto-key-retrieve option to the gpg call

	* xml-util.h, xml-util.c:
	(xml_get_prop): added
	(xml_get_content): added
	(xml_get_guint32_content_default): added

2000-10-30  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-package-dep.c, libreadcarpet/rc-package-dep.h:
	Changed the #define's to enums, to make for cleaner code and also
	so that gdb can give us names insted of numbers. Added
	rc_packge_dep_verify_and_relation, which verifies a
	RCPackageDep as if it were AND'd instead of OR'd. Also added
	rc_package_dep_item_is_subset, which will attempt to merge
	two RCPackageDepItems.

2000-10-29  Ian Peters  <itp@helixcode.com>

	* rc-channel.c:
	(rc_channel_parse_xml): I'm sorry, I just had to reindent this
	function.  It was really bad.

	* rc-debman.c: include pty.h, shut up gcc.
	(rc_debman_verify): wrote it.  It checks a detached signature, if
	one exists in the signature field in the RCPackage.  It checks the
	md5sum, if there's one in the RCPackage.

	* rc-package-update.h: tweaked some of the members of
	the RCPackageUpdate struct, and added signature_url and
	signature_size.  These are for detached signatures, if they exist.

	* rc-package.h: added two new members to the
	RCPackage struct, filename and signature.  These are NULL until
	after the package (and maybe signature) are downloaded, then they
	store the name of the downloaded files.
	(rc_package_copy_spec): kill this

	* rc-package.c:
	(rc_package_copy): let's just use rc_package_spec_copy instead of
	the stupid rc_package_copy_spec function.  Check if old_pkg is
	NULL before we do stuff.  Also copy filename and signature.
	(rc_package_copy_spec): kill this
	(rc_package_free): check if rcp is NULL before we start freeing
	things.  Also, free the filename and signature.
	(rc_package_slist_sort): skip the intermediary step of putting the
	result in a variable on the stack; let's just return the sort.

	* rc-packman.h, rc-packman.c,
	rc-rpmman.c: rc_packman[_real]_verify takes an
	RCPackage, not a filename now.

	* rc-verification.h, rc-verification.c:
	add rc_verify_md5_string, you know what it does

	* pkginfo.c:
	(grab_packageupdateinfo_list): grab the signature and
	signature_size from the xml, and btw who the hell named this
	function? ;)

2000-10-27  Vladimir Vukicevic  <vladimir@helixcode.com>

	* deps.c: Oops.. add check for null p before verifying
	the relation.

2000-10-26  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-package-dep.c: New words for EQUAL
	instead of just (??)

	* deps.c: Some code to handle extra bizzare
	conflict issues

2000-10-26  Ian Peters  <itp@helixcode.com>

	* rc-packman.c: add some gtk_main_iteration calls to key
	spots to keep things happy

	* rc-debman.c: print the command every time we exec dpkg, and
	print out every line it sends us back, prefixed by "DEBMAN: ".

2000-10-26  Vladimir Vukicevic  <vladimir@helixcode.com>

	* Makefile.am: add clean-local target

2000-10-26  Ian Peters  <itp@helixcode.com>

	* rc-debman.c: remove a definite race condition in the
	new magic hack

2000-10-26  Vladimir Vukicevic  <vladimir@helixcode.com>

	* dpkg-helper.c, Makefile.am: Added
	the building of dpkg-helper.so, also makefile.am to build it
	and copy it in the right place.

2000-10-26  Ian Peters  <itp@helixcode.com>

	* rc-line-buf.h, rc-line-buf.c:
	Add rc_line_buf_get_buf which gets the current internal buffer even if
	there's been no '\n' yet.  Needed for The Debian Hack.

	* rc-debman.c: OH MY GOD IT WORKS!
	I'm not going to try to give you a good changelog entry on this,
	because I had to do so many crufty things it's not even funny.  But it
	works.  This won't work until Vlad commits dpkg-helper.c and the
	associated Makefile.am loving.

2000-10-26  Vladimir Vukicevic  <vladimir@helixcode.com>

	* deps.c: I need to get my boring commit in.
	We now have a RC_DEPS_DEBUG_LEVEL env var that sets
	the amount of spewage. We should always compile with
	#define DEBUG now, at least for betas.

2000-10-25  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-distro.c, rc-distro.h: Change
	same_as into a pretend_name -- it's only to be used if we do not
	support the other distro uniquely, as it will break things if
	there is a channel for both the pretend name and the real name. In
	fact, this should probably not be used at all.

	* gui-init.c: Change some of the startup channel
	parsing bits to reflect rc-distro changes.

2000-10-25  Ian Peters  <itp@helixcode.com>

	* rc-debman.c (query_all_read_line_cb): kill some stale
	debugging code, add a helpful comment

2000-10-25  Ian Peters  <itp@helixcode.com>

	* rc-rpmman.c (rc_rpmman_depends_fill): ignore the top
	seekret messages that rpmlib encodes in the dependency header
	information.  rpmlib is a crufy broken pile of dung.

2000-10-25  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-package.c: copy the stupid damn idiotic
	damn piece of crap stupid hold bit in the _copy func

2000-10-25  Jacob "Ulysses" Berkman  <jacob@helixcode.com>

	* libredcarpet.h: don't inlclude rc-rpmman.h or
	rpm-debman.h

	* rc-rpmman.h, rpmlead-4-0-x.h,
	signature-4-0-x.h, Makefile.am: rpm4
	fixes

2000-10-25  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-package-dep.h: Oops, update the header proto

2000-10-25  Ian Peters  <itp@helixcode.com>

	* rc-debman.c: change every call to write to instead use
	rc_write, which is the pedantic checking version.  Add lots of error
	handling where rc_write may have returned FALSE.

2000-10-25  Vladimir Vukicevic  <vladimir@helixcode.com>

	* deps.c, deps.h: Beginning of cleanup,
	some comments added/removed...

	* rc-distro.c: Some lins to shut up warnings

	* rc-debman.c: Added code to ignore locks if
	any of the magic env vars are set

	* rc-package-dep.c, rc-package-dep.h:
	Some code to pretty-print a package dependency relation.

2000-10-25  Ian Peters  <itp@helixcode.com>

	* rc-string.c, rc-string.h: removed, as
	nothing uses this anymore.

	* Makefile.am, pkginfo.c,
	rc-debman.c, rc-util.c: remove references
	to rc-string.h and rc-string.c

2000-10-25  Ian Peters  <itp@helixcode.com>

	* rc-util.c (rc_write): kill a warning, add a const to buf

	* pkginfo.c (debian_packages_helper): kill some unused
	variables

	* rc-rpmman.c (rc_rpmman_verify): initialize some
	variables to shut gcc up

2000-10-25  Ian Peters  <itp@helixcode.com>

	* Makefile.am: set the G_LOG_DOMAIN to libredcarpet, and
	set the SHAREDIR (this is something of a hack, but...).  Add the new
	files rc-verification.c and rc-verification.h to the libredcarpet
	sources.

	* rc-line-buf.h: add the RCLineBufStatus enum, so that
	read_done can just return a status, instead of having a separate
	read_error signal.  Get rid of the hup_id, since we'll handle all of
	the g_io signals in a single callback.  Get rid of the read_error
	signal, and fix the prototype on the read_done signal.  Rename read_id
	to cb_id.

	* rc-line-buf.c: remove READ_ERROR from SIGNALS, purge all
	mention of hup_id (rc_line_buf_destroy, rc_line_buf_class_init,
	rc_line_buf_init).  Fix the marshaller on read_done.  Rename the
	rc_line_buf_read_cb to rc_line_buf_cb.  Handle the condition ==
	G_IO_HUP case.  Emit read_done on a read of 0 without EAGAIN.  Fix the
	off-by-one array access that vlad caught in purify.  Remove
	rc_line_buf_hup_cb.  Fix rc_line_buf_new.  Rename read_id to cb_id.

	* rc-md5.h: change the rc_md5 function to return guint8 *
	instead of as a string, so that we can memcmp this directly with the
	md5 in an rpm header.  Add the rc_md5_string function to provide the
	old functionality.

	* rc-md5.c: (rc_md5): change this guy to return the md5
	in a guint8 *.  Mostly involves removing, not adding, code.
	(rc_md5_string): added.  Returns the md5 as a string of hex characters
	instead.

	* rc-verification.h: RCVerification struct, a lot of
	enums, and some functions.

	* rc-verification.c: implementation of the foundation for
	RCVerification, along with three verification methods, rc_verify_gpg,
	rc_verify_md5, and rc_verify_size.  Look in the header for the
	appropriate details.

	* rc-packman.h: include rc-verification.h.  Clean up the
	RCPackmanError enum.
	(rc_packman_real_verify): change the type, now returns an
	RCVerificationSList * given an RCPackman * and a filename.
	(rc_packman_verify): ditto

	* rc-packman.c (rc_packman_verify): clean up to the new
	api

	* rc-util.h: added rc_write, a safe way to write a buffer
	to a file descriptor (handles all of those EINTR and EAGAIN issues).
	Returns TRUE if the write was a success, and FALSE if it was a failure.

	* rc-util.c (rc_write): added, see above.

	* rpmlead-3-0-x.h, signature-3-0-x.h: Borrow
	some header files from rpm-3.0.6 for the signature extraction stuff.
	Stupid stupid rpm.  This may or may not work for rpm-4.x, I'll test
	that in a bit.

	* rc-rpmman.c: include rc-verification.h, rc-util.h, and
	the new rpm borrowed header files.
	(rc_rpmman_verify): implemented.  Uses some internal rpm functions, a
	lot of elbow grease, and some love to verify the supported signatures
	in an rpm (gpg, md5, and size).
	(rc_rpmman_destroy): added.  Free the rpmroot member.
	(rc_rpmman_class_init): chain the destroy.

	* rc-debman.c:
	(rc_debman_verify): added.  Do nothing stub function until we work out
	how the detached gpg signatures work.
	(mark_purge_read_done_cb): new marshaller for read_done in RCLineBuf
	(do_purge_read_done_cb): new marshaller for read_done in RCLineBuf
	(do_unpack_read_done_cb): new marshaller for read_done in RCLineBuf
	(do_configure_read_done_cb): new marshaller for read_done in RCLineBuf
	(query_all_read_done_cb): new marshaller for read_done in RCLineBuf
	(verify_status): added (along with some callbacks).  Makes sure that
	the /var/lib/dpkg/status file is at least somewhat sane.  Resets any
	pending selections (other than hold), because RC won't honor them.  Of
	course, this only runs if you're root, because it needs to rewrite the
	status file.

2000-10-23  Vladimir Vukicevic  <vladimir@helixcode.com>

	* deps.c: Added code to handle held packages. (First
	try, need to find way to test.)

	* deps.h: Added HELD_PACKAGE conflict type

	* rc-package.h: Added hold gboolean

2000-10-20  Joe Shaw  <joe@helixcode.com>

	* rc-rpmman.c (rc_rpmman_query_all): Set the
	RCPackageSpec's installed bit to TRUE. Closes Mothra #70.

2000-10-20  Vladimir Vukicevic  <vladimir@helixcode.com>

	* deps.c, deps.h: Added preliminary
	type field to conflicts to aid in resolution.

	* pkginfo.c: small change in how we provide ourselves

	* rc-channel.c, rc-channel.h: Moved
	find_best_package here, exported.

	* rc-distro.c: Fixed warnings

	* rc-package.c, rc-package.h: Added 
	utility functions for converting hashesh (by spec, by name)
	to lists

	* rc-util.c, rc-util.h: Added
	rc_hash_table_copy

2000-10-19  Ian Peters  <itp@helixcode.com>

	* rc-debman.c (do_configure): fix my last broken commit
	(forgot to #if 0 out one part)

2000-10-19  Ian Peters  <itp@helixcode.com>

	* rc-debman.c (rc_debman_init): if we can't grab the lock,
	set the error and reason as appropriate.  Some other in-development
	code that I #if 0'd out.

	* rc-packman.h: fix the name of
	rc_packman_configure_progress (was config_progress) to kill a warning

	* rc-packman.c: kill some gtk_events_pending bs

	* rc-rpmman.c: #if 0 out some unfinished/unneeded stuff
	to kill a few warnings.

2000-10-18  Vladimir Vukicevic  <vladimir@helixcode.com>

	* pkginfo.c: Fixed stupid bug where a \0 wasn't being
	put at the end of each segment of a debian description, causing
	the weird descriptions in the info displays.

	* deps.c: Copy the system packages list when passed in.
	Leaks memory.

	* rc-debman.c: Always use status_file instead of the
	hardcoded path

	* rc-package-dep.c, rc-package-spec.c:
	Absolutely nothing important; no changes.

2000-10-18  Ian Peters  <itp@helixcode.com>

	* rc-line-buf.c (rc_line_buf_read_cb): change the FALSE to
	TRUE when I call g_string_free, as it really is my job here

2000-10-18  Ian Peters  <itp@helixcode.com>

	* rc-debman.c: signal (SIGCHLD, SIG_DFL) before forking
	everywhere because I am now paranoid.  I have no idea what is setting
	SIGCHLD to SIG_IGN for me, but I wasted a lot of time on this one.
	Life sucks.  Did I mention I spilled apple juice all over myself by
	hitting the top of a bottle and blowing out the bottom?

2000-10-18  Ian Peters  <itp@helixcode.com>

	* rc-debman.c (rc_debman_query_all_real): again make every
	package provide itself, so that vlad's lazy ass dependency code doesn't
	have to do any work.  La la la.

2000-10-18  Joe Shaw  <joe@helixcode.com>

	* rc-util.c (rc_mktmpdir): Removed. rc-debman doesn't
	use it anymore. Closes Mothra #30.

2000-10-17  Ian Peters  <itp@helixcode.com>

	* rc-line-buf.c, rc-line-buf.h: added.
	This bad boy is a GtkObject that provides buffered read-a-line from a
	fd (aka a file or a pipe) using g_io_add_watch stuff.  I totally like
	my little object, it's pretty dope.

	* Makefile.am: added rc-line-buf.[ch] to the sources for
	libredcarpet

	* rc-debman.c: so some fixicating and an attempt to add
	the "watch for stupid needy-of-manual-configuring packages" feature
	turned into a total rewrite (almost) of this guy to make that doable.
	So now literally everything in rc-debman uses rc-line-buf, so that it
	can operate from within a GMainLoop I run by hand, which lets me use
	g_io_add_watch to watch for a dpkg-run script trying to read... which
	is what I've got to do next.  But it's now doable.
	Also, add the feature that joe requested -- it now emits
	transaction_step and configure_step with a seqno of 0 before it does
	any transactioning or configuring, so that the gui can be smarter

	* rc-rpmman.c: add the same new feature as in debman (the
	0 seqno signals)

	* rc-util.c, rc-util.h: remove all traces of
	the old RCLineBuf (sorry vlad!)

	* packman_test.c: fix an odd crash or two, add command
	completion ;)

2000-10-16  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-channel.c: oops. xmlParseMemory wants the
	number of real characters, not counting the null (hence the
	length of a bytearray - 1)

	* rc-package-set.c: same as above.

	* rc-package-set.c, rc-package-set.h:
	Fixed minor parsing bugs.

	* deps.c: fixed crash that occurs if debugging is
	turned on. (Oops!)

2000-10-13  Vladimir Vukicevic  <vladimir@helixcode.com>

	* Makefile.am: added new files

	* rc-package-set.c, rc-package-set.h: New
	files, beginning on package set support.

	* rc-util.c, lilbredcarpet/rc-util.h: New function to
	un-gzip in memory (Yay, no more nasty popen()'s!)

	* rc-channel.c, pkginfo.c: Use new
	gunzipping code

	* rc-channel.h: Add package set slist in struct

	* rc-package.c, rc-package.h: added GPL
	headers

	* rc-util.c, rc-util.h: New uncompress
	functions that take a gzip'd buffer and uncompress it

2000-10-13  Joe Shaw  <joe@helixcode.com>

	* rc-channel.c, rc-channel.h: Added
	copyright and license info to the top (and emacs rules)
	(rc_channel_parse_xml): Add a new flag, "available_select" that,
	when defined, makes the "Select All" and "Select None" buttons
	appear in the available packages page. Closes Mothra #34.  *

2000-10-13  Vladimir Vukicevic  <vladimir@helixcode.com>

	* Makefile.am: Change distro.[ch] with rc-distro.[ch]

	* rc-distro.c, rc-distro.h: new files;
	rewrite of distro code to support different architectures, provide
	for different languages, etc. Also to keep distro tags in sync
	with build system. (XML now should reference distro_target tag)

	* rc-channel.c, rc-channel.h: Add
	distro_target; got rid of distribution and major/minor.

	* libredcarpet.h: Changed distro.h to rc-distro.h

	* rc-distman.c, rc-distman.h: Use new
	rc-distro code.

2000-10-11  Joe Shaw  <joe@helixcode.com>

	* rc-channel.c (rc_channel_parse_xml): Add a mirrored
	flag to the channel. This is not yet used.

2000-10-06  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-debman.c: package_accept speedup, small
	debug printing fix

	* deps.c: Oops. Set the list back to the result
	of the g_slist_remove, so that if all packages end up getting
	removed, things don't die.

2000-10-05  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-debman.c: Print conversation with dpkg
	to stderr.

2000-10-04  Ian Peters  <itp@helixcode.com>

	* rc-debman.c (hash_destroy): recreate the hash_table
	(rc_debman_query_all): grab a valid reference to the pkg_hash

2000-10-04  Ian Peters  <itp@helixcode.com>

	* rc-rpmman.c: some minor fixes for rpm4 support

2000-10-04  Ian Peters  <itp@helixcode.com>

	* rc-rpmman.c (transaction_add_remove_pkgs): write an rpm4
	specific version.

2000-10-04  Vladimir Vukicevic  <vladimir@helixcode.com>

	* deps.c: Correctly fix up the list of packages
	to be installed (no more g_slist_remove_link magic)

2000-10-04  Vladimir Vukicevic  <vladimir@helixcode.com>

	* deps.c, deps.h: Oops. Use a hash table
	instead of blindly searching through the list of passed-in
	to-install packages, since sometimes something will be a virtual
	package that's provided.

2000-10-04  Ian Peters  <itp@helixcode.com>

	* rc-debman.h: add a hash_table to the RCDebman struct.

	* rc-debman.c: cache the results of a _query_all so that
	successive calls to _query will be much faster.  If you _query without
	a call to _query_all, it will populate the hash table first, and then
	look up the packages requested.  This is because queries in debian
	by reopening and scanning the /var/lib/dpkg/status file are ass slow.
	The only way to invalidate the hash is to _transact, and the next
	_query will have to rescan the status file.  This is a major change
	in rc_debman, requiring a lot of functions to move around and/or
	change drastically.  I've tested it pretty thoroughly, but if anything
	breaks for you, check for sanity using packman_test first before
	suspecting anything else for a while.  All of the _copy functions are
	written because I need them in order to copy packages out of the hash
	table.  Fun fun fun.  But not really.
	(rc_debman_query_helper): fix vlad's memory leak

	* rc-package-dep.h, rc-package-dep.c:
	(rc_package_dep_item_copy): added
	(rc_package_dep_copy): added
	(rc_package_dep_slist_copy): added

	* rc-package-update.h, rc-package-update.c:
	(rc_package_update_copy): added
	(rc_package_update_slist_copy): added

	* rc-package.h, rc-package.c:
	(rc_package_copy): added
	(rc_package_free): fix another vlad memory leak ;)

2000-10-03  Vladimir Vukicevic  <vladimir@helixcode.com>

	* deps.c: Do intelligent things with conflicts (only
	look for a resolving package if you're not trying to install that
	named package). I think we are smarter than apt at this point.

	* rc-package-spec.c: Aiee. fixed the compares wrt
	epoch.

	* deps.c: Oops. Handle the case where a non-first
	item of an OR dep was already installed in the system (don't
	always go for the first!)

2000-10-03  Vladimir Vukicevic  <vladimir@helixcode.com>

	* deps.h: Added packages_requested in output RR,
	giving the real list of packages that were used (with duplicates
	removed)

	* deps.c: Added lots of code to handle some cases that
	really, really, really need testing. If package A is installed and
	it depends on B == 1.0, and you try to install package C which depends
	on any version of A and upgrade	A and B in the same operation, this is
	what used to happen: the A dep was processed from the system (because C
	was seen first) and its hard dep on B was put in. When the new A was
	processed, the hard dep on B would fail (notwithstanding the new B). There
	are two solutions -- one was to remove all traces of the old package; this
	is what untangle_package tries to do. Note that this is probably not a safe
	thing to do, and now it's only called in cases where nothing else can be
	done. The other thing, which is what's done, is to be a bit more intelligent
	about it, by checking to see if something you're depending on is in the
	installed list, and processing that (as long as it resolves other deps).
	This needs testing; right now, the code seems to return a few more packages
	than apt does.

	* rc-package.c (rc_package_compare): Made it just call
	rc_package_spec_compare -- it wasn't checking for null versions/revisions.

2000-10-02  Vladimir Vukicevic  <vladimir@helixcode.com>

	* deps.c (resolution_uninstall_package_makelist): check
	if the package was already removed before spewing a warning!

2000-10-02  Vladimir Vukicevic  <vladimir@helixcode.com>

	* deps.c (pkg_conflicts_list_iterator): Fixed buglet
	that caused weird conflict things to hapen. Bork bork.

2000-10-02  Vladimir Vukicevic  <vladimir@helixcode.com>

	* deps.c (pkg_conflicts_list_iterator): make it work with
	null channels again (oops)

	* Makefile.am (libredcarpet_a_SOURCES): removed
	helix-* cruft, added some missing .h's

2000-10-01  Ian Peters  <itp@helixcode.com>

	* rc-channel.c, rc-channel.h: added
	rc_channel_compare_func for hashing and stuff

	* rc-package.c, rc-package.h: added
	rc_package_compare_func for hashing and stuff

2000-10-01  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-package-update.c, rc-package-update.h:
	filename becomes url, and is now a full URL.

	* pkginfo.c: Parse the url correctly, as stated in the
	above.

2000-10-01  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-channel.c: strdup path into file_path if it isn't set.

	* pkginfo.c: Oops. gtk_main_iteration iff gtk_events_pending,
	not always. Lowercased header field names for debian. Slightly faster
	debian parsing code. (Parse in-place instead of copying to tmpbuf.)

	* deps.c: Added code to have conflicts try to resolve conflicts
	if they are with a package less than some version by trying to find a newer
	version of the conflicting package.

2000-09-30  Vladimir Vukicevic  <vladimir@helixcode.com>

	* deps.c: oops. (hpp always == hpp, no?)

	* pkginfo.c: Made gunzipping faster (rc_string, I love you!)

	* rc-debman.c: Changed the read_line function to
	use a line buffer for reading. Lots of speed improvements. This
	required changes to other code, as there was a second data
	structure, RCLineBuf *, that had to be used.

	* rc-util.c, rc-util.h: Added the
	RCLineBuf stuff

	* rc-string.c, rc-string.h: Added string
	append functions

	* pkginfo.c: Went back to using strncmp's instead of
	casecmps for comparing stuff. This might break if someone uploads
	lowercase stuff to the debian packages file (as has happened)

2000-09-29  Ian Peters  <itp@helixcode.com>

	* pkginfo.c: correctly set the channel id for debian-type
	channels

	* rc-packman.c, rc-packman.h: pkgs to install
	in a transaction are filenames not RCPackage's

2000-09-29  Vladimir Vukicevic  <vladimir@helixcode.com>

	* pkginfo.c: Do something intelligent if gunzip
	doesn't exist.

	* deps.c: note to self

2000-09-29  Vladimir Vukicevic  <vladimir@helixcode.com>

	* deps-private.h, deps.c, 
	deps.h: Preliminary code to get nicely-displayable dep 
	info (packages X, Y, Z will be brought in to satisfy package A that 
	was requested, packages D and E for pkg B, etc).
	Will require more hacking to get this info out.

	* rc-package-dep.c: Made verify return FALSE if the dep 
	was < or <= and the target had no version info. This was to get 
	around an issue where a package conflicted with < V of another 
	package bar, and bar was a virtual package provided by bar1.2. This 
	should be investigated further.

	* test_deps.c: Added a few features; this will be used 
	now to verify helix packages against RC before pushing to server.

2000-09-28  Vladimir Vukicevic  <vladimir@helixcode.com>

	* deps.c: Got rid of superfluous debug crap

	* pkginfo.c, rc-channel.c,
	xml-util.c: Made it happy with new libxml

	* Makefile.am: added (commented out rc-crypto.c, rc-crypto.h)

	* rc-crypto.c, libreadcarpet/rc-crypto.h: Initial
	checkin. Don't use.

2000-09-28  Joe Shaw  <joe@helixcode.com>

	* rc-channel.h: Removed title_color and title_bg_image
	from the channel struct.

	* rc-channel.c: Remove references to title_color and
	title_bg_image.

	* rc-package-spec.c (vercmp): Added a clause that says
	that a number vs. word comparison always goes in favor of the word.
	For example, in helix1 vs. 1, helix1 wins. This fixes a bunch of
	incorrect compares with the Debian packages.

2000-09-28  Ian Peters  <itp@helixcode.com>

	* rc-rpmman.h, rc-rpmman.c: merge in the rpm4
	changes courtesy of msw

2000-09-27  Joe Shaw  <joe@helixcode.com>

	* pkginfo.c (debian_packages_helper): Correctly handle
	package sizes such that they are put into the update structure

2000-09-18  Ian Peters  <itp@helixcode.com>

	* pkginfo.c, rc-debman.c,
	rc-debman.h: merge vlad's fork of the /var/lib/dpkg/status
	parsing stuff back in, so I get his fixes and he gets a non-broken
	read_line.

2000-09-11  Vladimir Vukicevic  <vladimir@helixcode.com>

	* rc-util.c, rc-util.h: Two functions,
	rc_url_is_absolute() and rc_build_url(). The latter takes a method,
	host, path, and "rest" of the URL, and will build the right thing
	depending on if path or rest are absolute or relative, etc.

2000-09-08  Vladimir Vukicevic  <vladimir@helixcode.com>

	* deps.c, deps.h: Fixed ian's
	conflicts bugs -- conflicts and uninstalls should work now; it needs
	testing.

	* pkginfo.c: debian packages weren't getting the
	provides into the hash correctly (oops!)

2000-08-31  Ian Peters  <itp@helixcode.com>

	* Makefile.am: add rc-string to the sources for
	libredcarpet.a

	* rc-packman.c, rc-packman.h,
	rc-debman.c, rc-debman.h,
	rc-rpmman.c, rc-rpmman.h: changed the
	interface drastically (hopefully for that last time).  Got rid of
	_install and _remove (and associated signals, etc), and replaced it
	with a transactional interface (with degenerate install and remove
	cases, obviously).  This is required to make the debian backend work,
	and makes the rpm one cleaner (also, I learned how to make my own
	rpmTransaction things, so I got rid of the poached rpmInstall and
	rpmErase functions).  The debian code is beautiful, I'm in love with
	it in a big way.  The rpm code is pretty nice, although currently I'm
	not dealing with errors in any big way (I'm waiting for a chance to
	talk with joe (and vlad) about how to handle errors (fatal and
	non-fatal) in the cleanest way possible.

	* rc-package-spec.c, rc-package-spec.h:
	added my rc_package_spec_copy and killed vlad's (since mine's nicer :)

	* rc-package.c, rc-package.h:
	added rc_package_copy_spec

	* rc-string.c, rc-string.h: a small
	convenience for me to use, I wrote it to implement the safe function
	to read a line of text from /var/lib/dpkg/status in rc-debman.c

2000-08-30  Vladimir Vukicevic  <vladimir@helixcode.com>

	* pkginfo.c, pkginfo.h:
	rc_subchannel_parse_xml got renamed to rc_subchannel_parse; in
	the .c file there are now 3 separate functions for parsing
	helix-style XML files, debian-style Packages.gz files, and
	redhat's xml/rdf stuff. (the latter is a noop for now). There
	are also copies of Ian's debian parsing stuff in here -- these
	need to be merged later with his code.

	* rc-channel.c, rc-channel.h:
	Added a few XML props -- "type" which defaults to helix, but can
	be debian or redhat, pkginfo_file which has the name of the
	package info file (defaults to packageinfo.xml.gz),
	pkginfo_compressed, which, if present, indicates that the file
	is gzip'd (I think you have to at least say pkginfo_compressed=1);
	also fixed minor typo in hash table type def in the .h.

	* rc-package-spec.c, rc-package-spec.h:
	Added rc_package_spec_copy (src, dst)

2000-08-25  Vladimir Vukicevic  <vladimir@helixcode.com>

	* deps.c, deps.h: Added global
	settings call to change the way conflicts work, as debian and rpm
	handle them differently (debian only conflicts real packages, rpm
	conflicts virtual packages as well).

	* pkginfo.c: Added Defensive Programming
	NULL string check

	* deps.c, deps.h: Fixed
	lots of conflict things. Still some work to do, but this
	is a checkpoint for ian so that he can continue.

2000-08-24  Joe Shaw  <joe@helixcode.com>

	* rc-package-spec.c: Added a static table for mapping
	section strings to section enums.

	* rc-package-spec.h: Define the above table and declare
	it (sectable) extern.

2000-08-24  Ian Peters  <itp@helixcode.com>

	* libredcarpet.h, rc-channel.c,
	rc-channel.h, rc-common.h,
	rc-package-dep.c, rc-package-dep.h,
	rc-package-spec.c,	rc-package-spec.h,
	rc-package-update.c, rc-package-update.h,
	rc-package.c, rc-package.h,
	rc-util.c, rc-util.h: Added.  The scattered
	remnants of the horror that was common.c and common.h.

	* channel.c, channel.h,
	common.c, common.h,
	packagespec.c, packagespec.h: removed.
	Contents moved into the above files.

	* Makefile.am: updated to build the new files not the old
	ones

	* deps.c, deps.h, distro.c,
	pkginfo.c, pkginfo.h,
	rc-debman.c, rc-md5.c,
	rc-packman.h: updated to include the right files

2000-08-23  Vladimir Vukicevic  <vladimir@helixcode.com>

	* deps.c, pkginfo.c: Made it not barf
	(hopefully) if the current channel is NULL (i.e. summary Next
	button). Added a g_assert check to pkginfo to warn if a null
	channel makes it to that point.

	* deps.h: removed unused element from struct

