Subject: Re: pkg_delete or not delete
To: None <karol.marchewka@hoga.pl>
From: Alistair Crooks <agc@pkgsrc.org>
List: netbsd-users
Date: 11/11/2004 23:13:39
On Thu, Nov 11, 2004 at 10:15:01AM +0000, karol.marchewka@hoga.pl wrote:
> On Thu, Nov 11, 2004 at 10:06:20AM +0100, Zafer Aydogan wrote:
> > Hej Newsgroup, 
> > 
> > Today, I encountered with this phenomenon:
> > 
> > # pkg_delete pkg_install-20041101
> > Package `pkg_install-20041101' is marked as not for deletion
> > 
> > # pkg_delete -f pkg_install-20041101
> > Package `pkg_install-20041101' is marked as not for deletion
> > 
> > Huh?
> > 
> > This happened while updating pkg_install. 
> > I must have installed pkg_install twice yesterday, which means that one is
> > left, which leads to fail installing the new version.
> > 
> > As you can see, I can't delete the left over one. :/
> > 
> > Any Ideas?
> > 
> > Best Regards, Zafer.
> 
> I have the same problem :/

Well, unless you're bootstrapping (in which case, there's a small
shell script to do the necessary pkg_create(1) work), what's going to
happen once you've deinstalled the old package? How will you be able
to register the newly-installed package without a pkg_create binary?

However, if you really, really, really, really, really know what
you're doing, then take note of this text from pkg_delete(1):

     If a package has been marked as a preserved package, it will not be able
     to be deleted (unless more than one occurrence of the -f option is
     given).

Regards,
Alistair