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

next in thread | previous in thread | raw e-mail | index | archive | help
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 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 i=
n
> 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.


=E2=80=8BIf you have the .txz/.tbz package file, then it's a simple:

# pkg install /path/to/firefox-versions-blahblah.txz
=E2=80=8B
=E2=80=8BI believe you can specify multiple packages on the command-line an=
d 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=E2=80=8B install.  Ah yes, it's =
-U or
--no-repo-update.


--=20
Freddie Cash
fjwcash@gmail.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOjFWZ4DBuTgpnvE1=b2N9ky5ETqr9-t50razXrPFx=bWx%2B__w>