From owner-freebsd-current Wed Jun 28 5:57:12 2000 Delivered-To: freebsd-current@freebsd.org Received: from mout1.freenet.de (mout1.freenet.de [194.97.50.132]) by hub.freebsd.org (Postfix) with ESMTP id 7046737B60B for ; Wed, 28 Jun 2000 05:57:03 -0700 (PDT) (envelope-from netchild@leidinger.net) Received: from [194.97.50.138] (helo=mx0.freenet.de) by mout1.freenet.de with esmtp (Exim 3.14 #3) id 137HOl-0007oc-00; Wed, 28 Jun 2000 14:56:59 +0200 Received: from [213.6.49.12] (helo=Magelan.Leidinger.net) by mx0.freenet.de with esmtp (Exim 3.14 #3) id 137HOk-0004VR-00; Wed, 28 Jun 2000 14:56:59 +0200 Received: from Leidinger.net (netchild@localhost [127.0.0.1]) by Magelan.Leidinger.net (8.9.3/8.9.3) with ESMTP id OAA68885; Wed, 28 Jun 2000 14:33:43 +0200 (CEST) (envelope-from netchild@Leidinger.net) Message-Id: <200006281233.OAA68885@Magelan.Leidinger.net> Date: Wed, 28 Jun 2000 14:33:42 +0200 (CEST) From: Alexander Leidinger Subject: Re: Check for ports updates To: leifn@neland.dk Cc: schuerge@wjpserver.CS.Uni-SB.DE, freebsd-current@FreeBSD.ORG In-Reply-To: MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 28 Jun, Leif Neland wrote: > The steps needed for upgrading a package (from ports) would be: > > make install > > append foo-1.1/+REQUIRED_BY to foo-1.2/+REQUIRED_BY > > traverse /var/db/pkg/* and remove foo-1.1/replace with foo-1.2 > > "subtract" foo-1.2/+CONTENT from foo-1.1/+CONTENT, only removing files > needed only in foo-1.1 > > remove /var/db/pkg/foo-1.1 cd /usr/ports/foo/bar make mv /var/db/pkg/bar-x.y.z/+REQUIRED_BY . pkg_delete bar-a.b.c make install mv +REQUIRED_BY /var/db/pkg/bar-d.e.f port_update.sh bar a.b.c d.e.f port_update.sh: ---snip--- #!/bin/sh # Syntax: port_update.sh # yes, I know it's ugly if [ ! $3 ]; then echo "$0 " exit 1 fi for i in `cat /var/db/pkg/${1}-${3}/+REQUIRED_BY`; do echo -n "Updating ${i}... " perl -npi -e "s:\@pkgdep\ ${1}\-${2}:\@pkgdep\ ${1}\-${3}:g" /var/db/pkg/${i}/+CONTENTS echo "done" done ---snip--- Lazy disclaimer: - works for me - I think I know what I'm doing here (and what the limitations are (e.g. bar == libxyz && libmajorversion(old) != libmajorversion(new))). Bye, Alexander. -- The best things in life are free, but the expensive ones are still worth a look. http://www.Leidinger.net Alexander+Home @ Leidinger.net GPG fingerprint = 7423 F3E6 3A7E B334 A9CC B10A 1F5F 130A A638 6E7E To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message