Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 22D7A431FAF for ; Fri, 20 Jan 2012 05:32:46 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mT5QmUhynGv5 for ; Fri, 20 Jan 2012 05:32:44 -0800 (PST) Received: from mail-gw3.nixu.fi (mail-gw3.nixu.fi [193.209.237.7]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 3E05D431FAE for ; Fri, 20 Jan 2012 05:32:44 -0800 (PST) Received: from pps.filterd (mail-gw3 [127.0.0.1]) by mail-gw3.nixu.fi (8.14.4/8.14.4) with SMTP id q0KDSfDI014248; Fri, 20 Jan 2012 15:32:42 +0200 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31]) by mail-gw3.nixu.fi with ESMTP id 114cs1am5v-1 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Fri, 20 Jan 2012 15:32:42 +0200 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31]) by taco2.nixu.fi (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id q0KDWf6k014611; Fri, 20 Jan 2012 15:32:41 +0200 From: Tomi Ollila To: Thomas Jost Subject: Re: [PATCH] Add pseudo-compatibility with gmime 2.6 In-Reply-To: <87k44n2qsw.fsf@schnouki.net> References: <8762gbtd6p.fsf@schnouki.net> <1326758199-18058-1-git-send-email-schnouki@schnouki.net> <20120117034714.GG16740@mit.edu> <8739bea9lc.fsf@thor.loria.fr> <20120117203836.GR16740@mit.edu> <87k44n2qsw.fsf@schnouki.net> User-Agent: Notmuch/0.11+71~gefa5d6c (http://notmuchmail.org) Emacs/23.3.1 (i686-pc-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.6.7361, 1.0.211, 0.0.0000 definitions=2012-01-20_03:2012-01-20, 2012-01-20, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1012030000 definitions=main-1201200097 Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jan 2012 13:32:46 -0000 On Fri, 20 Jan 2012 00:52:47 +0100, Thomas Jost wrote: > > Here is how I did: > > (ldd notmuch | grep -q gmime-2.6) && test_subtest_known_broken > > ldd notmuch will show "/path/to/libgmime-2.4.so.*" or > "libgmime-2.6.so.*" so we can easily check this in the test suite. > It's a little hacky but it seems to work. AFAIK ldd is a pretty standard > tool so it should be available (almost) everywhere. However if you have > a better idea I'll be glad to hear it. The "hack" is good in a sense that if that check fails in any case the test_subtest_known_broken is not executed and we get FAIL instead of BROKEN. The subshell is unneeded: ldd notmuch | grep -q gmime-2.6 && test_subtest_known_broken does the trick (potentially less forks)... ok now I have to test ;) haha: $ rm xfoo.* xbar.* $ strace -ff -o xfoo sh -c '(ldd /bin/ls | grep -q libc) && echo foo' foo $ ls xfoo.* xfoo.14277 xfoo.14279 xfoo.14281 xfoo.14283 xfoo.14285 xfoo.14278 xfoo.14280 xfoo.14282 xfoo.14284 $ strace -ff -o xbar sh -c 'ldd /bin/ls | grep -q libc && echo foo' foo $ ls xbar.* xbar.14292 xbar.14294 xbar.14296 xbar.14298 xbar.14293 xbar.14295 xbar.14297 xbar.14299 Tomi