Question about packages installed via `pkg_add -r`

Yue Wu vanopen at gmail.com
Sun Mar 6 01:00:23 UTC 2011


Hello, sorry for poor English, I will try to explan clearer with my
best.

On Sat, Mar 05, 2011 at 04:48:17PM +0100, Greg Byshenk wrote:
> On Sat, Mar 05, 2011 at 11:04:36PM +0800, Yue Wu wrote:
>  
> > I'm trying to use package instead of ports these day, but a few
> > questions have:
> > 
> > 1. How to reserve packages that fetched via `pkg_add -r`?
> > 
> > 2. How to know if there are updates for packages, and how to update?
> 
> For (1), do you mean 'preserve', as in save a copy?  If so, then
> 'portmaster -b [...]' will save a backup copy of installed packages.

Yes, I mean 'preserve'. I've maned portmaster, seems -b is for a
installed package, so it will preserve it by packing up the files from a
installed package, why not preserve it just when fetching with `pkg_add
-r`? I think it's the best way, I don't like the portmaster way to do it
after.

> 
> There may be a better way, but one way to deal with (2) is to have an
> up-to-date ports tree. Then 'pkg_version -vL=' will show you which of
> your ports are out of date. Then 'portmaster -PP [...]' will force
> package use for updates.
> 
> If you have an up-to-date ports tree, then I think that
> 
> 	portmaster -abPP
> 
> will update all of your ports, using packages, and save a backup copy
> of the installed versions.

I'm trying to avoid to touch the port tree, it has 700+ MB...

On Sat, Mar 05, 2011 at 12:43:21PM -0800, Doug Barton wrote:
> On 03/05/2011 07:48, Greg Byshenk wrote:
> > On Sat, Mar 05, 2011 at 11:04:36PM +0800, Yue Wu wrote:
> >
> >> I'm trying to use package instead of ports these day, but a few
> >> questions have:
> >>
> >> 1. How to reserve packages that fetched via `pkg_add -r`?
> 
> Not sure what you're asking here, can you clarify?

Sorry, Greg has guessed it right ;p

> >> 2. How to know if there are updates for packages, and how to update?
> >
> > There may be a better way, but one way to deal with (2) is to have an
> > up-to-date ports tree. Then 'pkg_version -vL=' will show you which of
> > your ports are out of date. Then 'portmaster -PP [...]' will force
> > package use for updates.
> >
> > If you have an up-to-date ports tree, then I think that
> >
> > 	portmaster -abPP
> 
> The -PP option has to be by itself on the command line, or you can use 
> --packages-only.
> 
> However portmaster doesn't need a ports tree to operate on packages 
> only. You can use the --index-only --packages-only options and it'll 
> work just fine. You'll want to read the man page before getting started.
> 

Is it the only way? As I said above, I don't like portmaster's way, I
thought there might be a cmd package-update just like freebsd-update,
but seems it doesn't, even doesn't have a KISS way to know if there are
updates for packages.

-- 
Regards,
Yue Wu

Key Laboratory of Modern Chinese Medicines
Department of Traditional Chinese Medicine
China Pharmaceutical University
No.24, Tongjia Xiang Street, Nanjing 210009, China


More information about the freebsd-stable mailing list