Lines 181-186
Link Here
|
181 |
@rtype: Tuple |
181 |
@rtype: Tuple |
182 |
@return: The hash and size of the data |
182 |
@return: The hash and size of the data |
183 |
""" |
183 |
""" |
|
|
184 |
global prelink_capable |
184 |
myfilename = filename[:] |
185 |
myfilename = filename[:] |
185 |
prelink_tmpfile = os.path.join("/", PRIVATE_PATH, "prelink-checksum.tmp." + str(os.getpid())) |
186 |
prelink_tmpfile = os.path.join("/", PRIVATE_PATH, "prelink-checksum.tmp." + str(os.getpid())) |
186 |
mylock = None |
187 |
mylock = None |
Lines 189-198
Link Here
|
189 |
mylock = portage_locks.lockfile(prelink_tmpfile, wantnewlockfile=1) |
190 |
mylock = portage_locks.lockfile(prelink_tmpfile, wantnewlockfile=1) |
190 |
# Create non-prelinked temporary file to checksum. |
191 |
# Create non-prelinked temporary file to checksum. |
191 |
# Files rejected by prelink are summed in place. |
192 |
# Files rejected by prelink are summed in place. |
192 |
retval = portage_exec.spawn([PRELINK_BINARY, "--undo", "-o", |
193 |
try: |
193 |
prelink_tmpfile, filename], fd_pipes={}) |
194 |
retval = portage_exec.spawn([PRELINK_BINARY, "--undo", "-o", |
194 |
if retval == os.EX_OK: |
195 |
prelink_tmpfile, filename], fd_pipes={}) |
195 |
myfilename = prelink_tmpfile |
196 |
if retval == os.EX_OK: |
|
|
197 |
myfilename = prelink_tmpfile |
198 |
except portage_exception.CommandNotFound: |
199 |
# This happens during uninstallation of prelink. |
200 |
prelink_capable = False |
196 |
try: |
201 |
try: |
197 |
if hashname not in hashfunc_map: |
202 |
if hashname not in hashfunc_map: |
198 |
raise portage_exception.DigestException(hashname + \ |
203 |
raise portage_exception.DigestException(hashname + \ |