Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 May 2012 20:18:34 -0500
From:      Stephen Montgomery-Smith <stephen@missouri.edu>
To:        Jason Hellenthal <jhellenthal@dataix.net>
Cc:        ports@freebsd.org, Robert Huff <roberthuff@rcn.com>
Subject:   Re: problem running pkg_delete
Message-ID:  <4FAF0BEA.9040408@missouri.edu>
In-Reply-To: <20120513010619.GA6515@DataIX.net>
References:  <20398.43728.425481.287491@jerusalem.litteratus.org> <4FAEF150.5070202@missouri.edu> <4FAEF2E0.50806@missouri.edu> <20120513010619.GA6515@DataIX.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 05/12/2012 08:06 PM, Jason Hellenthal wrote:
>
>
> On Sat, May 12, 2012 at 06:31:44PM -0500, Stephen Montgomery-Smith wrote:
>> On 05/12/2012 06:25 PM, Stephen Montgomery-Smith wrote:
>>> On 05/12/2012 01:24 PM, Robert Huff wrote:
>>>>
>>>> Suddenly I'm getting:
>>>>
>>>> pkg_delete: the package info for package "Source" is corrupt
>>>>
>>>> Any ideas?
>>>
>>> Is it possible that you created a directory by accident inside
>>> /var/db/pkg called "Source"?
>>
>> Also, I am trying to look through the source code in pkg_delete to see
>> what could have created this message.  As best as I can tell, this
>> message must have been created by the function matchallbyorigin in
>> /usr/src/usr.sbin/pkg_install/lib/match.c which was called by the
>> function pkg_do in /usr/src/usr.sbin/pkg_install/delete/perform.c.  The
>> source code for pkg_do contains the disclaimer "This is seriously ugly
>> code following.  Written very fast!"
>>
>> Do you remember at all the command you typed that created this message?
>>
>
> You would probably get the same message from:
> mkdir /var/db/pkg/Source
> pkg_delete Source
>
> Try it out!

I did think of this.  But this creates the error message:

pkg_delete: the package info for package 'Source' is corrupt (use -f to 
force removal)

and is generated from within pkg_do in 
/usr/src/usr.sbin/pkg_install/delete/perform.c

This has the additional part to the message "(use -f to force removal)" 
which the OP did not report.  And if you look at the source, you will 
see that it has to have some kind of additional message, the other 
possibility being "(but I'll delete it anyway)".  But maybe the OP 
forgot to report this.




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