From owner-freebsd-bugs@FreeBSD.ORG Sat Nov 3 02:20:01 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E00CF44D for ; Sat, 3 Nov 2012 02:20: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 B4D2A8FC0C for ; Sat, 3 Nov 2012 02:20:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qA32K0HQ003955 for ; Sat, 3 Nov 2012 02:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qA32K0Ch003954; Sat, 3 Nov 2012 02:20:00 GMT (envelope-from gnats) Resent-Date: Sat, 3 Nov 2012 02:20:00 GMT Resent-Message-Id: <201211030220.qA32K0Ch003954@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, Adam McDougall Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 50BF7398 for ; Sat, 3 Nov 2012 02:12:19 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 382E48FC0C for ; Sat, 3 Nov 2012 02:12:19 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id qA32CJd9035438 for ; Sat, 3 Nov 2012 02:12:19 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id qA32CIcv035437; Sat, 3 Nov 2012 02:12:18 GMT (envelope-from nobody) Message-Id: <201211030212.qA32CIcv035437@red.freebsd.org> Date: Sat, 3 Nov 2012 02:12:18 GMT From: Adam McDougall To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: bin/173316: pkg install gives misleading error when a package is specified more than once X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Nov 2012 02:20:01 -0000 >Number: 173316 >Category: bin >Synopsis: pkg install gives misleading error when a package is specified more than once >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Nov 03 02:20:00 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Adam McDougall >Release: 9-STABLE amd64 >Organization: MSU >Environment: FreeBSD test 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #0: Fri Oct 5 10:17:48 EDT 2012 root@build9:/usr/obj/proto/src9/src/sys/AMD64-9 amd64 >Description: Sometimes I compile a list of packages I want to install and sometimes it contains duplicate package names. When that happens, instead of pkg eliminating duplicate names for me, it falsely claims the duplicate package names are not found in the repo (I already have rsync installed this the 'already installed' is correct). >How-To-Repeat: root@test:/root # pkg install rsync rsync Updating repository catalogue Repository catalogue is up-to-date, no need to fetch fresh copy pkg: Package 'rsync' was not found in the repositories pkg: net/rsync is already installed and at the latest version root@test:/root # pkg install net/rsync net/rsync Updating repository catalogue Repository catalogue is up-to-date, no need to fetch fresh copy pkg: Package 'net/rsync' was not found in the repositories pkg: net/rsync is already installed and at the latest version root@test:/root # pkg install net/rsync net/rsync net/rsync Updating repository catalogue Repository catalogue is up-to-date, no need to fetch fresh copy pkg: Package 'net/rsync' was not found in the repositories pkg: Package 'net/rsync' was not found in the repositories pkg: net/rsync is already installed and at the latest version >Fix: Eliminate duplicate package names (might be tricky if something like 'rsync' and 'net/rsync' were specified unless it resolves them to a unique port name first) or simply don't follow the code path that causes a misleading false error to be printed. >Release-Note: >Audit-Trail: >Unformatted: