From nobody Thu Jul 20 09:18:25 2023 X-Original-To: freebsd-pkg@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 4R66Yb3F24z4nyYL for ; Thu, 20 Jul 2023 09:18:27 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 4R66Yb2kZVz41rn; Thu, 20 Jul 2023 09:18:27 +0000 (UTC) (envelope-from bapt@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689844707; 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=W4Qm1UHNxYp7S+R8Fmj9+Jlv1HFsfUVQnERl7JB+aZo=; b=MkGdAIfmJX8WnE3itl5NSY5Ct5OezQaDV9GMCWkD/NKgqYsty8vE9IBXgKka+Pdg2OtMYI CNg6SVdhJ52mone6wwG260lp5JE0svlntuBoQKbbry2R1WnWHKvU7i+sV68aK1vGXtCyKl f+JaxjxJketYhitCtzbkzCHvJghEwrJKnsj7Sv2EIMzuU/I0Sc2Fn5w0SkhHrltsplLHSb kwixwGjPGSwt2RulTk91o5MfAlFUfchNddIiWu6AE9by1Ods0ZoEorCDp1eQBgqJh1oNxP FTXDpK+C1l1c7rp0b/Bzr6NY8HHdXrjHQlxfYTcE5GK9Iu1vBVKKWhOwGCe7jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689844707; 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=W4Qm1UHNxYp7S+R8Fmj9+Jlv1HFsfUVQnERl7JB+aZo=; b=YJFMa+kJskqUVL2ztZWI45cS38VwgfLaXAMRBdJEKTDkE+LcuD/G13s7SRjcQv/8+4FtAB kEMLNfoQ7HBHL5pCqwLvoZBl6l2FyknPZ/pOS7T7GRIpPvgSr7BOXjyRIF0Tsv3F1ldJ4j q8QHDImdPuOuLThHoVf/m+QLp6lspYMf9FFQPOyQ/8eltAQO5NTB7LE6kOqx8a21EVkGOc 8KyqsZHN/NSum9v2VAHz8Hd2loE8tgOV60YCiKxL7hgLpHUWLjfzzI3+kdkClV0fZ2Bnc6 XBtgJGcAQxfLBUp7K4WD3tZVsH6n8xggr1Ma03aGWYIkQdNCahrW1D0EybXw/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689844707; a=rsa-sha256; cv=none; b=YnZt7kn4Iq5AC94eSj+tl4FjrhAsqL1KaBPKXd0MQlMQHjzGlZ1ZAerx+FikXdgYgzCGN9 v25sy58q5FF8/AFCRPn0SZ9L58b1uN8G7APJXIokcfDdF6J5zlL808B7XV6TVNtvxEhQF7 LaCiBcXij1RJ1IV1ApDVOLHbPDmz7f6OZabKKWvzxDmcutQ/1b4vCmz3lfyPKnbZdv58pj 2oPHHpMS1B2mqWvsol+7/QpaQIA9fOJ6KLL5nyka2uPsHBgwAqFbyWfVUo3XD4YNODY5Cc rSlnEFyt5goXaGr22ruvPDiNMLPAs7yW2k3KyHBr8rcz4Khwn0SzqCpzsUlPwg== Received: from aniel.nours.eu (nours.eu [176.31.115.77]) (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 4R66Yb16ThzPvx; Thu, 20 Jul 2023 09:18:27 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id C117DE91C8; Thu, 20 Jul 2023 11:18:25 +0200 (CEST) Date: Thu, 20 Jul 2023 11:18:25 +0200 From: Baptiste Daroussin To: Naman Sood Cc: freebsd-pkg@freebsd.org Subject: Re: Why did pkg delete mysql80-server here? Message-ID: <2tt66xyidpyk6cxqstovqzwklp5zq6y74rfv3pzsceoptrp7ju@ubhtobnmhew2> References: List-Id: Binary package management and package tools discussion List-Archive: https://lists.freebsd.org/archives/freebsd-pkg List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-pkg@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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