From: "André Erdmann" <dywi@mailerd.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/overlay/pkgdir/distroot/
Date: Mon, 2 Sep 2013 08:44:33 +0000 (UTC) [thread overview]
Message-ID: <1378111404.441fcf253606e593a7e3b253278a75cfd1ae9d1c.dywi@gentoo> (raw)
commit: 441fcf253606e593a7e3b253278a75cfd1ae9d1c
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Mon Sep 2 08:43:24 2013 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Mon Sep 2 08:43:24 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=441fcf25
distroot, file collisions: rename distfiles
---
roverlay/overlay/pkgdir/distroot/distroot.py | 31 ++++++++++++++--------------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/roverlay/overlay/pkgdir/distroot/distroot.py b/roverlay/overlay/pkgdir/distroot/distroot.py
index 2ec43ec..c866bea 100644
--- a/roverlay/overlay/pkgdir/distroot/distroot.py
+++ b/roverlay/overlay/pkgdir/distroot/distroot.py
@@ -612,22 +612,23 @@ class PersistentDistroot ( DistrootBase ):
if self.distmap.get_distfile_slot ( package_dir, package_info ):
return True
else:
- # TODO/COULDFIX:
- # resolve conflict instead of simply ignoring files
- # (-> e.g. rename files)
- #
+ distfile = package_info.get_src_uri_dest().rpartition ( os.sep )
+ rename_prefix = package_info ['repo_name'].lower() + '_'
- # *** 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
+ if distfile[2][:len(rename_prefix)] == rename_prefix:
+ # already prefixed with the repo name
+ return False
+ else:
+ package_info.update (
+ src_uri_dest=(
+ distfile[0] + distfile[1] + rename_prefix + distfile[2]
+ )
+ )
+ #return self.distmap.get_distfile_slot(...)
+ if self.distmap.get_distfile_slot ( package_dir, package_info ):
+ return True
+ else:
+ return False
# --- end of handle_file_collision (...) ---
# --- end of PersistentDistroot ---
next reply other threads:[~2013-09-02 8:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-02 8:44 André Erdmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-06-25 16:41 [gentoo-commits] proj/R_overlay:master commit in: roverlay/overlay/pkgdir/distroot/ André Erdmann
2014-03-25 22:48 André Erdmann
2013-09-03 15:51 André Erdmann
2013-09-03 12:21 André Erdmann
2013-09-02 12:27 André Erdmann
2013-08-30 14:49 André Erdmann
2013-08-29 12:36 André Erdmann
[not found] <1377779578.666baeaec44ee25a6ab2f355f3556a41587f5440.dywi@gentoo>
2013-08-29 12:36 ` André Erdmann
2013-08-22 9:01 André Erdmann
2013-02-09 20:45 André Erdmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1378111404.441fcf253606e593a7e3b253278a75cfd1ae9d1c.dywi@gentoo \
--to=dywi@mailerd.de \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox