From owner-freebsd-bugs@FreeBSD.ORG Sat May 31 13:30:12 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2673437B404 for ; Sat, 31 May 2003 13:30:12 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48CD543F93 for ; Sat, 31 May 2003 13:30:10 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h4VKUAUp030224 for ; Sat, 31 May 2003 13:30:10 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h4VKUA2k030223; Sat, 31 May 2003 13:30:10 -0700 (PDT) Resent-Date: Sat, 31 May 2003 13:30:10 -0700 (PDT) Resent-Message-Id: <200305312030.h4VKUA2k030223@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Linh Pham Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5880337B401 for ; 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 ; 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 To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/52826: Feature Request: Adding Timestamps to pkg info upon pkg_add X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Linh Pham List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 May 2003 20:30:12 -0000 >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: