From owner-freebsd-questions@FreeBSD.ORG Sat Apr 19 16:36:50 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9292DD93 for ; Sat, 19 Apr 2014 16:36:50 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.2 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2A1CC133B for ; Sat, 19 Apr 2014 16:36:50 +0000 (UTC) Received: from [192.168.0.143] ([95.91.231.152]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0Lu8Ri-1X2OJX1yOk-011Tf6; Sat, 19 Apr 2014 18:36:45 +0200 Message-ID: <5352A61C.50605@gmx.de> Date: Sat, 19 Apr 2014 18:36:44 +0200 From: "lokadamus@gmx.de" User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: nanotek , Matthew Seaman , freebsd-questions@freebsd.org Subject: Re: pkg don't recognize installed packages 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> In-Reply-To: <23536ebd-e406-4ac1-86e8-2d8cdde4857a@email.android.com> X-Provags-ID: V03:K0:LTAOw/QqSaz6N/Fdy+A7vyH1I6OlHW7oaX4NDpoDJ8m7XKiuSlO /QRfUD4u9uZ8BX0kTQamUUi9vh9FqpdohyqNX6nyY3jylpbmTUxe/XrrWPzve40IqCcWeow 6C5D76FFQyVFUtEhtqIuJ2RCohzSrs9zFVnzR7yf5HwRwfU7+rYiuFD+ZL+zsb9zevDQ9vJ Z97QhBbECFs+dFq1SGbwA== Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Apr 2014 16:36:50 -0000 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 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.