Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 181526 Details for
Bug 256953
emerge sometimes does not update .pyc and .pyo files
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Script to remerge affected packages
bug256953d.py (text/plain), 1.38 KB, created by
Martin von Gagern
on 2009-02-10 09:07:13 UTC
(
hide
)
Description:
Script to remerge affected packages
Filename:
MIME Type:
Creator:
Martin von Gagern
Created:
2009-02-10 09:07:13 UTC
Size:
1.38 KB
patch
obsolete
>#!/usr/bin/python > >from __future__ import with_statement > >import struct >import re >import imp >from os import listdir, stat, execvp >from os.path import join, isdir, isfile >from sys import argv > >contpy = re.compile(r"obj (.*\.py) ") > >def needRecompile(): > with open(cpath, "r") as cont: > for entry in cont: > match = contpy.match(entry) > if match is None: continue > py = match.group(1) > if not isfile(py): continue > mtime = stat(py).st_mtime > expect = struct.pack('<4sl', imp.get_magic(), mtime) > for ext in ["c", "o"]: > pyc = py + ext > if not isfile(pyc): continue > with open(pyc, "rb") as chandle: > actual = chandle.read(8) > if expect == actual: continue > return True > return False > >print "Looking for packages that need to be recompiled" >toRecompile = [] >dbdir = "/var/db/pkg"; >for grp in listdir(dbdir): > gdir = join(dbdir, grp) > if not isdir(gdir): continue > for pkg in listdir(gdir): > if pkg == "python" and grp == "dev-lang": continue > cpath = join(gdir, pkg, "CONTENTS") > if not isfile(cpath): continue > if needRecompile(): > toRecompile.append("=%s/%s" % (grp, pkg)) > print "%s/%s" % (grp, pkg) > >execvp("emerge", ["emerge", "--oneshot"] + argv[1:] + toRecompile)
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 Raw
Actions:
View
Attachments on
bug 256953
:
180696
|
180702
|
181517
| 181526 |
181535