Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jul 2023 09:22:29 -0400
From:      "Naman Sood" <mail@nsood.in>
To:        "Baptiste Daroussin" <bapt@freebsd.org>
Cc:        freebsd-pkg@freebsd.org
Subject:   Re: Why did pkg delete mysql80-server here?
Message-ID:  <a4ae2441-2017-4ef6-b17b-e47182854a47@app.fastmail.com>
In-Reply-To:  <2tt66xyidpyk6cxqstovqzwklp5zq6y74rfv3pzsceoptrp7ju@ubhtobnmhew2>
References:  <d7bd4b00-b0d4-4d2c-999b-dae183effa1e@app.fastmail.com> <2tt66xyidpyk6cxqstovqzwklp5zq6y74rfv3pzsceoptrp7ju@ubhtobnmhew2>

next in thread | previous in thread | raw e-mail | index | archive | help
--4d599fa243a6486c9abba7fd229cf746
Content-Type: text/plain

Unfortunately I did hit y instead of N, so I've lost that information for now. If this happens again, I'll come back with this info. Thanks!

Thanks,
Naman.
(they/them)

On Thu, Jul 20, 2023, at 05:18, Baptiste Daroussin wrote:
> On Wed, Jul 19, 2023 at 07:07:34PM -0400, Naman Sood wrote:
> > Hi,
> > 
> > I just started using FreeBSD 13.2 for a personal storage server. I had this extremely surprising interaction with pkg today:
> > 
> > nsood@silicon:~ % sudo pkg install rclone
> > Password:
> > Updating FreeBSD repository catalogue...
> > Fetching packagesite.pkg: 100%    7 MiB 465.6kB/s    00:15    
> > Processing entries: 100%
> > FreeBSD repository update completed. 33793 packages processed.
> > All repositories are up to date.
> > New version of pkg detected; it needs to be installed first.
> > The following 1 package(s) will be affected (of 0 checked):
> > 
> > Installed packages to be UPGRADED:
> >         pkg: 1.19.1_1 -> 1.19.2
> > 
> > Number of packages to be upgraded: 1
> > 
> > 8 MiB to be downloaded.
> > 
> > Proceed with this action? [y/N]: y
> > [1/1] Fetching pkg-1.19.2.pkg: 100%    8 MiB   1.7MB/s    00:05    
> > Checking integrity... done (0 conflicting)
> > [1/1] Upgrading pkg from 1.19.1_1 to 1.19.2...
> > [1/1] Extracting pkg-1.19.2: 100%
> > Updating FreeBSD repository catalogue...
> > FreeBSD repository is up to date.
> > All repositories are up to date.
> > The following 2 package(s) will be affected (of 0 checked):
> > 
> > Installed packages to be REMOVED:
> >         mysql80-server: 8.0.32
> > 
> > New packages to be INSTALLED:
> >         rclone: 1.62.2
> > 
> > Number of packages to be removed: 1
> > Number of packages to be installed: 1
> > 
> > The operation will free 138 MiB.
> > 12 MiB to be downloaded.
> > 
> > Proceed with this action? [y/N]: y
> > [1/1] Fetching rclone-1.62.2.pkg: 100%   12 MiB   3.1MB/s    00:04    
> > Checking integrity... done (0 conflicting)
> > [1/2] Deinstalling mysql80-server-8.0.32...
> > [1/2] Deleting files for mysql80-server-8.0.32: 100%
> > ==> You should manually remove the "mysql" user. 
> > ==> You should manually remove the "mysql" group 
> > [2/2] Installing rclone-1.62.2...
> > [2/2] Extracting rclone-1.62.2: 100%
> > You may need to manually remove /usr/local/etc/mysql/my.cnf if it is no longer needed.
> > 
> > It's definitely on me to have not read the message carefully before saying yes, but also extremely unintuitive that installing rclone, presumably an unrelated package, caused mysql80-server to be uninstalled. Reinstalling mysql80-server worked fine, and did not remove rclone, so it wasn't a package conflict. Thankfully the mysqld process in memory kept running while I reinstalled the package so I did not experience any downtime, but I would still like to avoid a heart attack in the future. So can someone explained what I did wrong here that caused mysql80-server to be uninstalled?
> > 
> > Thanks,
> > Naman.
> > (they/them)
> > 
> 
> Very hard to determine, without the debug output, somehow the solver considered
> there was a conflict in the process.
> 
> Partial update (aka installing something on a new repo without upgrading all the
> packages at once) is fragile, and pkg needs to become more robust here.
> 
> I don't know what is the best here, before we were forbidding it and forcing the
> user to update everything. but this was not convenient for plenty of users as
> most of the time it works as expected.
> 
> So yes this a bug on pkg side, usually hard to debug when it happens, if you
> have a reproducible way to make it happen I will be more han happy if you can
> provide me your /var/db/pkg (the whole thing if you hit N instead of y).
> 
> I will then be able to reproduce locally and try to fix.
> 
> Another way to help me is when it happens, hit N and rerun with pkg -o
> DEBUG_LEVEL=4 which will be very verbose and provide me the output so I can
> analyze.
> 
> Best regards,
> Bapt
> 
--4d599fa243a6486c9abba7fd229cf746
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html><html><head><title></title><style type=3D"text/css">p.Mso=
Normal,p.MsoNoSpacing{margin:0}</style></head><body><div>Unfortunately I=
 did hit y instead of N, so I've lost that information for now. If this =
happens again, I'll come back with this info. Thanks!</div><div><br></di=
v><div id=3D"sig128512984"><div class=3D"signature">Thanks,<br></div><di=
v class=3D"signature">Naman.<br></div><div class=3D"signature">(they/the=
m)<br></div></div><div><br></div><div>On Thu, Jul 20, 2023, at 05:18, Ba=
ptiste Daroussin wrote:<br></div><blockquote type=3D"cite" id=3D"qt" sty=
le=3D""><div>On Wed, Jul 19, 2023 at 07:07:34PM -0400, Naman Sood wrote:=
<br></div><div>&gt; Hi,<br></div><div>&gt;&nbsp;<br></div><div>&gt; I ju=
st started using FreeBSD 13.2 for a personal storage server. I had this =
extremely surprising interaction with pkg today:<br></div><div>&gt;&nbsp=
;<br></div><div>&gt; nsood@silicon:~ % sudo pkg install rclone<br></div>=
<div>&gt; Password:<br></div><div>&gt; Updating FreeBSD repository catal=
ogue...<br></div><div>&gt; Fetching packagesite.pkg: 100%&nbsp;&nbsp;&nb=
sp; 7 MiB 465.6kB/s&nbsp;&nbsp;&nbsp; 00:15&nbsp;&nbsp;&nbsp;&nbsp;<br><=
/div><div>&gt; Processing entries: 100%<br></div><div>&gt; FreeBSD repos=
itory update completed. 33793 packages processed.<br></div><div>&gt; All=
 repositories are up to date.<br></div><div>&gt; New version of pkg dete=
cted; it needs to be installed first.<br></div><div>&gt; The following 1=
 package(s) will be affected (of 0 checked):<br></div><div>&gt;&nbsp;<br=
></div><div>&gt; Installed packages to be UPGRADED:<br></div><div>&gt;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pkg: 1.19.1_1 -&gt; 1.19.=
2<br></div><div>&gt;&nbsp;<br></div><div>&gt; Number of packages to be u=
pgraded: 1<br></div><div>&gt;&nbsp;<br></div><div>&gt; 8 MiB to be downl=
oaded.<br></div><div>&gt;&nbsp;<br></div><div>&gt; Proceed with this act=
ion? [y/N]: y<br></div><div>&gt; [1/1] Fetching pkg-1.19.2.pkg: 100%&nbs=
p;&nbsp;&nbsp; 8 MiB&nbsp;&nbsp; 1.7MB/s&nbsp;&nbsp;&nbsp; 00:05&nbsp;&n=
bsp;&nbsp;&nbsp;<br></div><div>&gt; Checking integrity... done (0 confli=
cting)<br></div><div>&gt; [1/1] Upgrading pkg from 1.19.1_1 to 1.19.2...=
<br></div><div>&gt; [1/1] Extracting pkg-1.19.2: 100%<br></div><div>&gt;=
 Updating FreeBSD repository catalogue...<br></div><div>&gt; FreeBSD rep=
ository is up to date.<br></div><div>&gt; All repositories are up to dat=
e.<br></div><div>&gt; The following 2 package(s) will be affected (of 0 =
checked):<br></div><div>&gt;&nbsp;<br></div><div>&gt; Installed packages=
 to be REMOVED:<br></div><div>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp; mysql80-server: 8.0.32<br></div><div>&gt;&nbsp;<br></div><div=
>&gt; New packages to be INSTALLED:<br></div><div>&gt;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rclone: 1.62.2<br></div><div>&gt;&nbsp;<b=
r></div><div>&gt; Number of packages to be removed: 1<br></div><div>&gt;=
 Number of packages to be installed: 1<br></div><div>&gt;&nbsp;<br></div=
><div>&gt; The operation will free 138 MiB.<br></div><div>&gt; 12 MiB to=
 be downloaded.<br></div><div>&gt;&nbsp;<br></div><div>&gt; Proceed with=
 this action? [y/N]: y<br></div><div>&gt; [1/1] Fetching rclone-1.62.2.p=
kg: 100%&nbsp;&nbsp; 12 MiB&nbsp;&nbsp; 3.1MB/s&nbsp;&nbsp;&nbsp; 00:04&=
nbsp;&nbsp;&nbsp;&nbsp;<br></div><div>&gt; Checking integrity... done (0=
 conflicting)<br></div><div>&gt; [1/2] Deinstalling mysql80-server-8.0.3=
2...<br></div><div>&gt; [1/2] Deleting files for mysql80-server-8.0.32: =
100%<br></div><div>&gt; =3D=3D&gt; You should manually remove the "mysql=
" user.&nbsp;<br></div><div>&gt; =3D=3D&gt; You should manually remove t=
he "mysql" group&nbsp;<br></div><div>&gt; [2/2] Installing rclone-1.62.2=
...<br></div><div>&gt; [2/2] Extracting rclone-1.62.2: 100%<br></div><di=
v>&gt; You may need to manually remove /usr/local/etc/mysql/my.cnf if it=
 is no longer needed.<br></div><div>&gt;&nbsp;<br></div><div>&gt; It's d=
efinitely on me to have not read the message carefully before saying yes=
, but also extremely unintuitive that installing rclone, presumably an u=
nrelated package, caused mysql80-server to be uninstalled. Reinstalling =
mysql80-server worked fine, and did not remove rclone, so it wasn't a pa=
ckage conflict. Thankfully the mysqld process in memory kept running whi=
le I reinstalled the package so I did not experience any downtime, but I=
 would still like to avoid a heart attack in the future. So can someone =
explained what I did wrong here that caused mysql80-server to be uninsta=
lled?<br></div><div>&gt;&nbsp;<br></div><div>&gt; Thanks,<br></div><div>=
&gt; Naman.<br></div><div>&gt; (they/them)<br></div><div>&gt;&nbsp;<br><=
/div><div><br></div><div>Very hard to determine, without the debug outpu=
t, somehow the solver considered<br></div><div>there was a conflict in t=
he process.<br></div><div><br></div><div>Partial update (aka installing =
something on a new repo without upgrading all the<br></div><div>packages=
 at once) is fragile, and pkg needs to become more robust here.<br></div=
><div><br></div><div>I don't know what is the best here, before we were =
forbidding it and forcing the<br></div><div>user to update everything. b=
ut this was not convenient for plenty of users as<br></div><div>most of =
the time it works as expected.<br></div><div><br></div><div>So yes this =
a bug on pkg side, usually hard to debug when it happens, if you<br></di=
v><div>have a reproducible way to make it happen I will be more han happ=
y if you can<br></div><div>provide me your /var/db/pkg (the whole thing =
if you hit N instead of y).<br></div><div><br></div><div>I will then be =
able to reproduce locally and try to fix.<br></div><div><br></div><div>A=
nother way to help me is when it happens, hit N and rerun with pkg -o<br=
></div><div>DEBUG_LEVEL=3D4 which will be very verbose and provide me th=
e output so I can<br></div><div>analyze.<br></div><div><br></div><div>Be=
st regards,<br></div><div>Bapt<br></div><div><br></div></blockquote></bo=
dy></html>
--4d599fa243a6486c9abba7fd229cf746--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a4ae2441-2017-4ef6-b17b-e47182854a47>