Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 249688 Details for
Bug 336580
how to set up a server for emerge-delta-webrsync?
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
python script that snapshots-create.sh uses
clean-old-deltas.py (text/plain), 1.28 KB, created by
Zac Medico
on 2010-10-05 23:08:11 UTC
(
hide
)
Description:
python script that snapshots-create.sh uses
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2010-10-05 23:08:11 UTC
Size:
1.28 KB
patch
obsolete
>#!/usr/bin/python > >import os,sys >if len(sys.argv) != 4: > print "need 3 args, first being directory to scan, second being latest, third being it's size" > sys.exit(1) > >path=sys.argv[1] >maxsize=long(sys.argv[3]) >if len(sys.argv[2]) != 8: > print "date arg must be YYYYMMDD" > sys.exit(1) >root = sys.argv[2] > >if not hasattr(__builtins__, "set"): > from sets import Set as set >file_list = [x for x in os.listdir(path) if os.path.isfile(os.path.join(path, x))] >pref_name="snapshot-" >post_name=".patch.bz2" >deltas = [x for x in file_list if x.startswith(pref_name) and x.endswith(post_name)] >chains={} >for x in deltas: > try: > start, end = x[len(pref_name):-len(post_name)].split("-") > except ValueError: > continue > if end in chains: > print "warning, end %s already exists; this is a bit weird" % end > continue > chains[end] = start > >save_files = set() >node = root >count = 0 >while node in chains: > s="%s%s-%s%s" % (pref_name, chains[node], node, post_name) > count += os.stat(os.path.join(path, s)).st_size > if count > maxsize: > break > save_files.update([s, s+".md5sum", s+".gpgsig"]) > node = chains[node] > >for x in file_list: > if x not in save_files: > print "nuking %s" % x > try: > os.unlink(os.path.join(path,x)) > except OSError, oe: > print "failed removing %s cause of %s" % (os.path.join(path, x), str(oe))
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 336580
:
249686
| 249688 |
249690
|
249692