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 0E49F1384B4 for ; Sat, 28 Nov 2015 02:44:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2C40221C090; Sat, 28 Nov 2015 02:44:41 +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 BBD9E21C077 for ; Sat, 28 Nov 2015 02:44:39 +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 D803F340702 for ; Sat, 28 Nov 2015 02:44:38 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F3B9EF50 for ; Sat, 28 Nov 2015 02:44:34 +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: <1448657387.29afc5efc0ae2cd9977b0b44469d741c1c2066d3.vapier@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: / X-VCS-Repository: proj/portage-utils X-VCS-Files: qcache.c X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 29afc5efc0ae2cd9977b0b44469d741c1c2066d3 X-VCS-Branch: master Date: Sat, 28 Nov 2015 02:44:34 +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: da998c58-f15a-4fab-adb5-6e8e86c57819 X-Archives-Hash: 518b2822dc8bdde10826d6a850b144ca commit: 29afc5efc0ae2cd9977b0b44469d741c1c2066d3 Author: Mike Frysinger gentoo org> AuthorDate: Fri Nov 27 20:49:47 2015 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Fri Nov 27 20:49:47 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=29afc5ef qcache: fix ebuild traversal error path We were freeing the wrong vars for this loop. Also do not dump a warning when we try to scan a path that isn't a directory. Random files in there shouldn't cause us to complain. qcache.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qcache.c b/qcache.c index af64bc5..8dbeaa3 100644 --- a/qcache.c +++ b/qcache.c @@ -441,9 +441,11 @@ int qcache_traverse(void (*func)(qcache_data*)) xasprintf(&ebuildpath, "%s/%s/%s", portdir, categories[i]->d_name, packages[j]->d_name); if (-1 == (num_ebuild = scandir(ebuildpath, &ebuilds, qcache_ebuild_select, qcache_vercmp))) { - warnp("%s", ebuildpath); - free(packages[i]); - free(pkgpath); + /* Do not complain about spurious files */ + if (errno != ENOTDIR) + warnp("%s", ebuildpath); + free(packages[j]); + free(ebuildpath); continue; }