Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 110967 Details for
Bug 167668
Update default rsync excludes to skip digests
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
script that scans the whole portage tree missing distfiles hashes
check_dist_hashes.py (text/plain), 1.25 KB, created by
Zac Medico
on 2007-02-22 09:05:53 UTC
(
hide
)
Description:
script that scans the whole portage tree missing distfiles hashes
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2007-02-22 09:05:53 UTC
Size:
1.25 KB
patch
obsolete
>#!/usr/bin/env python > >import os, sys > >def check_dist_hashes(required_hash_types=None): > os.environ["PORTDIR_OVERLAY"] = "" > import portage > from portage import Manifest, FetchlistDict > from portage_const import MANIFEST2_HASH_FUNCTIONS > trees = portage.db > settings = portage.settings > myroot = settings["ROOT"] > portdb = trees[myroot]["porttree"].dbapi > portdir = settings["PORTDIR"] > if not required_hash_types: > required_hash_types = set() > required_hash_types.add("size") > manifest2_hash_types = set(MANIFEST2_HASH_FUNCTIONS) > > for cp in portdb.cp_all(): > missing_data = False > pkgdir = os.path.join(portdir, cp) > fetchlist_dict = FetchlistDict(pkgdir, settings, portdb) > mf = Manifest(pkgdir, settings["DISTDIR"], > fetchlist_dict=fetchlist_dict) > dist_hashes = mf.fhashdict.get("DIST", {}) > distfiles_set = set() > for myfiles in fetchlist_dict.itervalues(): > distfiles_set.update(myfiles) > for myfile in distfiles_set: > myhashes = dist_hashes.get(myfile) > if not myhashes: > missing_data = True > yield cp > break > if required_hash_types.difference(myhashes): > yield cp > break > if not manifest2_hash_types.intersection(myhashes): > yield cp > break > >if __name__ == "__main__": > for cp in check_dist_hashes(set(sys.argv[1:])): > print cp
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 167668
:
110770
|
110787
| 110967 |
111010
|
111253