This documents how progress information is noticed by NUU by showing
the Progress calls that make it visible to the user and then the

Progress calls        Item tracked                     Called from YumIO.c
--------------------------------------------------------------------------------

=== PG_C_*: collect ===

startTotal            "Initializing: TP"               collectReal
   startItem          "Preparing"                      collectReal
   startItem          "Reading repositories"           collectReal
   setupItemActs                                       collectReal
     startItemAct     "Reading repository %1"          collectProgress
        setItemValue                                   collectProgress
   endItemActs                                         collectReal
   startItem          "Collecting updateable packages" collectReal
   startItem          "Collecting inst & avail pkgs"   collectReal
   startItem          "Collecting groups"              collectReal

=== PG_F_*: collect file lists ===

startTotal            "Loading file lists: TP"         collectFileListsReal
   startItem          "Reading repositories"           collectFileListsReal
   setupItemActs                                       collectFileListsReal
      startItemAct    "Reading repository %1 for %2"   collectProgress
        setItemValue                                   collectProgress
   endItemActs                                         collectFileListsReal

=== PG_O_*: collect other data ===

startTotal            "Loading miscellaneous data: TP" collectOtherDataReal
   startItem          "Reading repositories"           collectOtherDataReal
   setupItemActs                                       collectFileListsReal
      startItemAct    "Reading repository %1 for %2"   collectProgress
        setItemValue  ...                              collectProgress
   endItemActs                                         collectFileListsReal

=== PG_D_*: check dependencies ===

startTotal            "Checking Depdendencies: TP"     applyReal
   startItem          "Preparing"                      applyReal
   setupItemActs                                       applyReal
      startItemAct    "Downloading %1 header"          applyGrabMeterStart
         setItemValue                                  applyGrabMeterUpdate
      startItemAct    "Resolve Dependencies"           dsTsCheck
         (no values)
      changeItemActs                                   dsRestartLoop
      changeItemActs                                   dsTsNewPkg
   endItemActs                                         userconfirm

=== PG_R_*: run transaction ===

startTotal            "Running Transaction: TP"        userconfirm
   startItem          "Preparing"                      userconfirm
   setupItemActs      (unnamed)                        userconfirm
      startItemAct    "Downloading %1"                 applyGrabMeterStart
         setItemValue ...                              applyGrabMeterStart
   endItemActs                                         applyGrabMeterStart (yum <= 3.2.2)
   endItemActs                                         tsInitCallback      (yum >= 3.2.3)
   startItem          "Preparing to Test Transaction"  tsInitCallback(output=0)
   setupItemActs                                       tsInitCallback(output=0)
      startItemAct    "Transaction Test"               tsCallback
   endItemActs                                         tsInitCallback(output=1)
   startItem          "Preparing to Run Transaction"   tsInitCallback(output=1)
   setupItemActs                                       tsInitCallback(output=1)
      startItemAct    "Transaction Test"               tsCallback
      startItemAct    "Updating %1"                    tsCallback (yum <= 3.2.2)
                      "Installing %1"
                      "Completing update for: %1"
                      "Removing %1"
         setItemValue                                  tsCallback (yum <= 3.2.2)
      startItemAct    "Updating %1"                    tsEvent    (yum >= 3.2.3)
                      "Installing %1"
                      "Completing update for: %1"
                      "Removing %1"
         setItemValue                                  tsEvent    (yum >= 3.2.3)
   endItemActs                                         postTransactionOutput
--------------------------------------------------------------------------------

Collection: PG_C_*, PG_F_*, PG_O_*: collectProgress, collectGrabMeter*

   The calls are from YumIO.py's YumIOApplyGrabmeter.start/update/end and
   YumIOCollectProgress.progressbar.

   The YumIOApplyGrabMeter is installed via YumIO.repos.setProgressBar() during
   setupRepos, collectFileLists and collectOtherData and only during those
   operations.  Its operations are called for any downloads.  There are three
   kinds of downloads possible:

      (1) metalink (a list of mirrors)
      (2) repomd.xml (metadata listing all the possible files)
      (3) actual content (e.g. primary.xml)

   The YumIOCollectProgress is installed as YumIO's repos.callback.  Yum may
   call the object directly or call its progressbar function, depending on the
   version of Yum.  The YumIO code is designed to work either way.

   The progressbar function is called for two purposes:

      (1) Converting the database

          In older versions of yum, the collectProgress code uses a special
          name, "MD Read", to indicate that it's doing this operation.

      (2) Reading and interpreting the database

          It is called from Yum*PackageSack.addDict functions to indicate that
          we're handling a new repository in the list of repositories.

          In newer versions of yum, it is called deep in the sqlite code to
          indicate progress in converting the xml to sqlite.  

       The collectProgress code uses the arguments it's passed to deduce
       which situation actually is the case.

   In each case, collectProgress is called.  The version of it that interacts
   with python objects interprets the arguments to figure out which sort of
   operation is being done and sorts it by RepoAct kind.  It then calls the
   other version of collectProgress that works out that act number for the
   particular operation and keeps the progress bars moving appropriately.

Dependency Resolution: PG_D_*: applyGrabMeter*, dsTsCheck, dsTsNewPkg:

   applyGrabMeterStart is called from YumIO.py's YumIOApplyGrabMeter.start.
   Similarly, applyGrabMeterUpdate is called from YumIO.py's
   YumIOApplyGrabMeter.update.  That object is installed via
   YumIO.repos.setProgressBar() during the apply() operationonly.

   dsTsCheck is called from YumIO.py's YumIODsCallback.tscheck.  Similarly,
   dsRestartLoop is called from YumIO.py's YumIODsCallback.restartLoop.  That
   object is installed only during an apply as YumIO's dsCallback object.

   dsTsNewPkg is called from YumIO::dsTsInfo based on horrible checks for known
   strings prefixes.  It is called when appropriate from YumIO::log, which
   captures all output via a number of mechanisms.

Run Transaction: PG_R_*: applyGrabMeter*, tsInitCallback, tsCallback, tsEvent:

   applyGrabMeterStart is called from YumIO.py's YumIOApplyGrabMeter.start.
   Similarly, applyGrabMeterUpdate is called from YumIO.py's
   YumIOApplyGrabMeter.update.  That object is installed via
   YumIO.repos.setProgressBar() during the apply() operationonly.

   The manner by which tsInitCallback is called depends on the yum version.  For
   yum <= 3.2.2, it is called from RPMInstallCallback.__init__.  For yum >=
   3.2.3, it is called from YumCliRPMCallBack.__init__.  In each case, the
   __init__ implies that it is called when the object is created.  In each case,
   the class in question was hidden deep in yum and an object of an alternate
   could not be swapped in easily.  So instead each whole class was replaced
   with one with an alternate implementation (although it retains the original
   classes with alternate names and uses them to retain their existing
   functionality).

   tsCallback is called from YumIO.py's RPMInstallCallback.callback.  This is
   relevant only for yum <= 3.2.2.  That object is installed as described for
   tsInitCallback.

   tsEvent is called from YumIO.py's YumCliRPMCallBack.event.  This is relevant
   only for yum >= 3.2.3.  That object is installed as described for
   tsInitCallback.
