From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CCA1CA00C2; Wed, 28 Sep 2022 08:51:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AD5F14113C; Wed, 28 Sep 2022 08:51:46 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 5FDA241133 for ; Wed, 28 Sep 2022 08:51:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664347904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KPUI1orp1JckRgc+VwuFJUoluXvrdLtvjKMRSw660l0=; b=CI/4oOmXnb8zNH5m2SSm8ijzDEGuTUwmB0u2b7szi4Y9ze/ykEbKtafIp7fSsYQJ7du2yS SeHK3LyTIbe3/Yo/599a63ukQxS6wPPR4HeCR+J1Wdav0+gx4Hz3djfO4MZ5jqSGcb7qFR Buz/Dv3ow4TmVenTxReXlWll3H2dDnU= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-556-eO45Yt6GN2uKYBbGc5p2Dg-1; Wed, 28 Sep 2022 02:51:41 -0400 X-MC-Unique: eO45Yt6GN2uKYBbGc5p2Dg-1 Received: by mail-wr1-f72.google.com with SMTP id k30-20020adfb35e000000b0022cc5ecd872so381477wrd.8 for ; Tue, 27 Sep 2022 23:51:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date; bh=KPUI1orp1JckRgc+VwuFJUoluXvrdLtvjKMRSw660l0=; b=zbY9q6KWkGixj6Tpq+w6/UL/1Khex0tGfPv2HP4Q32GWhDO67KuYiNLMZK+1NuYXZP yomDPExEoA0WnUo5qRHxf2KuWuBVztBTcuQ089SFY2SrnrVznYVTZhXO7ytokmYpfMdI DFujJXnuf5uaQP0paetJKI3J2LAe7OTrslo/BFr3066ZMmnUotzr8p4NkBJtIpN8Sc6I V+KS+PjJera1MhjwDjVc0jRJGx8JfqFqZl0Sum5x29mEWkFjPKEhASBpiHrOuKQufDxX 2a3i6SxmHyKdRIThggUP40taHTJqxxe+jaMhFYsC+jjmT7XZxqbTc03UYkF3N8vNipP2 nrCg== X-Gm-Message-State: ACrzQf0Q6cJ+ZGtvE0abh0kryWceHNJm4A5xZlxEgMu/CICYS7kqKwli UfBHWpmKz3Y3/3OHCGwWUGLpnnqLVEKC9wCVubNzaM8aALvt9BsEJ9gmWNWiQEdY88ijBlCvj0j 9qJ4= X-Received: by 2002:a05:6000:4f:b0:22c:caa4:f2cd with SMTP id k15-20020a056000004f00b0022ccaa4f2cdmr157504wrx.41.1664347900332; Tue, 27 Sep 2022 23:51:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5r79UbKUACy4RIWXRpxu3goiKSk8LmpoQ7SuG4I6OurWTHnfT2PVjbSD6cZu/+SElLHd9mFA== X-Received: by 2002:a05:6000:4f:b0:22c:caa4:f2cd with SMTP id k15-20020a056000004f00b0022ccaa4f2cdmr157491wrx.41.1664347900062; Tue, 27 Sep 2022 23:51:40 -0700 (PDT) Received: from localhost (2a01cb000f483e00b4815b62aee6aa5b.ipv6.abo.wanadoo.fr. [2a01:cb00:f48:3e00:b481:5b62:aee6:aa5b]) by smtp.gmail.com with ESMTPSA id l2-20020a1c7902000000b003b33943ce5esm884472wme.32.2022.09.27.23.51.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Sep 2022 23:51:39 -0700 (PDT) Mime-Version: 1.0 Date: Wed, 28 Sep 2022 08:51:39 +0200 Message-Id: Cc: , "Olivier Matz" , "Ferruh Yigit" Subject: Re: [PATCH v6] usertools: rewrite pmdinfo From: "Robin Jarry" To: "Bruce Richardson" X-Mailer: aerc/0.12.0-59-g748afee4b660 References: <20220913105811.84384-1-robin@jarry.cc> <20220926134438.10906-1-rjarry@redhat.com> In-Reply-To: X-Mimecast-Spam-Score: 1 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Bruce Richardson, Sep 26, 2022 at 17:17: > > * fixed typo: /etc/ld.so.conf/*.conf -> /etc/ld.so.conf.d/*.conf > > I am a little uncertain about doing this parsing, and worried it may be a > bit fragile. The main file for ld.so still is ld.so.conf, which, on my > system anyway, does indeed just have an include for *.conf in the .d > directory. However, is it possible that there are systems out there that > still have entries in ld.so.conf and possibly elsewhere? > > I think my preference would still be to shell out to ldconfig and query i= ts > database, or to shell out to ldd to get the dependencies of a .so from > there. I just think it may be more robust, but at the cost of running som= e > shell commands. > > However, I don't feel strongly about this, so if others prefer the > pure-python ld.so.conf parsing approach better, I'm ok with that. I was also concerned with parsing ld.so.conf files. However, I did not find a way to get ldconfig simply to print the folders that are to be analyzed. This would require some regexp parsing of ldconfig output: ldconfig -vNX 2>/dev/null | sed -nre 's,^(/.*): \(from .*\)$,\1,p' I don't know which way is the least hacky.