Patches installed since May 31 have wrong install date - always Dec 2005

Using updatemanager to display installed patch information I discovered that for many of the installed patches the latest version claims to have been installed last December while previous versions were installed at various times this year.

For example:

119082-15 installed 2006/05/13

119082-16 installed 2006/05/28

119082-20 installed 2005/12/24

But according to the patch log rev 20 was installed on July 24 2006.

Going through the patch logs any patch installed since May 31, ie in June, July, shows an installation date of 2005/12/x where x is the correct day of the month

Where does updatemanager get this information from?

[678 byte] By [davidholmes] at [2007-11-26 9:18:43]
# 1
Hi.Could you post the patch log from 119082-20( /var/sadm/patch/119082-20/log )Thanks
ForumModerator at 2007-7-6 23:48:03 > top of Java-index,Administration Tools,Sun Update Connection-System...
# 2

Sorry for the delay.

root hypert /var/sadm/spool # more /var/sadm/patch/119082-20/log

Package not patched:

PKG=SUNWsibi

Original package not installed.

This appears to be an attempt to install the same architecture and

version of a package which is already installed. This installation

will attempt to overwrite this package.

Dryrun complete.

No changes were made to the system.

This appears to be an attempt to install the same architecture and

version of a package which is already installed. This installation

will attempt to overwrite this package.

Dryrun complete.

No changes were made to the system.

This appears to be an attempt to install the same architecture and

version of a package which is already installed. This installation

will attempt to overwrite this package.

Dryrun complete.

No changes were made to the system.

This appears to be an attempt to install the same architecture and

version of a package which is already installed. This installation

will attempt to overwrite this package.

Installation of <SUNWadmc> was successful.

This appears to be an attempt to install the same architecture and

version of a package which is already installed. This installation

will attempt to overwrite this package.

Installation of <SUNWadmlib-sysid> was successful.

This appears to be an attempt to install the same architecture and

version of a package which is already installed. This installation

will attempt to overwrite this package.

Installation of <SUNWinst> was successful.

root hypert /var/sadm/spool # ls -l /var/sadm/patch/119082-20/log

-rw-r--r--1 rootroot1427 Jul 24 08:38 /var/sadm/patch/119082-20/log

davidholmes at 2007-7-6 23:48:03 > top of Java-index,Administration Tools,Sun Update Connection-System...
# 3
Can you also post "pkginfo -l <package name> | grep INSTDATE" for the packages listed in the patch log.And, although it seems obvious, can you verify that the time/date is set correctly on the host?
ForumModerator at 2007-7-6 23:48:03 > top of Java-index,Administration Tools,Sun Update Connection-System...
# 4

Again sorry for the delayed response.

> Can you also post "pkginfo -l <package name> | grep

> INSTDATE" for the packages listed in the patch log.

root hypert /var/sadm/spool # pkginfo -l SUNWadmc | grep INSTDATE

INSTDATE: Jul 24 2006 08:37

root hypert /var/sadm/spool # pkginfo -l SUNWadmlib-sysid | grep INSTDATE

INSTDATE: Jul 24 2006 08:37

root hypert /var/sadm/spool # pkginfo -l SUNWinst | grep INSTDATE

INSTDATE: Jul 24 2006 08:38

> And, although it seems obvious, can you verify that

> the time/date is set correctly on the host?

Verified correct :)

davidholmes at 2007-7-6 23:48:03 > top of Java-index,Administration Tools,Sun Update Connection-System...
# 5
David,Can you send an email to rsc-forum-inbound@Sun.COM with a screenshot of the install date. It sounds as though this may be a bug so we'll need to troubleshoot further. Can you make sure that the subject line is - "[Case ID: 11118435] Incorrect install date in UM"
ForumModerator at 2007-7-6 23:48:03 > top of Java-index,Administration Tools,Sun Update Connection-System...
# 6
-
ForumModerator at 2007-7-6 23:48:03 > top of Java-index,Administration Tools,Sun Update Connection-System...
# 7

Thanks to the support folk we have determined what is happening though not the exact reason why things started going wrong.

It seems that some patch/patches applied in June, possibly related to locale or at least affected by locale, changed the way pkg information was stored in the pkginfo database - specifically the installation date used full month names instead of three letter abbreviations.

[updated to correct the above. Actually it seems the full month has always been used. It was just that May, being only three letters long worked correctly regardless, so I only noticed the problem for June.]

Updatemanager uses the /usr/lib/patch/list_patches script to generate the patch information that it uses to generate its own display. That script assumes three letter month names and if it doesn't find it then a month of 00 is specified. Consequently the installation date for a patch becomes 200600nn where nn is the day. By chance/coincidence/design the zeroth month of 2006 is treated as the month before the first month of 2006, which is December 2005. As a result all the patches which generated a 200600nn date get displayed as nn Dec 2005.

As I said it isn't clear what patch (or combination of patches) resulted in the changed date format. There is a CR 6285720 that is somewhat related in getting the list_patches script updated to handle different date formats. Meanwhile you can edit the script directly to use:

case "$MONTH_ENG" in

Jan|January ) MONTH=01;;

Feb|February ) MONTH=02;;

Mar|March ) MONTH=03;;

Apr|April ) MONTH=04;;

May ) MONTH=05;;

Jun|June ) MONTH=06;;

Jul|July ) MONTH=07;;

Aug|August ) MONTH=08;;

Sep|September ) MONTH=09;;

Oct|October ) MONTH=10;;

Nov|November ) MONTH=11;;

Dec|December ) MONTH=12;;

* ) MONTH=00;;

esac

Message was edited by:

davidholmes

davidholmes at 2007-7-6 23:48:03 > top of Java-index,Administration Tools,Sun Update Connection-System...