From owner-freebsd-stable@FreeBSD.ORG Sun Mar 6 01:00:23 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56FB6106566C for ; Sun, 6 Mar 2011 01:00:23 +0000 (UTC) (envelope-from vanopen@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0CA588FC16 for ; Sun, 6 Mar 2011 01:00:22 +0000 (UTC) Received: by yxl31 with SMTP id 31so1384130yxl.13 for ; Sat, 05 Mar 2011 17:00:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :organization:x-operating-system:user-agent; bh=jNf/gPQiH/eHsGuXdJtVAxVJGQ53kBYePqG03iWTAY0=; b=biJmJhK/sejqW75AXW5IUakXm0/I8sguaK70UPk6Si4oiNwyKO1lHw6QD+wiS04Sv9 zhwFHWLmx+FCEhVzEZ37eof0ctNkA68ddfOREgfblLuv+3eH8ZxdPRNuu0AsIGIWAW/C 2ZEgi0FwY84zSItfZMsPFXs0kKI2sBZvb4J/0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:organization :x-operating-system:user-agent; b=prGsBKvAABWu3N1qCQc8T2ehvTzRIf431z7TEukifhJmgRJXKyqyGrhONPlMv66MvC +a2tv3GTBmwpsoJ3t3cBGOyT0WAok1go/TUQxv2qWZaHJBA6IqyCBW9SxzUXrnls+hUU oRaMIIVEEO1Ep0RXI4/IWn6tPPWy89172FGIk= Received: by 10.146.219.42 with SMTP id r42mr3350367yag.37.1299373222163; Sat, 05 Mar 2011 17:00:22 -0800 (PST) Received: from fbsd.t60.cpu ([221.6.39.130]) by mx.google.com with ESMTPS id f10sm1490896anh.25.2011.03.05.17.00.20 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 05 Mar 2011 17:00:21 -0800 (PST) Date: Sun, 6 Mar 2011 09:00:15 +0800 From: Yue Wu To: ml-freebsd-stable Message-ID: <20110306010015.GC4160@fbsd.t60.cpu> References: <20110305150436.GA2175@fbsd.t60.cpu> <20110305154817.GQ30336@core.byshenk.net> <4D72A069.90104@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D72A069.90104@FreeBSD.org> Organization: China Pharmaceutical University, Nanjing, China X-Operating-System: FreeBSD 8.2-PRERELEASE i386 User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: Question about packages installed via `pkg_add -r` X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2011 01:00:23 -0000 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