Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Feb 2025 00:44:50 +0100
From:      Michael Gmelin <grembo@freebsd.org>
To:        Kevin Oberman <rkoberman@gmail.com>
Cc:        FreeBSD Ports ML <freebsd-ports@freebsd.org>
Subject:   Re: pkg upgrade foot shooting
Message-ID:  <E299CC76-54C0-42A9-A40F-6FE252ED44C9@freebsd.org>
In-Reply-To: <A9903709-0059-4465-8865-27477FE864D8@freebsd.org>
References:  <A9903709-0059-4465-8865-27477FE864D8@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail-75D9F5E0-B6F4-4D4B-9CC9-990A45F57E4C
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable



> On 13. Feb 2025, at 00:34, Michael Gmelin <grembo@freebsd.org> wrote:
>=20
> =EF=BB=BF
>=20
>=20
>>> On 13. Feb 2025, at 00:29, Kevin Oberman <rkoberman@gmail.com> wrote:
>>>=20
>> =EF=BB=BF
>> In my upgrade of pkg this morning, I shot myself in the foot. I inadverte=
ntly killed the update while it was installing the new version, leaving my p=
kg database all messed up, or at least the entry for pkg is. I have a clean b=
ackup of pkg.sql.xz, but I can't figure out how to restore it.
>>=20
>> Any pkg command gets:
>> The package management tool is not yet installed on your system.
>> Do you want to fetch and install it now? [y/N]:
>> but trying to do so gets:  the most recent version of pkg-2.0.5 is alread=
y installed
>>=20
>> Any idea of what I can do to get a working pkg? I'd like to just blow awa=
y the current database and then bootstrap pkg. I'm just not sure of what to d=
elete. I know there is a sqlite db somewhere. I've rummaged around in it in h=
te past, but it's been years and I can't seem to find it.
>>=20
>> Any clue as to how to get pkg reinstalled would be much appreciated.
>=20
> Does this help? https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D269810=
#c4
>=20
> -m

p.s. package database files (repo and installed packages) are in /var/db/pkg=




--Apple-Mail-75D9F5E0-B6F4-4D4B-9CC9-990A45F57E4C
Content-Type: text/html;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=3D=
utf-8"></head><body dir=3D"auto"><div dir=3D"ltr"></div><div dir=3D"ltr"><br=
></div><div dir=3D"ltr"><br><div dir=3D"ltr"></div><div dir=3D"ltr"></div><b=
lockquote type=3D"cite">On 13. Feb 2025, at 00:34, Michael Gmelin &lt;grembo=
@freebsd.org&gt; wrote:<br><br></blockquote></div><blockquote type=3D"cite">=
<div dir=3D"ltr">=EF=BB=BF<meta http-equiv=3D"content-type" content=3D"text/=
html; charset=3Dutf-8"><div dir=3D"ltr"></div><div dir=3D"ltr"><br></div><di=
v dir=3D"ltr"><br><div dir=3D"ltr"></div><blockquote type=3D"cite">On 13. Fe=
b 2025, at 00:29, Kevin Oberman &lt;rkoberman@gmail.com&gt; wrote:<br><br></=
blockquote></div><blockquote type=3D"cite"><div dir=3D"ltr">=EF=BB=BF<div di=
r=3D"ltr"><div><div style=3D"font-family:tahoma,sans-serif;font-size:small" c=
lass=3D"gmail_default">In my upgrade of pkg this morning, I shot myself in t=
he foot. I inadvertently killed the update while it was installing the new v=
ersion, leaving my pkg database all messed up, or at least the entry for pkg=
 is. I have a clean backup of pkg.sql.xz, but I can't figure out how to rest=
ore it.</div><div style=3D"font-family:tahoma,sans-serif;font-size:small" cl=
ass=3D"gmail_default"><br></div><div style=3D"font-family:tahoma,sans-serif;=
font-size:small" class=3D"gmail_default">Any pkg command gets:</div><div sty=
le=3D"font-family:tahoma,sans-serif;font-size:small" class=3D"gmail_default"=
>The package management tool is not yet installed on your system.<br>Do you w=
ant to fetch and install it now? [y/N]:</div></div><div style=3D"font-family=
:tahoma,sans-serif;font-size:small" class=3D"gmail_default">but trying to do=
 so gets:&nbsp; the most recent version of pkg-2.0.5 is already installed</d=
iv><div style=3D"font-family:tahoma,sans-serif;font-size:small" class=3D"gma=
il_default"><br></div><div style=3D"font-family:tahoma,sans-serif;font-size:=
small" class=3D"gmail_default">Any idea of what I can do to get a working pk=
g? I'd like to just blow away the current database and then bootstrap pkg. I=
'm just not sure of what to delete. I know there is a sqlite db somewhere. I=
've rummaged around in it in hte past, but it's been years and I can't seem t=
o find it.</div><div><br></div><div><div style=3D"font-family:tahoma,sans-se=
rif;font-size:small" class=3D"gmail_default">Any clue as to how to get pkg r=
einstalled would be much appreciated.</div></div></div>
</div></blockquote><br><div>Does this help?&nbsp;<a href=3D"https://bugs.fre=
ebsd.org/bugzilla/show_bug.cgi?id=3D269810#c4">https://bugs.freebsd.org/bugz=
illa/show_bug.cgi?id=3D269810#c4</a></div><div><br></div><div>-m</div></div>=
</blockquote><div><br></div><div>p.s. package database files (repo and insta=
lled packages) are in /var/db/pkg</div><div><br></div><div><br></div></body>=
</html>=

--Apple-Mail-75D9F5E0-B6F4-4D4B-9CC9-990A45F57E4C--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E299CC76-54C0-42A9-A40F-6FE252ED44C9>