<s> """<STR_LIT>""" <EOL> import os <EOL> import platform <EOL> import stat <EOL> from gcimagebundlelib import exclude_spec <EOL> from gcimagebundlelib import os_platform <EOL> class LinuxPlatform ( os_platform . Platform ) : <EOL> """<STR_LIT>""" <EOL> EXCLUDE_LIST = [ <EOL> exclude_spec . ExcludeSpec ( '<STR_LIT>' ) , <EOL> exclude_spec . ExcludeSpec ( '<STR_LIT>' , preserve_dir = True ) , <EOL> exclude_spec . ExcludeSpec ( '<STR_LIT>' , preserve_dir = True ) , <EOL> exclude_spec . ExcludeSpec ( '<STR_LIT>' , <EOL> preserve_dir = True , preserve_subdir = True ) , <EOL> exclude_spec . ExcludeSpec ( '<STR_LIT>' ) , <EOL> exclude_spec . ExcludeSpec ( '<STR_LIT>' , preserve_dir = True ) , <EOL> exclude_spec . ExcludeSpec ( '<STR_LIT>' , preserve_dir = True ) , <EOL> exclude_spec . ExcludeSpec ( '<STR_LIT>' , <EOL> preserve_dir = True ) , <EOL> exclude_spec . ExcludeSpec ( '<STR_LIT>' , <EOL> preserve_dir = True , preserve_subdir = True ) , <EOL> exclude_spec . ExcludeSpec ( '<STR_LIT>' , <EOL> preserve_dir = True , preserve_subdir = True ) , <EOL> exclude_spec . ExcludeSpec ( '<STR_LIT>' , <EOL> preserve_dir = True , preserve_subdir = True ) ] <EOL> def __init__ ( self ) : <EOL> """<STR_LIT>""" <EOL> super ( LinuxPlatform , self ) . __init__ ( ) <EOL> ( self . name , self . hostname , self . release , self . version , self . architecture , <EOL> self . processor ) = platform . uname ( ) <EOL> ( self . distribution , self . distribution_version , <EOL> self . distribution_codename ) = platform . dist ( ) <EOL> def GetPlatformDetails ( self ) : <EOL> return '<STR_LIT:U+0020>' . join ( [ self . name , self . hostname , self . release , self . version , <EOL> self . architecture , self . processor , self . distribution , <EOL> self . distribution_version , self . distribution_codename ] ) <EOL> def GetName ( self ) : <EOL> return self . GetOs ( ) <EOL> def GetProcessor ( self ) : <EOL> return platform . processor ( ) <EOL> def GetArchitecture ( self ) : <EOL> if self . architecture : <EOL> return self . architecture <EOL> return '<STR_LIT>' <EOL> def GetOs ( self ) : <EOL> if self . distribution : <EOL> if self . distribution_codename : <EOL> return '<STR_LIT>' % ( self . distribution , self . distribution_codename ) <EOL> else : <EOL> return self . distribution <EOL> if self . name : <EOL> return self . name <EOL> return '<STR_LIT>' <EOL> def IsLinux ( self ) : <EOL> return True <EOL> def GetKernelVersion ( self ) : <EOL> return self . release <EOL> def GetDistribution ( self ) : <EOL> return self . distribution <EOL> def GetDistributionCodeName ( self ) : <EOL> return self . distribution_codename <EOL> def GetDistributionVersion ( self ) : <EOL> return self . distribution_version <EOL> def GetPlatformSpecialFiles ( self , tmpdir = '<STR_LIT>' ) : <EOL> """<STR_LIT>""" <EOL> retval = [ ] <EOL> console_dev = os . makedev ( <NUM_LIT:5> , <NUM_LIT:1> ) <EOL> os . mknod ( tmpdir + '<STR_LIT>' , stat . S_IFCHR | <EOL> stat . S_IRUSR | stat . S_IWUSR , console_dev ) <EOL> retval . append ( ( tmpdir + '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> null_dev = os . makedev ( <NUM_LIT:1> , <NUM_LIT:3> ) <EOL> os . mknod ( tmpdir + '<STR_LIT:null>' , stat . S_IFCHR | <EOL> stat . S_IRUSR | stat . S_IWUSR | stat . S_IRGRP | stat . S_IWGRP | <EOL> stat . S_IROTH | stat . S_IWOTH , null_dev ) <EOL> retval . append ( ( tmpdir + '<STR_LIT:null>' , '<STR_LIT>' ) ) <EOL> tty_dev = os . makedev ( <NUM_LIT:5> , <NUM_LIT:0> ) <EOL> os . mknod ( tmpdir + '<STR_LIT>' , stat . S_IFCHR | <EOL> stat . S_IRUSR | stat . S_IWUSR | stat . S_IRGRP | stat . S_IWGRP | <EOL> stat . S_IROTH | stat . S_IWOTH , tty_dev ) <EOL> retval . append ( ( tmpdir + '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> zero_dev = os . makedev ( <NUM_LIT:1> , <NUM_LIT:5> ) <EOL> os . mknod ( tmpdir + '<STR_LIT>' , stat . S_IFCHR | <EOL> stat . S_IRUSR | stat . S_IWUSR | stat . S_IRGRP | stat . S_IWGRP | <EOL> stat . S_IROTH | stat . S_IWOTH , zero_dev ) <EOL> retval . append ( ( tmpdir + '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> if os . path . isdir ( '<STR_LIT>' ) : <EOL> os . mkdir ( tmpdir + '<STR_LIT>' , <NUM_LIT:0> <NUM_LIT> ) <EOL> retval . append ( ( tmpdir + '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> return retval <EOL> def Overwrite ( self , filename , arcname , tmpdir = '<STR_LIT>' ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def GetPreferredFilesystemType ( self ) : <EOL> """<STR_LIT>""" <EOL> return '<STR_LIT>' </s>
