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 49CF51381F3 for ; Fri, 30 Aug 2013 14:49:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A5D4EE109C; Fri, 30 Aug 2013 14:49:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EFCE2E108E for ; Fri, 30 Aug 2013 14:49:41 +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 0747B33ED60 for ; Fri, 30 Aug 2013 14:49:41 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 158E9E5459 for ; Fri, 30 Aug 2013 14:49:38 +0000 (UTC) From: "André Erdmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" Message-ID: <1377874001.771754c749e09f8722324304a9399e67bbf9aafa.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/overlay/pkgdir/distroot/ X-VCS-Repository: proj/R_overlay X-VCS-Files: roverlay/overlay/pkgdir/distroot/distroot.py X-VCS-Directories: roverlay/overlay/pkgdir/distroot/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: 771754c749e09f8722324304a9399e67bbf9aafa X-VCS-Branch: master Date: Fri, 30 Aug 2013 14:49:38 +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: 2d9ced91-7cde-46d2-a0fd-4c578f356d5f X-Archives-Hash: 64e40cefeccb94779431f4a03a062811 commit: 771754c749e09f8722324304a9399e67bbf9aafa Author: André Erdmann mailerd de> AuthorDate: Fri Aug 30 14:46:41 2013 +0000 Commit: André Erdmann mailerd de> CommitDate: Fri Aug 30 14:46:41 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=771754c7 distroot: handle_file_collision() This commit adds initial support for handling file collisions by simply ignoring subsequent files with the same name (and screaming to stdout). TODO notes: * re-use volatile entries when creating manifest files * (could) resolve file collisions with automatic renaming --- roverlay/overlay/pkgdir/distroot/distroot.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/roverlay/overlay/pkgdir/distroot/distroot.py b/roverlay/overlay/pkgdir/distroot/distroot.py index 6deb06f..96c6894 100644 --- a/roverlay/overlay/pkgdir/distroot/distroot.py +++ b/roverlay/overlay/pkgdir/distroot/distroot.py @@ -608,4 +608,25 @@ class PersistentDistroot ( DistrootBase ): return tuple ( get_int ( s ) for s in strategy ) # --- end of _get_int_strategy (...) --- + def handle_file_collision ( self, package_dir, package_info ): + if self.distmap.get_distfile_slot ( package_dir, package_info ): + return True + else: + # TODO/COULDFIX: + # resolve conflict instead of ignoring filtering + # + + # *** DEBUG CODE *** + vartable = package_info.create_vartable ( package_dir.get_upper().name ) + print ( + "dropping {P} from {CATEGORY}/{PN}".format ( **vartable ) + ) + self.logger.info ( + "dropping {!r}: distmap file collision.".format ( package_info ) + ) + # *** END DEBUG CODE *** + + return False + # --- end of handle_file_collision (...) --- + # --- end of PersistentDistroot ---