So below is the aggregate responses. I got 6 responders. [email protected] wrote on 02/25/2011 03:07:51 PM:
> So... I ran into some unexpected behavior and was curious what you all > consider to be the expected of behavior from the yum command in these > scenarios:: > > Background: The repository that mypackage is in holds version 0.5-1, 1.0-1, > and 2.0-1. > > > 1: mypackage is not installed on the system and I run `yum install > mypackage-1.0-1` Expected: Package 1.0-1 is installed. Actual: Package 1.0-1 is installed. > 2: mypackage 0.5-1 is installed on the system and I run `yum install > mypackage-1.0-1` Expected: Should error that package is already installed, update is available. No action. Actual: Updates the package to 1.0-1. > 3: mypackage 1.0-1 is installed on the system and I run `yum install > mypackage-1.0-1` Expected: Response that package-version is already installed. No action. Actual: Response that package-version is already installed. No action. > 4: mypackage is not installed on the system and I run `yum update > mypackage-1.0-1` Most Expected (5): Tells you package is not installed, but available. No action. Other Expected (1): Installs package just like rpm -Uvh would. Actual: Tells you package is not installed, but available. No action. > 5: mypackage 0.5-1 is installed on the system and I run `yum update > mypackage-1.0-1` Response: Package is updated to 1.0-1. Actual: Package is updated to 1.0-1. > 6: mypackage 1.0-1 is installed on the system and I run `yum update > mypackage-1.0-1` Response: Response that package-version is already installed. No action. Actual: Package is updated to 2.0-1 (latest package). So the point of this poll was specifically to focus on scenario 6. I raised a ticket with Red Hat about this behavior, and the engineer is throwing out that the Actual behavior is the way it is, and that if we wanted that behavior it would be a feature request, possibly under a new command (yum update-specific?). Since 'yum install' performs in place of scenario 6, I see no point in an additional command. Nothing has been decided yet, I just wanted to do some of my own data gathering. At the end of the day, my point about the whole thing is that the behavior should be consistent and discoverable. I can see the engineering logic that 'yum update <package>' and 'yum update <package>-<version>' are the same, because you are saying to update that specific package. However I don't see the real world use of 'yum update <package>-<version>' matching the Actual usage. Why would I ever say "update this package, only if its at version X". I'm more likely to say 'yum date to version X, and not higher'. I've never been a fan of the break in functionality between 'yum install' vs 'rpm -ivh' and 'yum update' vs 'rpm -Uvh'. I feel that if yum is on top of rpm, they should have consistent behavior. I have never feel the need to complain about that. However, the difference in behavior in this does bring out the complaint. What I find especially troublesome is that the behavior from 5 to 6 is different. The behavior changes based on how the version matches. If the current behavior is supposed to be correct, then if I provide a specific version shouldn't it only update the package if it matches that specific version? Instead scenario 5 updates to the defined version, and scenario 6 updates as long as the version is the same or newer. This, IMO, is very inconsistent behavior. I'm attaching this to my TAM ticket, requesting that they look into it more. -greg _______________________________________________ rhelv5-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/rhelv5-list
