From nobody Wed Aug 31 07:33:08 2022 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MHbWC4S8Nz4bT98 for ; Wed, 31 Aug 2022 07:33:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MHbWC3PNjz3kYX; Wed, 31 Aug 2022 07:33:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661931191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zNKIyd2YkZryaPDcQRkgishAHO60OEyNALfFKIeENHs=; b=vPjg5QtqiiYUQxMWwFiRMTsskTtFLvRtrsuFsamEI4CpuNDxwDFyvNpQVOJLsTfU7dZSq9 VVALjmW30DDJtMfb5y8R8IesoHOek+Gw/JDPm29h3wUf4lKEkoxKfBr7W4OIqDfgc9xSAb wkfEBWH4XxWlTycELhg4poXvt8YRllZ70+kuGu1YTD5ZRlhLcMRr/PfwyuEgZlobODOC+7 eJTggTHhUe97Mi8ATyX6SwonvT70o6ITYXxGG1aYrPYqzbusfPw3NJ0Kxy3nZyCcf38oGT ryl6bHSk4qP7wM1Z53v901g6+Bcj/SHkvFt2Ddkf85qQryQnxdScOYFidHpiwA== Received: from aniel.nours.eu (nours.eu [IPv6:2001:41d0:8:3a4d::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 4MHbWC1fT3z1RQx; Wed, 31 Aug 2022 07:33:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id EC1E09BA03; Wed, 31 Aug 2022 09:33:08 +0200 (CEST) Date: Wed, 31 Aug 2022 09:33:08 +0200 From: Baptiste Daroussin To: Kevin Oberman Cc: FreeBSD Ports ML Subject: Re: Recover from a corrupt pkg DB Message-ID: <20220831073308.axcqj6nvunq64bg2@aniel.nours.eu> References: List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661931191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zNKIyd2YkZryaPDcQRkgishAHO60OEyNALfFKIeENHs=; b=gyjFAEmxBJD6bCXFhIpxV51y0SQvHBYplVpAoQSkOxUzvTumcU6ms0M/o/ZBKVJziF7UUe ufdo2ZYNxbvSuX44Qhg4e5nwhKy3wuYKp+OiUpq20GjniodbRN0TbOaklTY7uqwU7jGZKQ 5cKEZd7LCaW5ou0PqSsX8W79hb8kUxgq66z/VbpwaerDpWTTDWg0q78FBOxoaY6G2vwUVr Fv+rB78y4YJo3PVP+5yT8dG+EX+8Dyj/3upoMBIPbQDdxmnxRccUjhKFa5eiCl7lrPhknm G9+A8mTHDiAtGbbY+Yt/7DljcN1FP5L5mpflgXUQK/Y5AC46SqsjQqW1cr9LKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661931191; a=rsa-sha256; cv=none; b=GQ9Jz2L0jYfNGs2pQ6MoIi747Wf0U1QYEEpu39uqKdWgpL1mKsEU8DrgUNBoAqWCmPCwQA cJqWiteGGDh2iv5jL+wzRWe/JfwN4H4N7wNYFe5y7750rBt0MMhvurls30evADR+sHTQj5 Ewxw0gO7yAnfmDNgMWQVfR+/I3MwgsADy74+74ACG7+Rs+qV6j3WQsek7T8d0vfPYluM4q 5cHPEBeMGitjv7v8tyCXwl3tnG0bFCFDYV8oq/xjSbSyTfhaF2Ogvco3g0CYQbZm7QyqVg 2FCjXOzG+mQiqhKQFETk0DxURrW+fjOCBB2FtDJ3AkUWnInjYYF6Fdwyp1YByw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On Tue, Aug 30, 2022 at 09:36:52AM -0700, Kevin Oberman wrote: > I had a crash while building ffmpeg on a new system. The build had not > begun, so I don't think ffmpeg is really an issue. portmaster(8) was > walking the dependency tree when the system panicked and, after a reboot > and full fsck, I get the error: > pkg: sqlite error while executing PRAGMA user_version; in file > pkgdb.c:2357: database disk image is malformed > > Is there any way to rebuild the DB or, if not, how do I remove it and start > from scratch? rm /var/db/pkg/local.sqlite xzcat /var/backups/pkg.sql.xz | pkg shell Best regards, Bapt