From owner-freebsd-pkg@FreeBSD.ORG Wed May 27 10:36:12 2015 Return-Path: Delivered-To: freebsd-pkg@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4CF229B for ; Wed, 27 May 2015 10:36:12 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 7E7A913D for ; Wed, 27 May 2015 10:36:12 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lgwl-lstewart2.corp.netflix.com (c110-22-60-167.eburwd6.vic.optusnet.com.au [110.22.60.167]) by lauren.room52.net (Postfix) with ESMTPSA id D24237E88D for ; Wed, 27 May 2015 20:36:03 +1000 (EST) Message-ID: <55659DF1.2050502@freebsd.org> Date: Wed, 27 May 2015 20:35:29 +1000 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: freebsd-pkg@freebsd.org Subject: pkg add should reorder or dedup list of packages to install Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.4 required=5.0 tests=DNS_FROM_AHBL_RHSBL, UNPARSEABLE_RELAY autolearn=no version=3.3.2 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2015 10:36:12 -0000 Hi all, [I'm not subscribed to this list, so please CC me on replies.] Consider the following output of a pkg-1.5.1 run: ########## > pkg add /var/tmp/portswork/packages/All/p5-Types-Serialiser-1.0_1.txz /var/tmp/portswork/packages/All/p5-common-sense-3.73_1.txz /var/tmp/portswork/packages/All/perl5-5.20.2_3.txz Installing p5-Types-Serialiser-1.0_1... `-- Installing p5-common-sense-3.73_1... | `-- Installing perl5-5.20.2_3... | `-- Extracting perl5-5.20.2_3... done `-- Extracting p5-common-sense-3.73_1... done Extracting p5-Types-Serialiser-1.0_1... done Installing p5-common-sense-3.73_1... the most recent version of p5-common-sense-3.73_1 is already installed Installing perl5-5.20.2_3... the most recent version of perl5-5.20.2_3 is already installed ########## It is rather gratuitous to attempt double installation of packages. I would suggest that either: - The specified list of packages to install should be updated if any in the list are auto pulled in as dependencies of packages earlier in the list i.e. for the above example, as a result of installing p5-Types-Serialiser first which auto pulls in perl5 and p5-common-sense as deps, perl5 and p5-common-sense should be removed from the specified install list. OR - The specified list should be ordered prior to beginning the install such that the packages are installed in order of interdependence and therefore no attempts to install a package twice would be made i.e. for the above example, perl5 being a dep of both p5- packages would be ordered first, then p5-common-sense being a dep of p5-Types-Serialiser would be next followed finally by p5-Types-Serialiser. I suspect the first option might be better because it would be programmatically easier and cheaper, but the pkg team can ponder. Cheers, Lawrence