/[gli]/branches/qs/src/GLIPortage.py
Gentoo

Diff of /branches/qs/src/GLIPortage.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1221 Revision 1222
3# This source code is distributed under the terms of version 2 of the GNU 3# This source code is distributed under the terms of version 2 of the GNU
4# General Public License as published by the Free Software Foundation, a copy 4# General Public License as published by the Free Software Foundation, a copy
5# of which can be found in the main directory of this project. 5# of which can be found in the main directory of this project.
6Gentoo Linux Installer 6Gentoo Linux Installer
7 7
8$Id: GLIPortage.py,v 1.30 2006/01/06 16:39:49 agaffney Exp $ 8$Id: GLIPortage.py,v 1.31 2006/01/06 16:46:16 agaffney Exp $
9""" 9"""
10 10
11import re 11import re
12import os 12import os
13import GLIUtility 13import GLIUtility
59 return entries 59 return entries
60 for line in vdbfile.readlines(): 60 for line in vdbfile.readlines():
61 parts = line.strip().split(" ") 61 parts = line.strip().split(" ")
62 if parts[0] == "obj": 62 if parts[0] == "obj":
63 entries.append(parts[1]) 63 entries.append(parts[1])
64 elif parts[0] == "dir": 64# elif parts[0] == "dir":
65 entries.append(parts[1] + "/") 65# entries.append(parts[1] + "/")
66 elif parts[0] == "sym": 66 elif parts[0] == "sym":
67 entries.append(" ".join(parts[1:4])) 67 entries.append(" ".join(parts[1:4]))
68 entries.sort() 68 entries.sort()
69 return entries 69 return entries
70 70
101 if self._debug: self._logger.log("DEBUG: copy_pkg_to_chroot: files for " + package + ": " + str(entries)) 101 if self._debug: self._logger.log("DEBUG: copy_pkg_to_chroot: files for " + package + ": " + str(entries))
102 try: 102 try:
103 tarfiles = open("/tmp/tarfilelist", "w") 103 tarfiles = open("/tmp/tarfilelist", "w")
104 for entry in entries: 104 for entry in entries:
105 parts = entry.split(" ") 105 parts = entry.split(" ")
106 # Hack for symlink crappiness 106# # Hack for symlink crappiness
107# for symlink in symlinks: 107# for symlink in symlinks:
108# if parts[0].startswith(symlink): 108# if parts[0].startswith(symlink):
109# parts[0] = symlinks[symlink] + parts[0][len(symlink):] 109# parts[0] = symlinks[symlink] + parts[0][len(symlink):]
110 tarfiles.write(parts[0] + "\n") 110 tarfiles.write(parts[0] + "\n")
111 tarfiles.close() 111 tarfiles.close()
112 except: 112 except:
113 raise GLIException("CopyPackageToChrootError", 'fatal', 'copy_pkg_to_chroot', "Could not create filelist for " + package) 113 raise GLIException("CopyPackageToChrootError", 'fatal', 'copy_pkg_to_chroot', "Could not create filelist for " + package)
114 114
115 # Use tar to transfer files into IMAGE directory 115 # Use tar to transfer files into IMAGE directory
116 if self._debug: self._logger.log("DEBUG: copy_pkg_to_chroot(): running 'tar -c --files-from=/tmp/tarfilelist --no-recursion 2>/dev/null | tar -C " + self._chroot_dir + image_dir + " -x'") 116 if self._debug: self._logger.log("DEBUG: copy_pkg_to_chroot(): running 'tar -cp --files-from=/tmp/tarfilelist --no-recursion 2>/dev/null | tar -C " + self._chroot_dir + image_dir + " -xp'")
117 if not GLIUtility.exitsuccess(GLIUtility.spawn("tar -c --files-from=/tmp/tarfilelist --no-recursion 2>/dev/null | tar -C " + self._chroot_dir + image_dir + " -x")): 117 if not GLIUtility.exitsuccess(GLIUtility.spawn("tar -cp --files-from=/tmp/tarfilelist --no-recursion 2>/dev/null | tar -C " + self._chroot_dir + image_dir + " -xp")):
118 raise GLIException("CopyPackageToChrootError", 'fatal', 'copy_pkg_to_chroot', "Could not execute tar for " + package) 118 raise GLIException("CopyPackageToChrootError", 'fatal', 'copy_pkg_to_chroot', "Could not execute tar for " + package)
119 119
120# # More symlink crappiness hacks 120# # More symlink crappiness hacks
121# for symlink in symlinks: 121# for symlink in symlinks:
122## if GLIUtility.is_file(self._chroot_dir + image_dir + symlinks[symlink]): 122## if GLIUtility.is_file(self._chroot_dir + image_dir + symlinks[symlink]):

Legend:
Removed from v.1221  
changed lines
  Added in v.1222

  ViewVC Help
Powered by ViewVC 1.1.20