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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message