Date: Wed, 28 Jun 2000 15:13:43 +0200 (CEST) From: Leif Neland <leifn@neland.dk> To: Alexander Leidinger <Alexander@Leidinger.net> Cc: schuerge@wjpserver.CS.Uni-SB.DE, freebsd-current@FreeBSD.ORG Subject: Re: Check for ports updates Message-ID: <Pine.BSF.4.05.10006281510170.27618-100000@arnold.neland.dk> In-Reply-To: <200006281233.OAA68885@Magelan.Leidinger.net>
index | next in thread | previous in thread | raw e-mail
Any reason not to put this into bsd.port.mk?
make update
On Wed, 28 Jun 2000, Alexander Leidinger wrote:
> 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.
>
>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.10006281510170.27618-100000>
