Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Apr 2017 13:39:17 -0700
From:      Freddie Cash <fjwcash@gmail.com>
To:        Miroslav Lachman <000.fbsd@quip.cz>
Cc:        Patrick Powell <papowell@astart.com>, FreeBSD Ports ML <freebsd-ports@freebsd.org>
Subject:   Re: How to use cached packages
Message-ID:  <CAOjFWZ5m4vrQxRrPstZZDCz=RhVdqtt0vL4U%2B_e4EbcYVNoQzA@mail.gmail.com>
In-Reply-To: <58F91BB7.5020008@quip.cz>
References:  <f2291104-f00e-74e4-7d31-9e0925902854@astart.com> <CAOjFWZ4DBuTgpnvE1=b2N9ky5ETqr9-t50razXrPFx=bWx%2B__w@mail.gmail.com> <58F91BB7.5020008@quip.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <papowell@astart.com>
>> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOjFWZ5m4vrQxRrPstZZDCz=RhVdqtt0vL4U%2B_e4EbcYVNoQzA>