[Yum-devel] install/update/erase cases

seth vidal skvidal at phy.duke.edu
Mon Oct 24 15:08:14 UTC 2005


hi,
 I'm putting  some thought into generic install/erase/update methods in
the base yum class. Some error/sanity checking before passing the
package objects onto tsInfo. What I'm running into right now is the
confusing cases where a package is being put into two, potentially
opposing, states. Some examples and what I _think_ should happen:

short version:
 - install/update 'wins' over erasures
 - installs can be converted to updates
 - update calls for pkgs that do not have an older version installed
will raise 
   an error

odd cases/questions:

- if requesting install but same pkg is marked as erase then install 
   or - should we remove the pkg marked as erase and mark the newer pkg
as an
   update?

- if requesting install/update but older pkg is marked to be installed.
      If pkgs are install-only - then install them
      If pkgs are not install-only then install/update the newest/best
one

- if requesting install/update but newer pkg is marked to be installed
      If pkgs are install-only - then install them
      if pkgs are not install-only then install/update the newest/best
one

- if requesting update but package is an install then:
     mark the pkg as an install
     or
     don't do anything - return/raise an error.
     (arguably, earlier functions should have vetted this case and
returned 
      proper errors but it might make sense to let this function do the
thinking 
      for this)

- if requesting erase - but package is marked to be installed/updated
then:
    - raise an error about the problem
    - discard the erase request and emit log
    - silently discard the erase request

- if requesting install/update of two mutually obsoleting packages:
    - raise exception?
    - install the first one?
    - install the second one?

- if requesting install/update of two conflicting packages:
   - raise exception?
   - install the first one?
   - install the second one?


Those are the ones I can think of that cause pain and suffering. I'm
sure there are more that I'm not thinking of. Any suggestions on any of
the lower cases?

Thanks
-sv





More information about the Yum-devel mailing list