I installed darcs to submit some patches for a software project. Everything was fine until I had to use "darcs send" Darcs would respond with "darcs failed: failed to send mail to:" with the mail address for the patch. I had to install sendmail to resolve the problem. Shouldn't a mail client compatible with Darcs be a dependency?
Thanks for the report. I'm not sure, really. Darcs can be used without mail (locally, or via ssh), and it seems hard to force such a dependency on everyone who wants to use darcs. Gentoo currently doesn't have a "suggested" category of dependencies, so we can't have it as an optional dependency. There's also no USE flag for mail support ... I could add an information message at the end of the merge process that a mail client is needed in order to send patches. I will also discuss this problem with the rest of the Haskell team. But currently, I'm not convinced that anything should be changed here. ks
I'm rather dumbfounded as to why ssmtp is a requirement here, I just put it in my local repository without the mail requirement and it installed fine. Perhaps it should be checking the 'nosendmail' use flag?
Avuton, the reason virtual/mta is a requirment is that darcs's send feature needs it. Of course it will emerge ok without it's just that darcs send will then fail. But, yes, perhaps we can make it optional. I note that git has a "gitsendemail" local USE flag. Perhaps we should add a "darcssend" USE flag to darcs and have the virtual/mta dependency be conditional on that. I think it'd also be worth noting to darcs users in an info message that they probably need to configure their mta before darcs send will actually work. For example with ssmtp you have to tell it what smtp server to forward mail to, otherwise no mail will get through. I don't think that all darcs users will be immediately aware of this.
I have added a warning to the latest stable and testing ebuilds about this. Most users will already have at least ssmtp installed on their system, just by virtue of emerging vixie-cron when setting up their Gentoo systems. However, should this not be the case, the dependency on virtual/mta should force portage to download and install ssmtp prior to installing darcs. Configuring /etc/ssmtp/ssmtp.conf for your site is relatively straightforward, but you do not even have to do so if you do not intend to use the darcs send command.