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 988CF138010 for ; Wed, 27 Mar 2013 03:20:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0C017E0829; Wed, 27 Mar 2013 03:20:55 +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 7B852E0829 for ; Wed, 27 Mar 2013 03:20:54 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9A2BB33BEEC for ; Wed, 27 Mar 2013 03:20:53 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 559) id 64D2A2171D; Wed, 27 Mar 2013 03:20:52 +0000 (UTC) From: "Mike Frysinger (vapier)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, vapier@gentoo.org Subject: [gentoo-commits] gentoo-projects commit in pax-utils: lddtree.py X-VCS-Repository: gentoo-projects X-VCS-Files: lddtree.py X-VCS-Directories: pax-utils X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: <20130327032052.64D2A2171D@flycatcher.gentoo.org> Date: Wed, 27 Mar 2013 03:20:52 +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: 1f5e2109-343f-4113-b5da-ce44b84816da X-Archives-Hash: 76f1341abd71796a1749cc55c19fefd1 vapier 13/03/27 03:20:52 Modified: lddtree.py Log: lddtree.py: add --copy-non-elfs to simplify copying of lots of files Revision Changes Path 1.31 pax-utils/lddtree.py file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/lddtree.py?rev=1.31&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/lddtree.py?rev=1.31&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/lddtree.py?r1=1.30&r2=1.31 Index: lddtree.py =================================================================== RCS file: /var/cvsroot/gentoo-projects/pax-utils/lddtree.py,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- lddtree.py 27 Mar 2013 03:20:04 -0000 1.30 +++ lddtree.py 27 Mar 2013 03:20:52 -0000 1.31 @@ -3,7 +3,7 @@ # Copyright 2012 Mike Frysinger # Use of this source code is governed by a BSD-style license (BSD-3) # pylint: disable=C0301 -# $Header: /var/cvsroot/gentoo-projects/pax-utils/lddtree.py,v 1.30 2013/03/27 03:20:04 vapier Exp $ +# $Header: /var/cvsroot/gentoo-projects/pax-utils/lddtree.py,v 1.31 2013/03/27 03:20:52 vapier Exp $ # TODO: Handle symlinks. @@ -369,7 +369,7 @@ def _ShowVersion(_option, _opt, _value, _parser): - d = '$Id: lddtree.py,v 1.30 2013/03/27 03:20:04 vapier Exp $'.split() + d = '$Id: lddtree.py,v 1.31 2013/03/27 03:20:52 vapier Exp $'.split() print('%s-%s %s %s' % (d[1].split('.')[0], d[2], d[3], d[4])) sys.exit(0) @@ -541,6 +541,9 @@ parser.add_option('--generate-wrappers', action='store_true', default=False, help=('Wrap executable ELFs with scripts for local ldso')) + parser.add_option('--copy-non-elfs', + action='store_true', default=False, + help=('Copy over plain (non-ELF) files rather than warn+ignore')) parser.add_option('-l', '--list', action='store_true', default=False, help=('Display output in a simple list (easy for copying)')) @@ -582,6 +585,18 @@ try: elf = ParseELF(p, options.root, ldpaths) except (exceptions.ELFError, IOError) as e: + # XXX: Ugly. Should unify with _Action* somehow. + if options.dest is not None and options.copy_non_elfs: + if os.path.exists(p): + elf = { + 'interp': None, + 'libs': [], + 'runpath': [], + 'rpath': [], + 'path': p, + } + _ActionCopy(options, elf) + continue ret = 1 warn('%s: %s' % (p, e)) continue