From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Mar 13 20:40:00 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8F0E3DAA for ; Wed, 13 Mar 2013 20:40:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 58B9B872 for ; Wed, 13 Mar 2013 20:40:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r2DKe0j9048480 for ; Wed, 13 Mar 2013 20:40:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r2DKe0Ks048479; Wed, 13 Mar 2013 20:40:00 GMT (envelope-from gnats) Resent-Date: Wed, 13 Mar 2013 20:40:00 GMT Resent-Message-Id: <201303132040.r2DKe0Ks048479@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Matthias Andree Received: from apollo.emma.line.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by hub.freebsd.org (Postfix) with ESMTP id 7BE1CC2D for ; Wed, 13 Mar 2013 20:37:39 +0000 (UTC) (envelope-from mandree@FreeBSD.org) Received: from mandree by apollo.emma.line.org with local (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1UFj4I-000EdL-4h for FreeBSD-gnats-submit@freebsd.org; Wed, 13 Mar 2013 11:37:58 +0100 Message-Id: Date: Wed, 13 Mar 2013 11:37:58 +0100 From: Matthias Andree To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/176925: ports-mgmt/pkg: pkg version fails if cwd no longer exists X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Matthias Andree List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2013 20:40:00 -0000 >Number: 176925 >Category: ports >Synopsis: ports-mgmt/pkg: pkg version fails if cwd no longer exists >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Mar 13 20:40:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Matthias Andree >Release: FreeBSD 9.1-RELEASE amd64 >Organization: FreeBSD ports >Environment: System: FreeBSD apollo.emma.line.org 9.1-RELEASE FreeBSD 9.1-RELEASE #2 r244869: Sun Dec 30 22:05:16 CET 2012 toor@apollo.emma.line.org:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Greetings, pkg version appears to have difficulties determining the up-to-date state of its ports if the current working directory has been removed. Now, this may belong in the "if it hurts, then why do you do it" category but I thought to report it nonetheless. >How-To-Repeat: cd /tmp mkdir foo cd foo rmdir ../foo pkg version This emits lots of port names with a question mark as status, as in: pkg version apr-1.4.6.1.4.1_3 ? asciidoc-8.6.8_1 ? autoconf-2.69 ? ... whereas, after a cd /tmp, pkg version would show this instead: apr-1.4.6.1.4.1_3 = asciidoc-8.6.8_1 = autoconf-2.69 = ... >Fix: If the current working directory must exist for pkg options, the pkg program should arguably enforce that, and either report a pertinent error, or perhaps just "chdir("/") to sidestep the issue. >Release-Note: >Audit-Trail: >Unformatted: