pkg-install(8), url: "file://" and PKG_CACHEDIR

Bryan Drewery bdrewery at FreeBSD.org
Thu Jun 26 16:29:11 UTC 2014


Moving to pkg at FreeBSD.org

On 6/21/14, 12:33 PM, Harry Schmalzbauer wrote:
> Dear all,
>
> today I tried pkg(8) for the first time.
> Thanks for all the great work!
>
> One thing I'm missing is a auto-matching-logic for PKG_CACHEDIR if 'url'
> starts with "file://" (in ${PRREFIX}/pkg/repos/mylocalrepo.conf).
>
> Currently, local available packages will be copied to the local cache
> dir by default (if not circumvented by 'env
> PKG_CACHEDIR=/path/to/local-repo pkg install …' e.g.).
> Such a PKG_CACHEDIR-matching-logic should be enabled by default IMHO.

Warning, this will stop working in pkg 1.3 and cause many problems in 
your repo. The filenames are stored differently in the cachedir and now 
symlinks are used to point to the newly cached files - which will remove 
all of your existing packages.

>
> Maybe it's usefull to have a "pkg-install -K" option, (like -K,--keep
> for old pkg_add), to disable the PKG_CACHEDIR-mathcing-logic (for
> example if someone provides cd-repo and intentionally wants to keep
> packages in PKG_CACHEDIR).
>
> Anyone else missing that feature?
>
> Thanks,
>
> -Harry
>
>
This is somewhat an extension to the feature request in 
https://github.com/freebsd/pkg/issues/697

I will take a look before 1.3 release to see if disabling cache for 
file:// is straight forward. We're in a feature freeze right now so I 
don't want to introduce too much risk.

-- 
Regards,
Bryan Drewery



More information about the freebsd-stable mailing list