Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 86344 Details for
Bug 132548
esearch fix for multiple overlay, and few other 'bugs'
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
132548-multiple-overlay.patch
132548-multiple-overlay.patch (text/plain), 4.46 KB, created by
samLT
on 2006-05-07 04:18:03 UTC
(
hide
)
Description:
132548-multiple-overlay.patch
Filename:
MIME Type:
Creator:
samLT
Created:
2006-05-07 04:18:03 UTC
Size:
4.46 KB
patch
obsolete
>diff -Naru esearch-0.7.1/esearch.py esearch-0.7.1-tmp/esearch.py >--- esearch-0.7.1/esearch.py 2006-05-07 12:27:59.481566744 +0200 >+++ esearch-0.7.1-tmp/esearch.py 2006-05-07 12:37:17.006810024 +0200 >@@ -64,16 +64,16 @@ > if fatal: > sys.exit(1) > >-def searchEbuilds(path, portdir = True, searchdef = ""): >+def searchEbuilds(path, portdir = True, searchdef = "", repo_num = ""): > global ebuilds, output, defebuild > pv = "" > pkgs = [] > nr = len(ebuilds) + 1 > > if portdir: >- rep = darkgreen("Portage") >+ rep = darkgreen("Portage ") > else: >- rep = red("Overlay") >+ rep = red("Overlay "+str(repo_num)+" ") > > if isdir(path): > list = listdir(path) >@@ -82,7 +82,7 @@ > if file[-7:] == ".ebuild": > pv = file[:-7] > pkgs.append(pkgsplit(pv)) >- pkgs[-1].append(path + "/" + file) >+ pkgs[-1].append(path + file) > if searchdef != "" and pv == searchdef: > defebuild = (searchdef, pkgs[-1][3]) > pkgs.sort(pkgcmp) >@@ -91,9 +91,9 @@ > if pkg[2] != "r0": > rev = "-" + pkg[2] > output.append(" " + rep + " [" + bold(str(nr)) + "] " + pkg[0] + "-" + pkg[1] + rev + "\n") >- ebuilds.append(pkg[3]) >+ ebuilds.append(pkg[len(pkg)-1]) > nr += 1 >- >+ > NORMAL = 1 > COMPACT = 2 > VERBOSE = 3 >@@ -128,7 +128,7 @@ > from output import blue > from common import version > outputm = VERBOSE >- elif arg in ("-e", "--ebuilds"): >+ elif arg in ("-e", "--ebuild"): > from os import listdir, getenv, system > from os.path import isdir > from portage import settings, pkgcmp, pkgsplit >@@ -313,12 +313,14 @@ > else: > searchdef = "" > >- searchEbuilds("%s/%s/" % (portdir, pkg[1]), True, searchdef) >+ searchEbuilds("%s/%s/" % (portdir, pkg[1]), True, searchdef, "") > if overlay: >- searchEbuilds("%s/%s/" % (overlay, pkg[1]), False, searchdef) >+ repo_num=1 >+ for repo in overlay.split(): >+ searchEbuilds("%s/%s/" % ( repo, pkg[1]), False, searchdef,repo_num) >+ repo_num += 1 > > output.append("\n") >- > count += 1 > > regexlist[i][2] = "".join(output) >@@ -338,34 +340,42 @@ > if outputm == NORMAL: > print "" > >-if outputm == EBUILDS and count != 0: >- if count > 1: >- defebuild = (0, 0) > >- if len(ebuilds) == 1: >- nr = 1 >- else: >- if defebuild[0] != 0: >- print bold("Show Ebuild"), " (" + darkgreen(defebuild[0]) + "): ", >+if outputm == EBUILDS: >+ if overlay: >+ repo_num=1 >+ for repo in overlay.split(): >+ print red("Overlay "+str(repo_num)+" : "+repo) >+ repo_num += 1 >+ >+ if count != 0: >+ if count > 1: >+ defebuild = (0, 0) >+ >+ if len(ebuilds) == 1: >+ nr = 1 > else: >- print bold("Show Ebuild: "), >+ if defebuild[0] != 0: >+ print bold("\nShow Ebuild"), " (" + darkgreen(defebuild[0]) + "): ", >+ else: >+ print bold("\nShow Ebuild: "), >+ try: >+ nr = sys.stdin.readline() >+ except KeyboardInterrupt: >+ sys.exit(1) > try: >- nr = sys.stdin.readline() >- except KeyboardInterrupt: >- sys.exit(1) >- try: >- editor = getenv("EDITOR") >- if editor: >- system(editor + " " + ebuilds[int(nr) - 1]) >- else: >- print "" >- error("Please set EDITOR", False) >- except IndexError: >- print "" >- error("No such ebuild", False) >- except ValueError: >- if defebuild[0] != 0: >- system(editor + " " + defebuild[1]) >- else: >+ editor = getenv("EDITOR") >+ if editor: >+ system(editor + " " + ebuilds[int(nr) - 1]) >+ else: >+ print "" >+ error("Please set EDITOR", False) >+ except IndexError: > print "" >- error("Please enter a valid number", False) >+ error("No such ebuild", False) >+ except ValueError: >+ if defebuild[0] != 0: >+ system(editor + " " + defebuild[1]) >+ else: >+ print "" >+ error("Please enter a valid number", False)
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 132548
:
86344
|
86345
|
87011
|
87013