Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 131800 Details for
Bug 190179
[patch] portage fails package checksum verifications when sys-devel/prelink is enabled, if not running as root
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
use prelink --verify and also use mkstemp to avoid need for lock file
prelink-cksum.patch (text/plain), 1.44 KB, created by
Zac Medico
on 2007-09-24 20:38:28 UTC
(
hide
)
Description:
use prelink --verify and also use mkstemp to avoid need for lock file
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2007-09-24 20:38:28 UTC
Size:
1.44 KB
patch
obsolete
>Index: pym/portage_checksum.py >=================================================================== >--- pym/portage_checksum.py (revision 7801) >+++ pym/portage_checksum.py (working copy) >@@ -10,6 +10,7 @@ > import os > import errno > import stat >+import tempfile > import portage_exception > import portage_exec > import portage_locks >@@ -201,16 +202,19 @@ > """ > global prelink_capable > myfilename = filename[:] >- prelink_tmpfile = os.path.join("/", PRIVATE_PATH, "prelink-checksum.tmp." + str(os.getpid())) >+ prelink_tmpfile = None > mylock = None > try: > if calc_prelink and prelink_capable: >- mylock = portage_locks.lockfile(prelink_tmpfile, wantnewlockfile=1) > # Create non-prelinked temporary file to checksum. > # Files rejected by prelink are summed in place. > try: >- retval = portage_exec.spawn([PRELINK_BINARY, "--undo", "-o", >- prelink_tmpfile, filename], fd_pipes={}) >+ tmpfile_fd, prelink_tmpfile = tempfile.mkstemp() >+ try: >+ retval = portage_exec.spawn([PRELINK_BINARY, >+ "--verify", filename], fd_pipes={1:tmpfile_fd}) >+ finally: >+ os.close(tmpfile_fd) > if retval == os.EX_OK: > myfilename = prelink_tmpfile > except portage_exception.CommandNotFound: >@@ -225,7 +229,7 @@ > if e.errno == errno.ENOENT: > raise portage_exception.FileNotFound(myfilename) > raise >- if calc_prelink and prelink_capable: >+ if prelink_tmpfile: > try: > os.unlink(prelink_tmpfile) > except OSError, e:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 190179
:
129160
| 131800