Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 May 2003 13:29:15 -0700 (PDT)
From:      Linh Pham <question@closedsrc.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/52826: Feature Request: Adding Timestamps to pkg info upon pkg_add
Message-ID:  <20030531202915.5BAA752F9@q.closedsrc.org>
Resent-Message-ID: <200305312030.h4VKUA2k030223@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         52826
>Category:       bin
>Synopsis:       Feature Request: Adding Timestamps to pkg info upon pkg_add
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 31 13:30:09 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Linh Pham
>Release:        FreeBSD 4.8-RELEASE i386
>Organization:
>Environment:
System: FreeBSD q.closedsrc.org 4.8-RELEASE FreeBSD 4.8-RELEASE #1: Sun Apr 6 22:50:16 PDT 2003 question@q.closedsrc.org:/usr/obj/usr/src/sys/Q i386
>Description:
Currently, when a package/port is installed under FreeBSD (either through
pkg_add or 'make install' of a port), it does not record the time of when
the package was installed under /var/db/pkg/{pkg-name} either in seconds since
epoch or the formatted date.

This makes it harder to figure out when exactly the package/port was installed
on a system, without relying on the date/time stamp of the files under
/var/db/pkg/{pkg-name}, which could be inaccurate if the date/time stamp of the
file was updated by 'touch' or some other backup/restore or whatever
procedure.

By adding a file with the timestamp, a new option in pkg_info, say -C, to
print out the list of installed packages/ports in chronological order (which
I believe is the default behavior in NetBSD.
>How-To-Repeat:
Running 'pkg_info' without any arguments will just print out the list of
installed packages/ports in alphabetical order. No option for sorting by
chronological order is listed in pkg_info(1). 
>Fix:
In pkg_add(1), add a function/call to either gmtime() or localtime() to get
the time (in seconds since the Epoch) and write the value to a file in
/var/db/pkg/{pkg-name}.

For pkg_info(1), have it read in the file containing the time value for the
package/port in /var/db/pkg/{pkg-name} and add an option, say -C, to allow
the person to sort the list in chronological order based on the time values
read in.
>Release-Note:
>Audit-Trail:
>Unformatted:


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030531202915.5BAA752F9>