Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 4003 Details for
Bug 6124
see-changelogs
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
emerge.diff revision 2
emerge.diff (text/plain), 3.03 KB, created by
Toby Dickenson
on 2002-09-18 17:44:40 UTC
(
hide
)
Description:
emerge.diff revision 2
Filename:
MIME Type:
Creator:
Toby Dickenson
Created:
2002-09-18 17:44:40 UTC
Size:
3.03 KB
patch
obsolete
>*** emerge.original Wed Sep 18 20:53:56 2002 >--- emerge Wed Sep 18 23:43:26 2002 >*************** >*** 35,38 **** >--- 35,39 ---- > "--verbose", > "--update", >+ "--changelog", > "--help", > "--oneshot", >*************** >*** 192,195 **** >--- 193,200 ---- > print " package." > print >+ print " "+green("--changelog") >+ print " When pretending, also display the ChangeLog entries for packages" >+ print " that will be upgraded." >+ print > print " "+green("--searchdesc")+" ("+green("-S")+" short option)" > print " Matches the search string against the description field as well" >*************** >*** 860,863 **** >--- 865,869 ---- > > def display(self,mylist): >+ changelogs = [] > for x in mylist: > if x[0]=="blocks": >*************** >*** 882,888 **** >--- 888,949 ---- > elif (not "--emptytree" in myopts) and portage.db[x[1]]["vartree"].exists_specific_cat(x[2]): > addl=" "+turquoise("U")+" " >+ changelogs.extend(self.calc_changelog( >+ portage.portdb.findname(x[2]), >+ portage.db["/"]["vartree"].dep_bestmatch('/'.join(portage.catpkgsplit(x[2])[:2])), >+ x[2] >+ )) > else: > addl=" "+green("N")+" " > print "["+x[0]+" "+addl+"]",x[2],"to",x[1] >+ if "--changelog" in myopts: >+ print >+ for revision,text in changelogs: >+ print bold('*'+revision) >+ sys.stdout.write(text) >+ >+ >+ def calc_changelog(self,ebuildpath,current,next): >+ 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') >+ changelog = open(changelogpath).read() >+ divisions = self.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(self,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] >+ > > def outdated(self):
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 6124
:
2882
|
4000
|
4001
| 4003