Bug 555046
| Summary: | package uninstall and reinstall do not change package installation date un WebUI | ||
|---|---|---|---|
| Product: | Red Hat Satellite 5 | Reporter: | Jan Hutař <jhutar> |
| Component: | Registration | Assignee: | Miroslav Suchý <msuchy> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Martin Minar <mminar> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 530 | CC: | cperry, mkoci, mminar, mmraka, msuchy, tlestach |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | spacewalk-backend-1.2.11-1 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2010-10-28 14:46:49 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 608777 | ||
|
Description
Jan Hutař
2010-01-13 14:18:27 UTC
Steps to Reproduce: 1. # yum -y install zsh 2. # rpm -e zsh 3. # rpm -ivh zsh-4.2.6-3.el5.rpm 4. # rhn-profile-sync Make sure rhn_check (or rhn-profile-sync) doesn't run between steps 2 and 3. The bug is in spacewalk-backend code. Client only send list of installed packages with their attributes and it's a servers duty to update its database properly.
server/rhnServer/server_packages.py: line 98
class Packages:
...
def add_package(self, sysid, entry):
log_debug(4, sysid, entry)
p = dbPackage(entry)
if p is None:
# Not a valid package spec
return -1
if not self.__loaded:
self.reload_packages_byid(sysid)
if self.__p.has_key(p.nvrea): # <---
self.__p[p.nvrea].add()
self.__changed = 1
return 0
self.__p[p.nvrea] = p
self.__changed = 1
return 0
Because package already exists server ignores changed installtime.
Re-assigning to satellite server component.
When packages have different installtime (and same nvrea) then the package are updated in db (to be precise it is deleted and inserted again). Commits: 7d9f704010e255ca16bb2eddbc2efcd9a639858c 432e369e5a75a3f6aad346ede5e8d70edfbf9a47 I followed the described reproducer and the WebUI shows the correct installation date - when the package was reinstalled. STAGE VALIDATED on Satellite-5.4.0-RHEL5-re20101015.0. The 5.4.0 RHN Satellite and RHN Proxy release has occurred. This issue has been resolved with this release. RHEA-2010:0801 - RHN Satellite Server 5.4.0 Upgrade https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10332 RHEA-2010:0803 - RHN Tools enhancement update https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10333 RHEA-2010:0802 - RHN Proxy Server 5.4.0 bug fix update https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10334 RHEA-2010:0800 - RHN Satellite Server 5.4.0 https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10335 Docs are available: http://docs.redhat.com/docs/en-US/Red_Hat_Network_Satellite/index.html Regards, Clifford |