From owner-freebsd-ports@freebsd.org Thu Apr 20 20:36:12 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB66CD48660 for ; Thu, 20 Apr 2017 20:36:12 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80FA6D54 for ; Thu, 20 Apr 2017 20:36:11 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id A822828469; Thu, 20 Apr 2017 22:36:08 +0200 (CEST) Received: from illbsd.quip.test (ip-86-49-16-209.net.upcbroadband.cz [86.49.16.209]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id B095B28455; Thu, 20 Apr 2017 22:36:07 +0200 (CEST) Subject: Re: How to use cached packages To: Freddie Cash , Patrick Powell Cc: FreeBSD Ports ML References: From: Miroslav Lachman <000.fbsd@quip.cz> Message-ID: <58F91BB7.5020008@quip.cz> Date: Thu, 20 Apr 2017 22:36:07 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2017 20:36:12 -0000 Freddie Cash wrote on 2017/04/20 22:17: > On Thu, Apr 20, 2017 at 11:58 AM, Patrick Powell > wrote: > >> I ran into a problem where I needed to reinstall a package. However, I >> did not have network access to the pkg repository. I did have a system >> which had all of the pkgs which I needed in the pkg cache. I can easily >> copy these to the system, as well as the pkg database, etc. >> >> So: is there a SIMPLE way to have pkg check to see if a pkg is already in >> the pkg cache and use that before trying to go to the repository? >> >> Is there a SIMPLE way to prevent pkg from trying to check the pkg >> repository for an update? >> >> I strongly suspect that something like: >> >> pkg --do_not_check_for_latest_version --use_cached_pkg install firefox >> >> Any help on this before I tear out the three strands of hair I have left >> would be appreciated. > > > ​If you have the .txz/.tbz package file, then it's a simple: > > # pkg install /path/to/firefox-versions-blahblah.txz I think it is "pkg add /var/cache/pkg/firefox-versions-blahblah.txz" > ​I believe you can specify multiple packages on the command-line and it > will install them all. If there are required dependencies, you'll have to > specify them on the command-line as well. If you specify all the packages > on the CLI, then it won't check the remote repo. > > There's also a flag you can add to prevent it from doing a > behind-the-scenes "pkg upgrade" before the​ install. Ah yes, it's -U or > --no-repo-update. Miroslav Lachman