Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 120849 - mail-mta/{qmail,qmail-ldap} and net-mail/queue-fix - circular dependency/mutual block
Summary: mail-mta/{qmail,qmail-ldap} and net-mail/queue-fix - circular dependency/mutu...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High major (vote)
Assignee: Qmail Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
: 123511 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-01-29 11:43 UTC by Jakub Moc (RETIRED)
Modified: 2007-06-16 09:42 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Moc (RETIRED) gentoo-dev 2006-01-29 11:43:25 UTC
mail-mta/qmail (R)DEPENDs on net-mail/queue-fix which DEPENDS on || ( mail-mta/qmail mail-mta/qmail-mysql mail-mta/qmail-ldap )

mail-mta/qmail-ldap-1.03-r4 (R)DEPENDS on net-mail/queue-fix which DEPENDS on || ( mail-mta/qmail mail-mta/qmail-mysql mail-mta/qmail-ldap ) - this is even worse since both mail-mta/qmail and mail-mta/qmail-ldap PROVIDE virtual/mta and block each other (RDEPEND="!virtual/mta").
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-01-29 12:00:52 UTC
Also noting, that usage of mailwrapper use flag in qmail-1.03-r16 is broken, it should be 

!mailwrapper? ( !virtual/mta )
mailwrapper?  ( net-mail/mailwrapper )

to make any sense.
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2006-01-29 15:27:21 UTC
No, you have your RDEPEND/DEPEND deps wrong.

qmail-queue:
DEPEND="sys-devel/gcc-config"
RDEPEND="
    || (
        mail-mta/qmail
        mail-mta/qmail-mysql
        mail-mta/qmail-ldap
    )"

qmail-queue does NOT need qmail to install itself, but it's not _usable_ without having a qmail implementation installed.

I do "emerge qmail" and queue-fix and qmail install fine.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-01-30 01:32:00 UTC
1/ This kind of dependencies drives portage crazy (spent an hour or two with solar wondering about strange deps produced by portage), regardless whether it by chance works (since queue-fix doesn't actually need qmail/qmail-ldap to compile). 

While things that are in RDEPEND but not in DEPEND *should* be merged after the the ebuild that RDEPENDs on them, portage does not do this - so, you are effectively producing a circular dependency. It works just by coincidence - while still producing weird depchain for the rest of the dependencies. Use PDEPEND if net-mail/queue-fix does not depend on qmail in any other way than being useless without having qmail installed.

2/ mailwrapper use flag implementation is plain wrong here, please either fix it as suggested in comment #1 or remove it, it doesn't do anything useful whatsoever as it is. The whole purpose of mailwrapper is to enable install of multiple MTAs simultaneously, which you are effectively negating by sticking unconditional !virtual/mta into ebuilds (Also wondering why qmail has mailwrapper use flag, while qmail-ldap does not).

Thanks.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2006-01-30 02:31:51 UTC
portage's behavior regarding PDEPEND/RDEPEND is more in question. Is it actually getting it right finally, or are you just going by the book instead of what portage is doing?

1. queue-fix is useless without qmail - it exists to create/repair the qmail queue on disk.
2. the qmail{,-ldap,-mysql} ebuilds use queue-fix in their src_install to create the initial empty qmail queue.

I originally committed it in early Aug 2003 as an RDEPEND, at the time, the ebuilds built the qmail queue by hand (messy and badly).
When I took over the qmail ebuilds fully in mid Aug 2003, it became a PDEPEND, in line with what the portage docs said it should be.
After that, there were a number of bugs where portage only installed queue-fix AFTER qmail, leaving the user without a queue structure on disk:-(.
I changed it back to RDEPEND in Oct 2003, because of portage getting the deps wrong.

So now you want it back as PDEPEND, but before then, I want an assurance that portage will get the deps right for all qmail users on stable arch.

As for your mailwrapper comment, I didn't see it in my original response, and as hansmi has handled the mailwrapper stuff for qmail in the past, I'd suggest you file a seperate bug for it, so that it doesn't get lost.
Comment 5 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2006-01-30 02:39:35 UTC
I've seen the mailwrapper issue and will get to it later this week.
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2006-02-20 12:06:08 UTC
*** Bug 123511 has been marked as a duplicate of this bug. ***
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2006-11-15 01:00:01 UTC
jakub: is this still an issue, or is this bug closable?
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2006-11-15 01:19:43 UTC
Well, the package.masked qmail-mysql version produces nonsensical result:

$ emerge -pv qmail-mysql

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] net-mail/queue-fix-1.4-r2  21 kB 
[ebuild  N    ] sys-apps/ucspi-tcp-0.88-r15  USE="-doc ipv6 (-selinux) ssl" 94 kB 
[ebuild  N    ] net-mail/dot-forward-0.71-r2  25 kB 
[ebuild  N    ] sys-process/daemontools-0.76-r5  USE="-doc (-selinux) -static" 36 kB 
[ebuild  N    ] net-mail/cmd5checkpw-0.30  25 kB 
[ebuild  N    ] net-mail/checkpassword-0.90-r2  USE="-static" 15 kB 
[ebuild  N    ] mail-mta/qmail-1.03-r16  USE="-gencertdaily -logmail -mailwrapper -noauthcram -notlsbeforeauth (-selinux) ssl" 459 kB 
[ebuild  N    ] virtual/qmail-1.03  0 kB 
[ebuild  N    ] net-mail/cmd5checkpw-0.22-r3  23 kB 
[ebuild  N    ] mail-mta/qmail-mysql-1.03-r13  USE="ssl" 82 kB 

I assume it's not intended to have both qmail and qmail-mysql installed (or the virtual/qmail is pretty pointless then).

Same for qmail-ldap (-r4 is not p.masked, while -r3 is for whatever reason):

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] sys-apps/ucspi-tcp-0.88-r15  USE="-doc ipv6 (-selinux) ssl" 94 kB 
[ebuild  N    ] net-nds/openldap-2.3.27-r2  USE="berkdb crypt -debug gdbm ipv6 -kerberos -minimal -odbc -overlays perl readline samba -sasl (-selinux) -slp -smbkrb5passwd ssl tcpd" 3,669 kB 
[ebuild  N    ] net-mail/queue-fix-1.4-r2  21 kB 
[ebuild  N    ] net-mail/dot-forward-0.71-r2  25 kB 
[ebuild  N    ] sys-process/daemontools-0.76-r5  USE="-doc (-selinux) -static" 36 kB 
[ebuild  N    ] net-mail/cmd5checkpw-0.30  25 kB 
[ebuild  N    ] net-mail/checkpassword-0.90-r2  USE="-static" 15 kB 
[ebuild  N    ] mail-mta/qmail-ldap-1.03-r4  USE="ssl" 454 kB 
[ebuild  N    ] mail-mta/qmail-1.03-r16  USE="-gencertdaily -logmail -mailwrapper -noauthcram -notlsbeforeauth (-selinux) ssl" 244 kB 
[ebuild  N    ] virtual/qmail-1.03  0 kB 

So, the only way to get the desired result is to p.mask all other qmail implementations in virtual/qmail. Then you get:

$ emerge -pv qmail-ldap

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] sys-apps/ucspi-tcp-0.88-r15  USE="-doc ipv6 (-selinux) ssl" 94 kB 
[ebuild  N    ] net-nds/openldap-2.3.27-r2  USE="berkdb crypt -debug gdbm ipv6 -kerberos -minimal -odbc -overlays perl readline samba -sasl (-selinux) -slp -smbkrb5passwd ssl tcpd" 3,669 kB 
[ebuild  N    ] net-mail/queue-fix-1.4-r2  21 kB 
[ebuild  N    ] net-mail/checkpassword-0.90-r2  USE="-static" 15 kB 
[ebuild  N    ] net-mail/dot-forward-0.71-r2  25 kB 
[ebuild  N    ] sys-process/daemontools-0.76-r5  USE="-doc (-selinux) -static" 36 kB 
[ebuild  N    ] mail-mta/qmail-ldap-1.03-r4  USE="ssl" 454 kB 
[ebuild  N    ] virtual/qmail-1.03  0 kB 

$ emerge -pv qmail-mysql

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] net-mail/queue-fix-1.4-r2  21 kB 
[ebuild  N    ] sys-apps/ucspi-tcp-0.88-r15  USE="-doc ipv6 (-selinux) ssl" 94 kB 
[ebuild  N    ] net-mail/dot-forward-0.71-r2  25 kB 
[ebuild  N    ] sys-process/daemontools-0.76-r5  USE="-doc (-selinux) -static" 36 kB 
[ebuild  N    ] net-mail/cmd5checkpw-0.22-r3  23 kB 
[ebuild  N    ] net-mail/checkpassword-0.90-r2  USE="-static" 15 kB 
[ebuild  N    ] mail-mta/qmail-mysql-1.03-r13  USE="ssl" 376 kB 
[ebuild  N    ] virtual/qmail-1.03  0 kB 

So... hmmm; while the circular deps stuff seems gone, the above doesn't make much sense to me.
Comment 9 Jakub Moc (RETIRED) gentoo-dev 2007-06-16 09:42:35 UTC
qmail is gone, also

 14 Feb 2006; Robin H. Johnson <robbat2@gentoo.org>
  queue-fix-1.4-r2.ebuild:
  Move qmail depends to PDEPEND.

Looks FIXED to me.