From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 2ECDF138CF8 for ; Tue, 23 Jun 2015 08:59:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6CB07E097B; Tue, 23 Jun 2015 08:59:04 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 184BEE097B for ; Tue, 23 Jun 2015 08:59:03 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EC2A9340B07 for ; Tue, 23 Jun 2015 08:59:02 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 232C1A30 for ; Tue, 23 Jun 2015 08:58:59 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1435049837.bb47adc4544369167b931113600d292d2b77c97a.vapier@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: / X-VCS-Repository: proj/portage-utils X-VCS-Files: main.c X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: bb47adc4544369167b931113600d292d2b77c97a X-VCS-Branch: master Date: Tue, 23 Jun 2015 08:58:59 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: fae3698f-736f-420e-b595-5a470e4c542e X-Archives-Hash: 5d0a0a6ef3ad9ca27f34d84d27af74cd commit: bb47adc4544369167b931113600d292d2b77c97a Author: Mike Frysinger gentoo org> AuthorDate: Tue Jun 23 08:57:17 2015 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Tue Jun 23 08:57:17 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=bb47adc4 repos.conf: fix behavior on systems w/out d_type URL: https://bugs.gentoo.org/551696 Reported-by: Fabian Groffen gentoo.org> main.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 66b3b30..609ed54 100644 --- a/main.c +++ b/main.c @@ -460,10 +460,27 @@ static void read_repos_conf(const char *configroot, const char *repos_conf) for (i = 0; i < count; ++i) { const char *name = confs[i]->d_name; - if (name[0] == '.' || confs[i]->d_type != DT_REG) + if (name[0] == '.') continue; +#ifdef DT_UNKNOWN + if (confs[i]->d_type != DT_UNKNOWN && + confs[i]->d_type != DT_REG && + confs[i]->d_type != DT_LNK) + continue; +#endif + xasprintf(&sub_conf, "%s/%s", top_conf, name); + +#ifdef DT_UNKNOWN + if (confs[i]->d_type != DT_REG) +#endif + { + struct stat st; + if (stat(sub_conf, &st) || S_ISREG(st.st_mode)) + continue; + } + read_one_repos_conf(sub_conf); free(sub_conf); }