From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1S6oeR-0003Hk-Un for garchives@archives.gentoo.org; Sun, 11 Mar 2012 19:41:56 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7F7C3E0976; Sun, 11 Mar 2012 19:41:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 53E76E0976 for ; Sun, 11 Mar 2012 19:41:48 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BA8681B404B for ; Sun, 11 Mar 2012 19:41:47 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 7B52FE5402 for ; Sun, 11 Mar 2012 19:41:46 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1331494902.e9bb70344f93509e34ef117e14420a60fef5b83e.vapier@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/etc-update X-VCS-Directories: bin/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: e9bb70344f93509e34ef117e14420a60fef5b83e X-VCS-Branch: master Date: Sun, 11 Mar 2012 19:41:46 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: fbbd48a6-aab0-4b95-8fb9-bb459acc140b X-Archives-Hash: 32fc7776d813c6581000efbb0efadf0f commit: e9bb70344f93509e34ef117e14420a60fef5b83e Author: Mike Frysinger gentoo org> AuthorDate: Sun Mar 11 19:39:50 2012 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Sun Mar 11 19:41:42 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3De9bb7034 etc-update: fix logic bug with protected files The rewrite introduced a slight bug with protected files. Fix that, and rework the code slightly to make it obvious that we want a diff set of options for files and dirs. Signed-off-by: Mike Frysinger gentoo.org> --- bin/etc-update | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/etc-update b/bin/etc-update index 644512a..75c6ba1 100755 --- a/bin/etc-update +++ b/bin/etc-update @@ -75,13 +75,14 @@ scan() { =20 [[ -w ${path} ]] || die "Need write access to ${path}" =20 - # Do not traverse hidden directories such as .svn or .git. - find_opts=3D( -name '.*' -type d -prune -o -name '._cfg????_*' ) if [[ ! -d ${path} ]] ; then [[ ! -f ${path} ]] && continue local my_basename=3D"${path##*/}" path=3D"${path%/*}" - find_opts+=3D( -maxdepth 1 -name "._cfg????_${my_basename}" ) + find_opts=3D( -maxdepth 1 -name "._cfg????_${my_basename}" ) + else + # Do not traverse hidden directories such as .svn or .git. + find_opts=3D( -name '.*' -type d -prune -o -name '._cfg????_*' ) fi find_opts+=3D( ! -name '.*~' ! -iname '.*.bak' -print ) =20