Bug 266630 - databases/mariadb106-server, databases/mytop: "pkg install mytop" uninstalls mariadb106-server
Summary: databases/mariadb106-server, databases/mytop: "pkg install mytop" uninstalls ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Bernard Spil
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-26 14:46 UTC by Till Klampaeckel
Modified: 2024-11-13 02:19 UTC (History)
6 users (show)

See Also:
grahamperrin: maintainer-feedback? (brnrd)


Attachments
typescript summary of installations on 13.1-RELEASE-p2 (4.05 KB, text/plain)
2022-09-27 04:37 UTC, Graham Perrin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Till Klampaeckel 2022-09-26 14:46:03 UTC
Installed mariadb106-server (via `pkg install mariadb106-server`) last night and it "suggested" to install "databases/mytop" as it was not (or no longer) included.

Went ahead and installed it (`pkg install mytop`) but the install procedure ended up removing mariadb106-server.

On top of that, it installed half a dozen things such as openldap-client and cyrus which I am not sure if that is really needed. Neither of these are direct dependencies of mytop in ports and I have to admit I didn't trace them either.

The requirements[1] list a few perl packages (off of cpan) and while I am sure it can somehow utilise all the other it seems way over the top for a basic install.

I guess the actual culprit for uninstalling mariadb106-server is p5-DBD-mysql[2], as it seems to require mysql57-client. IMHO, that's fine (I guess), but if that is the case, mytop shouldn't be mentioned in the post-install.

1: https://metacpan.org/release/JZAWODNY/mytop-0.9/view/mytop#REQUIREMENTS
2: https://www.freshports.org/databases/p5-DBD-mysql/
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2022-09-27 04:37:06 UTC
Created attachment 236858 [details]
typescript summary of installations on 13.1-RELEASE-p2

(In reply to Till Klampaeckel from comment #0)

Which version of FreeBSD, exactly? 

Packages from latest, or quarterly? 

Attached: quarterly on FreeBSD 13.1-RELEASE-p2, 

    pkg install databases/mytop 

– did not result in any removal.
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2022-09-27 04:57:29 UTC
(In reply to Graham Perrin from comment #1)

> Attached: …

Please ignore that. From within the file: 

> pkg install --quiet mariadb106-server

I assumed, wrongly, that it would quietly install. It did not.
Comment 3 jSML4ThWwBID69YC 2024-06-19 05:04:44 UTC
I am having this problem, but with portmaster. 

# pkg info | grep mariadb
mariadb1011-client-10.11.8_1   Multithreaded SQL database (client)
mariadb1011-server-10.11.8_1   Multithreaded SQL database (server)

portmaster -d databases/mytop
===>>> The following actions will be taken if you choose to proceed:
        Install databases/mytop
        Install databases/mysql80-client
        Install comms/hidapi
        Install devel/gettext-tools
        Install devel/gettext-runtime
        Install devel/libtextstyle
        Install devel/libevent
        Install devel/libunwind
        Install ftp/curl
        Install dns/libpsl
        Install devel/libunistring
        Install dns/libidn2
        Install dns/public_suffix_list
        Install security/libfido2
        Install devel/libcbor
        Install devel/libcjson
        Install textproc/groff
        Install print/gsfonts
        Install print/psutils
        Install print/libpaper
        Install textproc/uchardet

It installs mysql80-client when mariadb1011-client is already installed.
Comment 4 Bernard Spil freebsd_committer freebsd_triage 2024-11-10 12:18:10 UTC
There are no MySQL flavors in the pkgs so this can't really work. Dependency tracking is wonky in this way. Seeing that mytop is a shellscript, that dependency isn't even required, but helpful to install a client to make the package work.

Set DEFAULT_VERSIONS= mysql=114m for your poudriere so it will use MariaDB by default. That should fix this.

The port mytop is ancient, and MariaDB ships mytop with the client... This is fixable.

Here's what I'll do:

1. Commandeer the mytop port (has no maintainer)
2. Add appropriate conflicts for mariadb*-client
3. Uncomment mytop in all mariadb-client ports.

Looks like Oracle doesn't ship mytop with MySQL, so the port is still useful? Does this even work? Latest release is 11 years old.
Comment 5 commit-hook freebsd_committer freebsd_triage 2024-11-10 13:35:36 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a8e7b5f4b6bd64d7a805c08b5027a41da51640c3

commit a8e7b5f4b6bd64d7a805c08b5027a41da51640c3
Author:     Bernard Spil <brnrd@FreeBSD.org>
AuthorDate: 2024-11-10 13:34:56 +0000
Commit:     Bernard Spil <brnrd@FreeBSD.org>
CommitDate: 2024-11-10 13:34:56 +0000

    databases/mytop: Adopt port and fix conflicts

     * The MariaDB ports have shipped a mytop for a long time. This was
       commented out due to earlier conflicts. These changes use the
       packaged mytop for MariaDB ports whilst providing the port for
       MySQL versions.

    Reported by:    till php net
    PR:             266630

 databases/mariadb1011-client/pkg-plist | 4 ++--
 databases/mariadb1011-server/Makefile  | 3 ++-
 databases/mariadb1011-server/pkg-plist | 4 ++--
 databases/mariadb105-client/pkg-plist  | 4 ++--
 databases/mariadb106-client/pkg-plist  | 4 ++--
 databases/mariadb106-server/Makefile   | 3 ++-
 databases/mariadb114-client/pkg-plist  | 2 +-
 databases/mariadb114-server/Makefile   | 3 ++-
 databases/mytop/Makefile               | 6 ++++--
 9 files changed, 19 insertions(+), 14 deletions(-)
Comment 6 pvoigt 2024-11-11 15:02:26 UTC
Well, I am unable to upgrade MariaDB from 10.11.9 to 10.11.10.

I am using FreeBSD 13.4-RELEASE-p2 and have tried to upgrade MariaDB using portmaster.

Build of MariaDB 10.11.10 completes just fine but I am unable to install:

pkg-static: mariadb1011-server-10.11.10 conflicts with mariadb1011-client-10.11.10 (installs files into the same place).
  Problematic file: /usr/local/bin/mytop                                                                                
*** Error code 1

I have not installed databases/mytop at all.
Comment 7 Krzysztof 2024-11-13 02:19:13 UTC
I think this bug should be reopen or git changes should be withdrawed?

As you can see discution at bug#282680 git commit related to this bug causes conflict which could cuse deinstalling of mariadb-server (I've almost crashed my database server).

And if bin/mytop should be part of mariadb package I think it should be not installed with mariadb-server.

Thanks a lot for your review of this commit once again