From question@closedsrc.org  Sat May 31 13:29:21 2003
Return-Path: <question@closedsrc.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5880337B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 31 May 2003 13:29:21 -0700 (PDT)
Received: from q.closedsrc.org (ip233.gte15.rb1.bel.nwlink.com [209.20.244.233])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C7D0A43F3F
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 31 May 2003 13:29:20 -0700 (PDT)
	(envelope-from question@closedsrc.org)
Received: by q.closedsrc.org (Postfix, from userid 1001)
	id 5BAA752F9; Sat, 31 May 2003 13:29:15 -0700 (PDT)
Message-Id: <20030531202915.5BAA752F9@q.closedsrc.org>
Date: Sat, 31 May 2003 13:29:15 -0700 (PDT)
From: Linh Pham <question@closedsrc.org>
Reply-To: Linh Pham <question@closedsrc.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Feature Request: Adding Timestamps to pkg info upon pkg_add
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         52826
>Category:       bin
>Synopsis:       [request] Adding Timestamps to pkg info upon pkg_add(1)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 31 13:30:09 PDT 2003
>Closed-Date:    Wed May 28 15:16:42 UTC 2014
>Last-Modified:  Wed May 28 15:16:42 UTC 2014
>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:
State-Changed-From-To: open->suspended 
State-Changed-By: kris 
State-Changed-When: Sat Jul 12 23:09:02 PDT 2003 
State-Changed-Why:  
Suspended awaiting patch/committer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=52826 
Responsible-Changed-From-To: freebsd-bugs->krion 
Responsible-Changed-By: flz 
Responsible-Changed-When: Fri Aug 19 12:23:23 GMT 2005 
Responsible-Changed-Why:  
Bug krion with pkg_install PRs. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=52826 
Responsible-Changed-From-To: krion->portmgr 
Responsible-Changed-By: flz 
Responsible-Changed-When: Fri Jul 17 13:42:20 UTC 2009 
Responsible-Changed-Why:  
pkg_install is maintained by portmgr. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=52826 

From: Garrett Cooper <yanegomi@gmail.com>
To: bug-followup@FreeBSD.org, question@closedsrc.org
Cc:  
Subject: Re: bin/52826: [request] Adding Timestamps to pkg info upon 
	pkg_add(1)
Date: Sun, 21 Mar 2010 16:05:38 -0700

     This is an interesting feature request, but it's a bit more than
 non-trivial given pkg_install's design.
     It would have to be seconds since the epoch because of
 localization issues and the fact that if I install my package in
 America, then if I monkey around with my locale and change it to
 England, India or Japan, for example, the localization settings will
 be incorrect without having to reconstitute the localization setting
 by inserting both the formatted string as well as the source locale.
     Let me think about how this could be done because (as I said
 before) its inclusion is non-trivial and it'll need to be in the
 installation metadata, not the distributed package metadata.
 Cheers,
 -Garrett
State-Changed-From-To: suspended->closed 
State-Changed-By: bapt 
State-Changed-When: Wed May 28 15:16:41 UTC 2014 
State-Changed-Why:  
pkg_install is not being worked on anymore 

http://www.freebsd.org/cgi/query-pr.cgi?pr=52826 
>Unformatted:
