Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Apr 2014 18:36:44 +0200
From:      "lokadamus@gmx.de" <lokadamus@gmx.de>
To:        nanotek <nanotek@bsdbox.co>,  Matthew Seaman <m.seaman@infracaninophile.co.uk>, freebsd-questions@freebsd.org
Subject:   Re: pkg don't recognize installed packages
Message-ID:  <5352A61C.50605@gmx.de>
In-Reply-To: <23536ebd-e406-4ac1-86e8-2d8cdde4857a@email.android.com>
References:  <53514A68.806@gmx.de> <535153CC.5050000@infracaninophile.co.uk> <53515A87.8010307@gmx.de> <5351769B.6080209@infracaninophile.co.uk> <23536ebd-e406-4ac1-86e8-2d8cdde4857a@email.android.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 04/19/14 05:29, nanotek wrote:

> Perhaps a more important question is: What problems with local.sqlite were you having that made it necessary to delete? Backups notwithstanding, surely database repopulation should be possible without reinstalling all ports.

Atfer update pkg don't show me anything.

A "pkg upgrade" gave me nothing as output. So i looked in /var/db.

Size of /var/db/local.sqlite was 800kb or 8mb.

So i kicked it an i get output, that no port was installed. This was more as before.

In the past, portmaster was able to working without a db, so my hope was, that portmaster can repopulate it.

I think, sometimes pkg and portmaster have some problems with each other.
Portmaster says all updated and pkg upgrade says, that something was change and need a new installation of an older
port, binary.

This is just a desktop system, so it is no great problem to make a new installation.

On 19 April 2014 5:01:47 am AEST, Matthew Seaman <m.seaman@infracaninophile.co.uk> wrote:

>     On 18/04/2014 18:01, lokadamus@gmx.de wrote:
>
>         System is 10.0-RELEASE-p1 (clean install in january) and last
>         week all was working fine. In december i had trouble with
>         /var/db/pkg/local.sqlite and had to remove it for a new one.
>         This time this way isn't working. It creates a new
>         local.sqlite, but dosn't recognize installed programs. 
>
>
>     Right.  This is obviously relevant information you might have considered
>     including in your original posting.
>
>         Is there a command that pkg will reread all installed ports?
>         Or can portmaster do this? 
>
>
>     local.sqlite is *the* database of installed packages.  If you destroy
>     it, there's nowhere else
>     pkg(8) can get the information about what
>     packages are already installed.  That's why there are periodic jobs to
>     take a backup each night, which you might find in /var/backups.
>     Hopefully it hasn't been so long that there is still useful data
>     preserved there.
>
>     Failing that, you will need to reinstall all your packages to repopulate
>     your package database.
>
>     Today's lesson is this: deleting the package database is not a good
>     idea.  Two seconds to do, hours if not days to recover and forever
>     afterwards to regret.
>
When nothing will be shown with pkg info, pkg upgrade or portmaster -L, then i think,

is the database useless.

To repair this database can take more time as make a new installation.

Its just a desktop system.

>
>       Cheers,
>
>       Matthew
>
>
> -- 
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>
>
Sorry, i know my english is not so good. :(

Best regards.




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