24 # Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
24 # Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
25 # Use is subject to license terms. |
25 # Use is subject to license terms. |
26 # |
26 # |
27 |
27 |
28 import os |
28 import os |
|
29 import pkg.misc as misc |
29 from pkg.sysvpkg import SolarisPackage |
30 from pkg.sysvpkg import SolarisPackage |
30 from pkg.cpiofile import CpioFile |
31 from pkg.cpiofile import CpioFile |
31 from pkg.actions import * |
32 from pkg.actions import * |
32 |
33 |
33 class SolarisPackageDirBundle(object): |
34 class SolarisPackageDirBundle(object): |
93 |
94 |
94 def action(self, mapline, data): |
95 def action(self, mapline, data): |
95 if mapline.type in "fev": |
96 if mapline.type in "fev": |
96 return file.FileAction(data, mode=mapline.mode, |
97 return file.FileAction(data, mode=mapline.mode, |
97 owner=mapline.owner, group=mapline.group, |
98 owner=mapline.owner, group=mapline.group, |
98 path=mapline.pathname) |
99 path=mapline.pathname, |
|
100 timestamp=misc.time_to_timestamp(int(mapline.modtime))) |
|
101 |
99 elif mapline.type in "dx": |
102 elif mapline.type in "dx": |
100 return directory.DirectoryAction(mode=mapline.mode, |
103 return directory.DirectoryAction(mode=mapline.mode, |
101 owner=mapline.owner, group=mapline.group, |
104 owner=mapline.owner, group=mapline.group, |
102 path=mapline.pathname) |
105 path=mapline.pathname) |
103 elif mapline.type == "s": |
106 elif mapline.type == "s": |