Date: Wed, 28 Jun 2000 14:33:42 +0200 (CEST) From: Alexander Leidinger <Alexander@Leidinger.net> To: leifn@neland.dk Cc: schuerge@wjpserver.CS.Uni-SB.DE, freebsd-current@FreeBSD.ORG Subject: Re: Check for ports updates Message-ID: <200006281233.OAA68885@Magelan.Leidinger.net> In-Reply-To: <Pine.BSF.4.05.10006281128190.559-100000@arnold.neland.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <progname> <version_old> <version_new> # yes, I know it's ugly if [ ! $3 ]; then echo "$0 <name> <oldver> <newver>" 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200006281233.OAA68885>