removing non-existent ports from /var/db/pkg ?
Matthew Seaman
m.seaman at infracaninophile.co.uk
Tue Oct 2 17:48:03 UTC 2012
On 02/10/2012 12:38, Jamie Paul Griffin wrote:
> [ Matthew Seaman wrote on Tue 2.Oct'12 at 12:13:05 +0100 ]
>
>
>> At the moment, the only way to clear up is to manually remove the
>> outdated subdirectories from /var/db/ports. You can work out what is
>> out of date by comparing the list of sub-dirs to the list of installed
>> ports obtained by
>>
>> pkg info -aq
>>
>> Should only take a few minutes to write a small script to do that.
>>
>> Be careful not to trash local.sqlite, repo.sqlite or auditfile -- in
>> fact, anything in /var/db/pkg which is not a directory should be preserved.
>>
>> Note: even if you do delete subdirs that are actually still in use, this
>> shouldn't be a huge disaster. The only data still in those directories
>> will be portmaster's cache of distfile info (which it can cope without:
>> it uses it to efficiently identify old distfiles that can themselves be
>> tidied up) and flag files like +IGNOREME which you will want to
>> regenerate before you next do a ports update.
>
> Ok, thanks for clarifying that for us. Very much appreciated.
I just committed this: http://git.io/G2qIIg
Which makes the patch compatible with portmaster-3.14 and also now makes
portmaster remove superfluous subdirectories of $PKG_DBDIR when removing
any packages. This should keep $PKG_DBDIR reasonably tidy going
forwards, but it won't clean up all of the existing problem subdirs.
For that you'll need a one-off job to clean up as described above.
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matthew at infracaninophile.co.uk Kent, CT11 9PW
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 264 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20121002/e4a2cc9e/signature.pgp
More information about the freebsd-ports
mailing list