Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 266773 Details for
Bug 359851
app-admin/webapp-config doesn't work with `cave' (sys-apps/paludis)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
My amateur fix :)
use-cave-instead-paludis.patch (text/plain), 3.22 KB, created by
Alex Turbov
on 2011-03-21 21:36:36 UTC
(
hide
)
Description:
My amateur fix :)
Filename:
MIME Type:
Creator:
Alex Turbov
Created:
2011-03-21 21:36:36 UTC
Size:
3.22 KB
patch
obsolete
>--- wrapper.py.org 2011-03-21 23:04:02.000000000 +0300 >+++ wrapper.py 2011-03-22 00:05:55.000000000 +0300 >@@ -26,13 +26,15 @@ > # Dependencies > # ------------------------------------------------------------------------ > >-import sys, os, types, string >+import sys, os, types, string, subprocess > > from WebappConfig.debug import OUT > > from WebappConfig.debug import OUT > from WebappConfig.version import WCVERSION > >+from subprocess import PIPE >+ > # ======================================================================== > # Portage Wrapper > # ------------------------------------------------------------------------ >@@ -54,16 +56,15 @@ > return portage.settings['CONFIG_PROTECT'] > > elif pm == "paludis": >- cmd="paludis --log-level silent --no-color --environment-variable %s/%s CONFIG_PROTECT" % (cat,pn) >+ cmd="cave --log-level silent --colour no print-id-environment-variable --variable-name CONFIG_PROTECT %s/%s::installed" % (cat,pn) > >- fi, fo, fe = os.popen3(cmd) >- fi.close() >- result_lines = fo.readlines() >- error_lines = fe.readlines() >- fo.close() >- fe.close() >+ p = subprocess.Popen(cmd, shell = True, stdout = PIPE, stderr = PIPE) >+ result_lines = p.stdout.readlines() >+ error_lines = p.stderr.readlines() >+ p.stdout.close() >+ p.stderr.close() > >- return string.join(result_lines, ' ').strip() >+ return string.join(result_lines, ' ').replace('CONFIG_PROTECT=', '').strip() > else: > OUT.die("Unknown package manager: " + pm) > >@@ -100,17 +101,18 @@ > pn = config.maybe_get('pn') > > if cat and pn: >- cmd="paludis --log-level silent --no-color --environment-variable %s/%s ROOT" % (cat,pn) >- >- fi, fo, fe = os.popen3(cmd) >- fi.close() >- result_lines = fo.readlines() >- error_lines = fe.readlines() >- fo.close() >- fe.close() >+ cmd="cave --log-level silent --colour no print-id-environment-variable --variable-name ROOT %s/%s::installed" % (cat,pn) > >- if result_lines[0].strip(): >- return result_lines[0].strip() >+ p = subprocess.Popen(cmd, shell = True, stdout = PIPE, stderr = PIPE) >+ result_lines = p.stdout.readlines() >+ error_lines = p.stderr.readlines() >+ p.stdout.close() >+ p.stderr.close() >+ # TODO Check if some error occurs... >+ >+ path = result_lines[0].strip().replace('ROOT=', '') >+ if path: >+ return path > else: > return '/' > else: >@@ -145,14 +147,13 @@ > > elif pm == "paludis": > >- cmd="paludis --best-version %s" % (full_name) >+ cmd="cave print-best-version '%s'" % (full_name) > >- fi, fo, fe = os.popen3(cmd) >- fi.close() >- result_lines = fo.readlines() >- error_lines = fe.readlines() >- fo.close() >- fe.close() >+ p = subprocess.Popen(cmd, shell = True, stdout = PIPE, stderr = PIPE) >+ result_lines = p.stdout.readlines() >+ error_lines = p.stderr.readlines() >+ p.stdout.close() >+ p.stderr.close() > > if error_lines: > for i in error_lines:
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 359851
: 266773