(proposal) new flag for pkg_delete

David Taylor davidt at yadt.co.uk
Wed Sep 3 07:55:36 PDT 2003


On Wed, 03 Sep 2003, Will Andrews wrote:

> On Wed, Sep 03, 2003 at 03:39:48PM +0100, David Taylor wrote:
> > It fails to mention that if -f is specified it will also delete any files
> > where the MD5 checksum is incorrect.  I have now been repeatedly bitten by
> > portupgrade wiping my configuration information because it specifies -f
> > (as it must, in order to remove packages which are still 'in use' by other
> > packages).
> 
> Wrong way to fix the problem.  Make the ports install sample
> config files and only add those to the plist, not the actual ones.

I agree that ports should be fixed to install config files in the correct
way.

However, pkg_delete is still broken -- either the manpage should be fixed
to make it explicitly clear that using -f will result in MD5 checksums
being ignored, or the user should be given the option.

Since portupgrade _needs_ to ignore dependencies, it currently has to use
the -f flag.  It has no reason to delete files that the user has modified,
unless it is asked to.

It may not be the correct solution to the problem I mentioned, but it is a
quick workaround that will prevent my config files being wiped when I run
portupgrade, at least until all the ports are fixed -- which could take a
while -- I submitted a patch to the (now ex, I think) maintainer of innd,
but it was never committed, and became out of date.

It is also a solution to a real problem -- there is no way to override
package dependencies without also overriding MD5 checksums.

I was originally intending to attach a patch, but after looking at the
code it appears it will not be as clean and as straightforward as I had
hoped, so I am attempting to confirm it is a desired feature before doing
the work.

If it is decided it is not wanted, I will probably end up creating a quick
hack for my own use anyway.

-- 
David Taylor
davidt at yadt.co.uk
"The future just ain't what it used to be"


More information about the freebsd-arch mailing list