Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 195597 Details for
Bug 275217
sys-apps/portage: implement backtracking for slot conflicts
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
changelog.py for part2
changelog.py (text/plain), 1.74 KB, created by
Sebastian Luther (few)
on 2009-06-23 20:17:33 UTC
(
hide
)
Description:
changelog.py for part2
Filename:
MIME Type:
Creator:
Sebastian Luther (few)
Created:
2009-06-23 20:17:33 UTC
Size:
1.74 KB
patch
obsolete
>import os >import re > >try: > import portage >except ImportError: > from os import path as osp > import sys > sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym")) > import portage > >def calc_changelog(ebuildpath,current,next): > if ebuildpath == None or not os.path.exists(ebuildpath): > return [] > current = '-'.join(portage.catpkgsplit(current)[1:]) > if current.endswith('-r0'): > current = current[:-3] > next = '-'.join(portage.catpkgsplit(next)[1:]) > if next.endswith('-r0'): > next = next[:-3] > changelogpath = os.path.join(os.path.split(ebuildpath)[0],'ChangeLog') > try: > changelog = open(changelogpath).read() > except SystemExit, e: > raise # Needed else can't exit > except: > return [] > divisions = _find_changelog_tags(changelog) > #print 'XX from',current,'to',next > #for div,text in divisions: print 'XX',div > # skip entries for all revisions above the one we are about to emerge > for i in range(len(divisions)): > if divisions[i][0]==next: > divisions = divisions[i:] > break > # find out how many entries we are going to display > for i in range(len(divisions)): > if divisions[i][0]==current: > divisions = divisions[:i] > break > else: > # couldnt find the current revision in the list. display nothing > return [] > return divisions > >def _find_changelog_tags(changelog): > divs = [] > release = None > while 1: > match = re.search(r'^\*\ ?([-a-zA-Z0-9_.+]*)(?:\ .*)?\n',changelog,re.M) > if match is None: > if release is not None: > divs.append((release,changelog)) > return divs > if release is not None: > divs.append((release,changelog[:match.start()])) > changelog = changelog[match.end():] > release = match.group(1) > if release.endswith('.ebuild'): > release = release[:-7] > if release.endswith('-r0'): > release = release[:-3]
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 275217
:
195594
|
195595
| 195597 |
195653
|
196212
|
196543