parameters: (build_os, arch, spec, where)
docstring: Unpack the tarfile for (build_os, arch, spec) into directory where.
docstring_summary: Unpack the tarfile for (build_os, arch, spec) into directory where.
docstring_tokens: Unpack the tarfile for ( build_os arch spec ) into directory where .
function: def unpack_binaries_into(build_os, arch, spec, where):
      """Unpack the tarfile for (build_os, arch, spec) into directory where."""
      rootdir=os.getcwd()
      packager.ensure_dir(where)
      # Note: POSIX tar doesn't require support for gtar's "-C" option,
      # and Python's tarfile module prior to Python 2.7 doesn't have the
      # features to make this detail easy.  So we'll just do the dumb
      # thing and chdir into where and run tar there.
      os.chdir(where)
      try:
  	packager.sysassert(["tar", "xvzf", rootdir+"/"+tarfile(build_os, arch, spec)])
      	release_dir = glob('mongodb-linux-*')[0]
          for releasefile in "bin", "snmp", "LICENSE.txt", "README", "THIRD-PARTY-NOTICES", "MPL-2":
              os.rename("%s/%s" % (release_dir, releasefile), releasefile)
          os.rmdir(release_dir)
      except Exception:
          exc=sys.exc_value
          os.chdir(rootdir)
          raise exc
      os.chdir(rootdir)
function_tokens: def unpack_binaries_into ( build_os , arch , spec , where ) : rootdir = os . getcwd ( ) packager . ensure_dir ( where ) # Note: POSIX tar doesn't require support for gtar's "-C" option, # and Python's tarfile module prior to Python 2.7 doesn't have the # features to make this detail easy.  So we'll just do the dumb # thing and chdir into where and run tar there. os . chdir ( where ) try : packager . sysassert ( [ "tar" , "xvzf" , rootdir + "/" + tarfile ( build_os , arch , spec ) ] ) release_dir = glob ( 'mongodb-linux-*' ) [ 0 ] for releasefile in "bin" , "snmp" , "LICENSE.txt" , "README" , "THIRD-PARTY-NOTICES" , "MPL-2" : os . rename ( "%s/%s" % ( release_dir , releasefile ) , releasefile ) os . rmdir ( release_dir ) except Exception : exc = sys . exc_value os . chdir ( rootdir ) raise exc os . chdir ( rootdir )