Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 351470 Details for
Bug 465000
xattr pax-marking in src_compile() fails
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
python version of install wrapper
install.py (text/plain), 2.86 KB, created by
Anthony Basile
on 2013-06-20 13:41:54 UTC
(
hide
)
Description:
python version of install wrapper
Filename:
MIME Type:
Creator:
Anthony Basile
Created:
2013-06-20 13:41:54 UTC
Size:
2.86 KB
patch
obsolete
>#!/usr/bin/python ># Copyright 2013 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 > >import os >import sys >import optparse >import subprocess > >from portage.util.movefile import _copyxattr >from portage.exception import OperationNotSupported > >def parse_args(args): > > parser = optparse.OptionParser(add_help_option=False) > > parser.add_option( > "-b", > action="store_true", > dest="shortopt_b" > ) > parser.add_option( > "--backup", > action="store", > dest="backup" > ) > parser.add_option( > "-c", > action="store_true", > dest="shortopt_c" > ) > parser.add_option( > "--compare", > "-C", > action="store_true", > dest="compare" > ) > parser.add_option( > "--directory", > "-d", > action="store_true", > dest="directory" > ) > parser.add_option( > "-D", > action="store_true", > dest="shortopt_D" > ) > parser.add_option( > "--owner", > "-o", > action="store", > dest="owner" > ) > parser.add_option( > "--group", > "-g", > action="store", > dest="group" > ) > parser.add_option( > "--mode", > "-m", > action="store", > dest="mode" > ) > parser.add_option( > "--preserve-timestamps", > "-p", > action="store_true", > dest="preserve_timestamps" > ) > parser.add_option( > "--strip", > "-s", > action="store_true", > dest="strip" > ) > parser.add_option( > "--strip-program", > action="store", > dest="strip_program" > ) > parser.add_option( > "--suffix", > "-S", > action="store", > dest="suffix" > ) > parser.add_option( > "--target-directory", > "-t", > action="store", > dest="target_directory" > ) > parser.add_option( > "--no-target-directory", > "-T", > action="store_true", > dest="no_target_directory" > ) > parser.add_option( > "--context", > "-Z", > action="store", > dest="context" > ) > parser.add_option( > "--verbose", > "-v", > action="store_true", > dest="verbose" > ) > parser.add_option( > "--help", > action="store_true", > dest="help" > ) > parser.add_option( > "--version", > action="store_true", > dest="version" > ) > return parser.parse_args(args) > >def copy_xattrs(opts, args): > if opts.directory: > return os.EX_OK > > if opts.target_directory is None: > target = args.pop() > target_is_directory = os.path.isdir(target) > else: > target = opts.target_directory > target_is_directory = True > > try: > if target_is_directory: > for source in args: > abs_path = "{t}/{f}".format( > t=target, > f=os.path.basename(source) > ).encode(sys.getfilesystemencoding()) > _copyxattr(source, abs_path) > else: > _copyxattr(args[0], target) > return os.EX_OK > > except OperationNotSupported: > return os.EX_OSERR > >def install_main(args): > opts, args = parse_args(args) > cmdline = [ '/usr/bin/install' ] > cmdline.extend(args) > returncode = subprocess.call(cmdline) > if returncode == os.EX_OK: > returncode = copy_xattrs(opts, args) > return returncode > >if __name__ == "__main__": > encoded_args = [arg.encode(sys.getfilesystemencoding(), 'surrogateescape') for arg in sys.argv[1:]] > sys.exit(install_main(encoded_args))
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 465000
:
351430
|
351470
|
351474
|
351600
|
366866
|
367452
|
367656
|
368280