From owner-freebsd-ports@freebsd.org Thu Apr 20 20:39:19 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 226D6D48724 for ; Thu, 20 Apr 2017 20:39:19 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-qk0-x231.google.com (mail-qk0-x231.google.com [IPv6:2607:f8b0:400d:c09::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA205E2A for ; Thu, 20 Apr 2017 20:39:18 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: by mail-qk0-x231.google.com with SMTP id f133so57206028qke.2 for ; Thu, 20 Apr 2017 13:39:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ZdB9b9jQL0TEM1Gkbdd0UDp1jb0BLtU21UkXtI75afQ=; b=Xl1VW4pJd1MOVyZRkrampitiCKzeJIrjoWmxp7KkaVDQAPQSrmqnDuSUxECK+ZrcCi pKeoHaQh2t84ullCILXBdSIL1SB1+Em1fE6E3LndWo7DnlTC3P4ViKTZpKoQB+8Nju0m LFRufSuRR+1xAx3fjUC0x7wzP19uetvBxF96zgfOKLeKxr8eVXX8ZYw0x8VymbKDO359 hZG7Vx+QnbvxIgEDCfSEOaLyDWk5oPN+x4hL6rAm69xcooHvw0ygsC+wrOZ5ZEprE4+S 8N7q1U/XA++WYim2LXWqpMzo4JUhyVEhMu1e4ui9ktVAPQgEXFHpm1hLg94CrQpMiSbS WkqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ZdB9b9jQL0TEM1Gkbdd0UDp1jb0BLtU21UkXtI75afQ=; b=Pemefz/YcW7PbtHxpL4FRdRgEa+KfuCIlAEpHWvSdf3mx7vlxifhO2598mM/E/UnL2 HbGuFrqWF8dHsok9+q5pJe2g6cIRGGlGe5P0EJgt9Jf/V6im3kfEHUJ/x1VjKwhV6wwK UyBtIkRJ/XtGeg3GQPqyAxlrXPbaX22U1anUQregf4Q0ihxL4M0mwOv7yCkA6G3OdslS Oig/bSTdChKN4IJZPfAeu+kswx7nhe07aTIXPTrnBJMPptmKD8bsXEx8/5UDzTlcqNef er7r6u29Za9Z7cACqKMqojwyrU3RktL5K0jPtuUf5wMd5vpyIeqgz1LLR9B52yhXtP2i zfvg== X-Gm-Message-State: AN3rC/6KygSKpHIvKEs+kI/8YO5zq+xhZJ7M+zXpv2x1UlCvq587XNP6 mDHcXRs96xoDtZYnZWgSu0oAxAUi/vRBq9s= X-Received: by 10.55.5.17 with SMTP id 17mr10821096qkf.279.1492720757927; Thu, 20 Apr 2017 13:39:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.28.229 with HTTP; Thu, 20 Apr 2017 13:39:17 -0700 (PDT) In-Reply-To: <58F91BB7.5020008@quip.cz> References: <58F91BB7.5020008@quip.cz> From: Freddie Cash Date: Thu, 20 Apr 2017 13:39:17 -0700 Message-ID: Subject: Re: How to use cached packages To: Miroslav Lachman <000.fbsd@quip.cz> Cc: Patrick Powell , FreeBSD Ports ML Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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:39:19 -0000 On Thu, Apr 20, 2017 at 1:36 PM, Miroslav Lachman <000.fbsd@quip.cz> wrote: > 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 easil= y >>> 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 lef= t >>> would be appreciated. >>> >> >> >> =E2=80=8BIf 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" > =E2=80=8BBoth work. "pkg add" is there for backward compat with the old wa= y (pkg_add). "pkg install" can install from remote repos or local files. >From the man pages: =E2=80=8BDESCRIPTION pkg install is used for installation of packages from package reposito= - ries or local archives. Multiple package names can be specified on th= e command line, either explicitly or by matching against package names (or origins) in the repository catalogues using shell globbing or regular expressions. DESCRIPTION pkg add installs packages from either a local source or a remote one. When installing from a remote source you need to specify the protocol to use when fetching the package. =E2=80=8BFor ease of use, "pkg install" works for everything. :)=E2=80=8B --=20 Freddie Cash fjwcash@gmail.com