From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2BF2B1395E2 for ; Mon, 5 Dec 2016 05:14:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4A8A121C084; Mon, 5 Dec 2016 05:14:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2C06D21C084 for ; Mon, 5 Dec 2016 05:14:36 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2C796340F2A for ; Mon, 5 Dec 2016 05:14:35 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E5380495 for ; Mon, 5 Dec 2016 05:14:33 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1480914794.40e3bbe96c522eb02870550b0f976efdbdd0c033.dolsen@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/depgraph.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 40e3bbe96c522eb02870550b0f976efdbdd0c033 X-VCS-Branch: master Date: Mon, 5 Dec 2016 05:14:33 +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: 1362b29b-918f-437a-8f32-43aaed308c4a X-Archives-Hash: 0536efe4531ae64cbbcc8d91bd1236db commit: 40e3bbe96c522eb02870550b0f976efdbdd0c033 Author: hackers.terabit Yandex com> AuthorDate: Thu Oct 27 03:29:16 2016 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Mon Dec 5 05:13:14 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=40e3bbe9 _emerge/depgraph.py: Autounmask-write fails when there isn't a file in package.*/ bug 598116 Instead of outputting "!!! No file to write for ..." error message, Use a sane default filename. Add zz- prefix to ensure it remains the last file in sorted order. X-Gentoo-bug: 598116 X-Gentoo-bug-url: https://bugs.gentoo.org/598116 pym/_emerge/depgraph.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index ee6cf68..cb12b05 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -8247,6 +8247,12 @@ class depgraph(object): child.endswith("~"): continue stack.append(os.path.join(p, child)) + # If the directory is empty add a file with name + # pattern file_name.default + if last_file_path is None: + last_file_path = os.path.join(file_path, file_path, "zz-autounmask") + with open(last_file_path, "a+") as default: + default.write("# " + file_name) return last_file_path