On 2014/11/29 12:07, Antoine Jacoutot wrote:
> Hi.
> 
> So. Each time pkg_add runs, it tries to connect to either PKG_PATH or to 
> installpath from pkg.conf to fetch quirks (I assume).
> When you have no network anymore (moving around with your laptop or 
> whatever), and you want to install a local package, you're basically fucked:
> 
> $ time sudo pkg_add ./gmake-4.1.tgz
> -> hangs forever
> -> getting tired, so ^C
> Fatal error: Caught SIGINT
>  at /usr/libdata/perl5/OpenBSD/AddDelete.pm line 40.
>     1m57.24s real     0m0.15s user     0m0.08s system
> -> sometimes, that keeps the pkg db locked...
> 
> 
> On my production machines, I have a regular job that removes the useless 
> pkg.conf, but it happens often enough on my dev boxen now that I felt I 
> should send something.
> The problem is that each time I update using bsd.rd, /etc/pkg.conf is 
> re-created... and I am not even talking about the fact that the created file 
> is wrong since I usually do not install base from the same place I get 
> packages -- but well.
> Can we have a switch or whatever that would prevent pkg_add from trying to go 
> online each time it's run please?

I do see some use for being able to ignore pkg.conf from the command line.

But that said, why does your pkg.conf keep returning? I don't have one on
my laptop at all, I probably removed it once after installing, but it
never comes back. On some other machines I have "ntogo = yes" but no
installpath.

I just control everything by setting PKG_PATH in the shell, default set
in .profile (using arch -s, uname -r etc. and choosing a mirror based on
the address of the default route to tell what network I'm on), and I just
override with 'PKG_PATH= sudo pkg_add blah' if I need to.

Reply via email to