-*- text -*-

Redo the install interface.  (mostly done)
---------------------------

I think having a GtkCTree widget containing a number of packages would
make a nice interface.  The tree would reflect the groups in which
listed packages were in (leaf nodes would be the actual packages).

As a user preference, the install window could filter out packages
that are already installed (this would probably be the default).
There would also be functionality to colour entries for packages that
are newer/older than a package that is currently installed on the
system.

In the preferences, you could set a list of default package locations.
This would probably be set to /mnt/cdrom/RedHat/RPMS,
/usr/src/redaht/RPMS/<arch> by default (maybe also a directory for an
applications CD as well).

The user could query packages from this interface, and add individual
packages or directories of packages to the tree.  The file dialog
would also have a query button added, so the user can quickly get more
information about a package -- alternatively, I might add a small
information pane to the dialog.

The user could then select the packages they want to install, and then
press the install or upgrade buttons (I think it is pointless and
confusing to have separate windows for install/upgrade) to install the
selected packages.

Selection of packages would probably be through catching mouse clicks
to a particular column on the tree, and making the column act as a
toggle.  When a package is installed, it would get removed from this
list (controled by the setting in the preferences).

In the future, I would like to be able to add ftp capabilities to this
install interface.  It would probably take a directory listing, and
add the packages to the list in the Unknown group, using simple string
splitting to guess the name and version.  If the user tries to get
more information about the package from the package with the query
button, the package would be downloaded and its entry in the tree
would be moved to the correct location.  When installing a package
from an ftp site, it would be downloaded first as usual.


Redo the file download interface.
---------------------------------

This interface needs to be redone.  The request processing should
occur in a GTK idle function, rather than calling gtk_main_iteration
occasionally during request processing.

Also the ftp code needs to be redone so that it fits into an event
loop better.

It would be nice if the libvfs code could be used, but it is still
tied to MC.


Changes to rpmfind interface.
-----------------------------

Colour new/old packages in this list.  The colouring is only necessary
if a package by that name is installed on the system.  The colouring
scheme would be the same as in the install window, which should be
configurable from the preferences.  (done)

Probably also a good idea to change the tree fill routine into an idle
function rather than a loop that calls gtk_main_iteration(), similar to
the way the install dialog does things now.  This should increase the
responsiveness of the interface as well.  Also need to do this for file
downloads.


Dependency conflict dialog.
---------------------------

When removing a package, try to display dependency conflicts as a tree
eg. removing a would break b's dependency, and removing a and b would
break c's dependency:
  removing a has following problems:
    +-- package b requires a
      +-- package c requires b

The process would happen something like this:
 1. create rpmDependencies object, and add the removal of package `a'
    to the transaction.
 2. For each broken dependency, try removing that package in the
    transaction.  Any extra broken dependencies would be for packages
    that require the package.
 3. Repeat cycle until there are no broken dependencies.

In the dependency conflict dialog, it could give a button that would
allow those other packages to be removed as well.  I don't know if it
is a good thing to add such a button for dependency conflicts for an
install/upgrade though.

(partly done -- still need the remove these packages button)


These ideas are from Cristian Gafton <gafton@redhat.com> (I have
rewritten some bits, and added some of my own comments):

On install package window:
  - have some radio boxes/option menu to let you select:
      List all packages
      List uninstalled and newer versions only
      List uninstalled only
      List newer versions only
    To implement this, I will probably have to keep a list of the packages
    added to the dialog, and rebuild the tree when the user changes the
    filter.  The list would probably contain filename, package status,
    shortened name, and maybe group.  Some of this information could be
    left out, and require that the information be reread from the disk when
    the filter changes.  This is a mem/speed tradeoff.

- checksig causing segfaults.  I have seen this problem occur when rpm
  detects that the pgp executable is installed on the system, but the
  user has not set up pgp for their account.  Maybe disable pgp checks
  if the ~/.pgp directory does not exist.

- refresh option for when other programs do something to the RPM database
  while gnorpm is running.  I didn't have to worry about this previously,
  since gnorpm had the database locked.  It would be pretty easy to rescan
  the package list, and update its display.  It may be more difficult to
  remove query windows for removed packages.

- uninstalling all packages in a group should remove group from package list.
  Rules would be to check if no packages are in group, then see if the
  corresponding GtkCTreeNode has no child nodes before removing it from
  the list.


