From owner-freebsd-questions@FreeBSD.ORG Mon Jun 19 15:08:45 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C93816A49E for ; Mon, 19 Jun 2006 15:08:45 +0000 (UTC) (envelope-from mikhailg@webanoide.org) Received: from overlord.navalradio.cl (overlord.navalradio.cl [201.236.67.146]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2D8543FCD for ; Mon, 19 Jun 2006 14:39:34 +0000 (GMT) (envelope-from mikhailg@webanoide.org) Received: from [192.168.0.4] (ppp110-20.lns1.hba1.internode.on.net [150.101.110.20]) (authenticated bits=0) by overlord.navalradio.cl (8.13.4/8.13.4) with ESMTP id k5JEdVdJ034270; Mon, 19 Jun 2006 10:39:34 -0400 (CLT) (envelope-from mikhailg@webanoide.org) Message-ID: <4496B716.7080505@webanoide.org> Date: Tue, 20 Jun 2006 00:39:18 +1000 From: Mikhail Goriachev Organization: Webanoide User-Agent: Thunderbird 1.5.0.4 (Macintosh/20060530) MIME-Version: 1.0 To: Lewis McLouth References: <44960EDC.2020906@mn.rr.com> In-Reply-To: <44960EDC.2020906@mn.rr.com> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-99.9 required=5.0 tests=AWL,USER_IN_WHITELIST autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on overlord.navalradio.cl Cc: freebsd-questions Subject: Re: pkgdb.db locked X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2006 15:08:45 -0000 Lewis McLouth wrote: > Hello. > > When I run the command pkgdb -Fu, I get the response > > [Rebuilding the pkgdb in /var/db/pkg ... can't convert > String into Integer: Cannot update the pkgdb!] > > I think I know where I goofed, so here's the story on my suspected mistake. > > I just upgraded from RELENG_5_4 to RELENG_6, which went fairly smooth. > I'm now upgrading my ports but I was foolish today and ran portupgrade > without first reading /usr/ports/UPDATING. I think this is the source > of my problem (as in, running the command. Of course not reading > UPDATING is another problem! but I don't need help with that). > So, I first ran > > portupgrade -arR > > portupgrade did not upgrade linux_base-8 and instead reported that it > was marked as IGNORE and to use linux_base-fc-4. So, I ran the commands > > cd /usr/ports/emulators/linux_base-8 > make deinstall > cd ../linux_base-fc-4 > make install clean > > This it did fine, but when I now try to run pkgdb -Fu, I get the > following output: > > [Rebuilding the pkgdb in /var/db/pkg ... can't convert > String into Integer: Cannot update the pkgdb!] > > I then read /usr/ports/UPDATING, saw that linux_base-8 was dropped and > replaced by linux_base-fc-4. > > So, I then did the suggested command. > > portupgrade -f -o emulators/linux_base-fc4 linux_base\* > > This produced > > [Rebuilding the pkgdb in /var/db/pkg ... [Rebuilding > the pkgdb in /var/db/pkg ... ** Database file locked. > Waiting. > ** Timeout. Lock looks dead. Remove it. > /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:261:in `origin': can't > convert String into Integer: Cannot update the pkgdb!] (PkgDB::DBError) > from /usr/local/lib/ruby/site_ruby/1.8/pkginfo.rb:178:in `origin' > from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:977:in `tsort_build' > from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:971:in `tsort_build' > from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:993:in `sort_build' > from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:997:in `sort_build!' > from /usr/local/sbin/portupgrade:705:in `main' > from /usr/local/lib/ruby/1.8/optparse.rb:815:in `initialize' > from /usr/local/sbin/portupgrade:216:in `main' > from /usr/local/sbin/portupgrade:2048 > > I've googled for the phrase 'pkgdb "Lock looks dead"' and various > combinations of the output hoping to learn how to unlock pkgdb.db but > with no luck. Plus, I cannot locate pkgdb.dg with > > ls -a /var/db/pkg > > My questions are: How do I remove the lock on pkgdb? Where does > pkgdb.db go when its locked? find does not locate it. I ran > > find / pkgdb.db | grep pkgdb.db > find: pkgdb.db: No such file or directory > > Also, if pkgdb.db was deleted, how do I rebuild the pkgdb.db? (pkgdb -f > does not rebuild pkgdb.db, I just checked) > > The output of uname -a and ls /var/db/pkg are attached. > > Any help would be appreciated. > Hi, I'm not an expert, but I'll chuck my 2c in this. I once had a disagreement with pkgdb myself. The conflict ended up by removing the contents of: /var/db/ports /var/db/pkg Before that, I deinstalled all packages though. After the cleansing session, I reinstalled all ports from scratch. pkgdb is happy now. The thing is, I only had around 10 packages installed, so rebuilding them wasn't an issue for me. For sure that was dirty but quick. Cheers, Mikhail. -- Mikhail Goriachev Webanoide Telephone: +61 (0)3 62252501 Mobile Phone: +61 (0)4 38255158 E-Mail: mikhailg@webanoide.org Web: http://www.webanoide.org PGP Key ID: 0x4E148A3B PGP Key Fingerprint: D96B 7C14 79A5 8824 B99D 9562 F50E 2F5D 4E14 8A3B