Hi, While installing a new system, I was bitten by #253513 which lead me to wonder how I had ended up with mailutils rather than bsd-mailx. It seems that this was the result of installing emacs, which pulled in exim4 and thus exim4-base, which recommends the virtual package 'mailx' which is provided by mailutils. Declarations of a relationship to mailx (sorted by frequency)[1]: 22 bsd-mailx | mailx 9 mailx 3 heirloom-mailx | mailx 2 mailx | mailutils 2 mailutils | mailx 2 bsd-mailx | mailx | mailutils 1 s-nail | mailx 1 mutt | mailx | mail-transport-agent 1 heirloom-mailx | bsd-mailx | mailx 1 heirloom-mailx | biabam | mutt 1 exim4 | mail-transport-agent | mailutils | bsd-mailx | mailx 1 bsd-mailx | mailutils | s-nail | mailx It seems that most (26) packages are explicitly preferring bsd-mailx, which seems fair enough to me. heirloom-mailx is a dummy package that depends on s-nail, where s-nail does not actually provide mailx, so I suspect that mentions of both of those could be bugs. The most popular remaining option is to list mailx before any real package, which is presumably what leads to the unexpected behaviour. As far as I can see, mailutils is only explicitly preferred to bsd-mailx in three cases: fwanalog & wims Depends: mailutils | mailx debarchiver Recommends: exim4 | mail-transport-agent | mailutils | bsd-mailx | mailx Given that, it seems to me that we should somehow ensure that when one needs 'mailx' one can be sure to get bsd-mailx (unless one explicitly chooses otherwise). However, hard-wiring this preference into so many packages doesn't seem very elegant to me, and would be a pain to change if we ever wanted to switch defaults. Is there perhaps some trick in apt that could fix this so that the packages only need to depend on mailx? Alternatively, might a 'default-mailx' virtual package that only bsd-mailx provides be the answer, such that all of these then could declare the dependency as: default-mailx | mailx Can anyone suggest a better way of making bsd-mailx the distribution-wide preference for satisfying dependencies on mailx? Cheers, Phil. [1] FYI the above figures were arrived at by using these commands: for i in $(apt-cache showpkg mailx | sed -ne 's/ \([^ ,]*\)\b.*/\1/p' | sort -u) ; do apt-cache show $i | sed -ne 's/^\(D\|R\|S\)\(epend\|ecommend\|uggest*\)s: \(\|.*, *\)\([^,]*mailx[^,]*\)\(.*\)$/\4:'"$i"'[\1]/p' ; done | sort -V -u > /tmp/mailx-deps.txt cut -d: -f1 /tmp/mailx-deps.txt | uniq -c | sort -nr The longer list is here:
Attachment:
signature.asc
Description: PGP signature
bsd-mailx | mailutils | s-nail | mailx:rkhunter[R] bsd-mailx | mailx | mailutils:backupninja[D] bsd-mailx | mailx | mailutils:psad[D] bsd-mailx | mailx:aide-common[D] bsd-mailx | mailx:amanda-common[D] bsd-mailx | mailx:amanda-server[D] bsd-mailx | mailx:apticron-systemd[D] bsd-mailx | mailx:apticron[D] bsd-mailx | mailx:automysqlbackup[D] bsd-mailx | mailx:bacula-director[D] bsd-mailx | mailx:bareos-director[D] bsd-mailx | mailx:devscripts[S] bsd-mailx | mailx:fcheck[D] bsd-mailx | mailx:gridengine-common[D] bsd-mailx | mailx:hylafax-server[D] bsd-mailx | mailx:icinga-common[D] bsd-mailx | mailx:inn[D] bsd-mailx | mailx:libapache2-mod-evasive[D] bsd-mailx | mailx:logrotate[R] bsd-mailx | mailx:nagios4-common[D] bsd-mailx | mailx:reboot-notifier[D] bsd-mailx | mailx:sharutils[S] bsd-mailx | mailx:ssl-cert-check[R] bsd-mailx | mailx:ui-auto[D] bsd-mailx | mailx:uucp[D] exim4 | mail-transport-agent | mailutils | bsd-mailx | mailx:debarchiver[R] heirloom-mailx | biabam | mutt:autopostgresqlbackup[R] heirloom-mailx | bsd-mailx | mailx:aptitude-robot[S] heirloom-mailx | mailx:autopostgresqlbackup[D] heirloom-mailx | mailx:drbd-utils[R] heirloom-mailx | mailx:sn[D] mailutils | mailx:fwanalog[D] mailutils | mailx:wims[D] mailx | mailutils:smartmontools[R] mailx | mailutils:smartmontools[S] mailx:bzr-email[S] mailx:cruft[S] mailx:exim4-base[R] mailx:fail2ban[S] mailx:integrit[R] mailx:mariadb-server-10.3[S] mailx:mpt-status[S] mailx:mysql-server-5.7[S] mailx:tua[D] mutt | mailx | mail-transport-agent:metche[D] s-nail | mailx:apcupsd[R]
-- |)| Philip Hands [+44 (0)20 8530 9560] HANDS.COM Ltd. |-| http://www.hands.com/ http://ftp.uk.debian.org/ |(| Hugo-Klemm-Strasse 34, 21075 Hamburg, GERMANY