author | Rich Burridge <rich.burridge@sun.com> |
Mon, 30 Nov 2009 13:01:40 -0800 | |
changeset 1516 | 8c950a3b4171 |
parent 1407 | 56042994e222 |
child 3275 | ca81b2f0ac63 |
child 3518 | e6b239f75e89 |
permissions | -rw-r--r-- |
1516
8c950a3b4171
10485 move pkg(5) to Python 2.6
Rich Burridge <rich.burridge@sun.com>
parents:
1407
diff
changeset
|
1 |
#!/usr/bin/python |
290
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
2 |
# |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
3 |
# CDDL HEADER START |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
4 |
# |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
5 |
# The contents of this file are subject to the terms of the |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
6 |
# Common Development and Distribution License (the "License"). |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
7 |
# You may not use this file except in compliance with the License. |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
8 |
# |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
9 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
10 |
# or http://www.opensolaris.org/os/licensing. |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
11 |
# See the License for the specific language governing permissions |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
12 |
# and limitations under the License. |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
13 |
# |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
14 |
# When distributing Covered Code, include this CDDL HEADER in each |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
15 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
16 |
# If applicable, add the following below this CDDL HEADER, with the |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
17 |
# fields enclosed by brackets "[]" replaced with your own identifying |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
18 |
# information: Portions Copyright [yyyy] [name of copyright owner] |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
19 |
# |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
20 |
# CDDL HEADER END |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
21 |
# |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
22 |
# Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
23 |
# Use is subject to license terms. |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
24 |
# |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
25 |
|
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
26 |
""" |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
27 |
Most if not all of the os_unix methods apply on Darwin. The methods |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
28 |
below override the definitions from os_unix |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
29 |
""" |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
30 |
|
383
08762e4dac3c
1068 cleanup pylint errors caused by portable package
Tom Mueller <Tom.Mueller@sun.com>
parents:
290
diff
changeset
|
31 |
from os_unix import \ |
08762e4dac3c
1068 cleanup pylint errors caused by portable package
Tom Mueller <Tom.Mueller@sun.com>
parents:
290
diff
changeset
|
32 |
get_isainfo, get_release, get_platform, get_group_by_name, \ |
539
7486304966c5
1449 pkg requires operational history
Shawn Walker <shawn.walker@sun.com>
parents:
481
diff
changeset
|
33 |
get_user_by_name, get_name_by_gid, get_name_by_uid, is_admin, get_userid, \ |
1407
56042994e222
8049 leading / not stripped from file action path on Windows
Tom Mueller <Tom.Mueller@sun.com>
parents:
539
diff
changeset
|
34 |
get_username, chown, rename, remove, link, split_path, get_root, assert_mode |
383
08762e4dac3c
1068 cleanup pylint errors caused by portable package
Tom Mueller <Tom.Mueller@sun.com>
parents:
290
diff
changeset
|
35 |
|
290
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
36 |
import macostools |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
37 |
|
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
38 |
def copyfile(src, dst): |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
39 |
""" |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
40 |
Use the Mac OS X-specific version of copyfile() so that |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
41 |
Mac OS X stuff gets handled properly. |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
42 |
""" |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
43 |
macostools.copy(src, dst) |
6c5c87515614
160 Make IPS cross-platform for use across other supported OS's (missing files)
Tom Mueller <Tom.Mueller@Sun.COM>
parents:
diff
changeset
|
44 |