Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jan 2000 21:26:46 -0800 (PST)
From:      "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net>
To:        peter.jeremy@alcatel.com.au (Peter Jeremy)
Cc:        cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/usr.sbin/pkg_install/delete perform.c
Message-ID:  <200001130526.VAA31039@gndrsh.dnsmgr.net>
In-Reply-To: <00Jan13.075634est.40339@border.alcanet.com.au> from Peter Jeremy at "Jan 13, 2000 07:56:32 am"

next in thread | previous in thread | raw e-mail | index | archive | help
> On 2000-Jan-13 05:30:53 +1100, "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net> wrote:
> >Actually a better modification is to stop using the version of the
> >name of the directory all togeather and store it inside the directory,
> >one thing this would fix is installing over the top of an existing
> >port with a newer port and then pkg_delete of the older port leaving
> >you screwed up.  Or not pkg_delete the old port and leaving cruft/wrong
> >files around.
> 
> I presume you mean that pkg_install does something like:
> 1) Install files in the new port that don't already exist
> 2) Replace files that are updated by the new port
> 3) Leave files that no longer exist.

Thats one set of things that do happen.  Basically I think we have
2 classes of ``versions'' on ports.  Things like gated, zebra, mrtg,
ucd-snmp XFree86 etc that the version number is simply used to let
us know what it is.  You normally don't want 2 versions of these
things floating around.  

The other class, that you mentioned later, is things like tcl and tk
that I may need to have 2 versions of them installed at the same
time on the system.

My major gripe is with the first group of things.  First the ports
system will blindly let me pkg_add or ``make install'' gated-3.5.11
right over the top of gated-3.5.10, this can lead to your 1, 2 and 3
type problems above.

IMHO if the version number is not used by the package to prevent
file name space collision with other versions it does not belong
on the name of the directory in /var/db/pkg.  If the version does
(as in the case of tk80 vs tk82) have a path controlling decission
such that 1 2 and 3 above can not happen then it belongs on the
package name.  More accurately the pkg name looses the Makefile assigned
version portion when the /var/db/pkg directory is created.

> 
> This is still likely to leave un-needed cruft lying around (ie files
> that were part of the old port, no longer exist in the new port and
> are no longer necessary).  Unfortunately, I don't believe it's
> possible to automate the `remove no longer needed cruft' step, since
> the `no longer needed cruft' can depend on:

You need to pkg_delete the old version before installing the new version
and it fixes all of these... the old version knows what all the old
cruft is!  

> I'm not sure what the correst behaviour should be.

Remove the version portion of the pkg name when creating /var/db/pkg/${dir}
and store it inside the dir as another file so you can still query it and
all will be fixed.


-- 
Rod Grimes - KD7CAX @ CN85sl - (RWG25)               rgrimes@gndrsh.dnsmgr.net


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001130526.VAA31039>