Description of problem: Package uninstall and reinstall followed by a profile synchronization do not change package installation date in RHN WebUI - for now tested on Spacewalk 0.7. Version-Release number of selected component (if applicable): Spacewalk 0.7 rhn-client-tools-0.4.20-14.el5 How reproducible: always 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 Actual results: Installation date on the WebUI shows date of point "1." Expected results: Should show date of point "3." Additional info: If this is desired behavior, CLOSE this request.
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