Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 4000 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; changes to portage 2.0.36 to add --changelog
emerge.diff (text/plain), 2.97 KB, created by
Toby Dickenson
on 2002-09-18 16:13:36 UTC
(
hide
)
Description:
emerge.diff; changes to portage 2.0.36 to add --changelog
Filename:
MIME Type:
Creator:
Toby Dickenson
Created:
2002-09-18 16:13:36 UTC
Size:
2.97 KB
patch
obsolete
>*** emerge.original Wed Sep 18 20:53:56 2002 >--- emerge Wed Sep 18 21:55:32 2002 >*************** >*** 34,39 **** >--- 34,40 ---- > "--searchdesc", > "--verbose", > "--update", >+ "--changelog", > "--help", > "--oneshot", > "--version"] >*************** >*** 191,196 **** >--- 192,201 ---- > print " U = upgrading, R = replacing, B = blocked by an already installed" > 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" > print " the package's name. Take caution as the descriptions are also" >*************** >*** 859,864 **** >--- 864,870 ---- > return myk > > def display(self,mylist): >+ changelogs = [] > for x in mylist: > if x[0]=="blocks": > addl=""+red("B")+" " >*************** >*** 881,889 **** >--- 887,942 ---- > addl=" "+yellow("R")+" " > 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:]) >+ next = '-'.join(portage.catpkgsplit(next)[1:]) >+ changelogpath = os.path.join(os.path.split(ebuildpath)[0],'ChangeLog') >+ changelog = open(changelogpath).read() >+ divisions = self.find_changelog_tags(changelog) >+ # 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.]*-[-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) >+ > > def outdated(self): > return self.outdatedpackages
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