Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 439476 Details for
Bug 587856
app-portage/gentoolkit: uses deprecated PORTDIR_OVERLAY variable internally
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
eshowkw: migrate to PORTAGE_REPOSITORIES
0001-eshowkw-migrate-to-PORTAGE_REPOSITORIES-bug-587856.patch (text/plain), 2.29 KB, created by
Zac Medico
on 2016-07-03 06:14:37 UTC
(
hide
)
Description:
eshowkw: migrate to PORTAGE_REPOSITORIES
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2016-07-03 06:14:37 UTC
Size:
2.29 KB
patch
obsolete
>From 5ff58cc4faf02ce1e9e09fba32f2a666470512e6 Mon Sep 17 00:00:00 2001 >From: Zac Medico <zmedico@gentoo.org> >Date: Sat, 2 Jul 2016 23:08:13 -0700 >Subject: [PATCH] eshowkw: migrate to PORTAGE_REPOSITORIES (bug 587856) > >Since PORTDIR_OVERLAY is deprecated, migrate to PORTAGE_REPOSITORIES. > >X-Gentoo-bug: 587856 >X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=587856 >--- > pym/gentoolkit/eshowkw/__init__.py | 32 +++++++++++++++++++++++++++----- > 1 file changed, 27 insertions(+), 5 deletions(-) > >diff --git a/pym/gentoolkit/eshowkw/__init__.py b/pym/gentoolkit/eshowkw/__init__.py >index ded166d..42a3860 100644 >--- a/pym/gentoolkit/eshowkw/__init__.py >+++ b/pym/gentoolkit/eshowkw/__init__.py >@@ -1,5 +1,5 @@ > # vim:fileencoding=utf-8 >-# Copyright 2010 Gentoo Foundation >+# Copyright 2010-2016 Gentoo Foundation > # Distributed under the terms of the GNU General Public License v2 > > __package__ = 'gentoolkit.eshowkw' >@@ -122,10 +122,32 @@ def main(argv, indirect = False): > msg_err = 'No ebuilds at "%s"' % currdir > raise SystemExit(msg_err) > package= '%s/%s' % (os.path.basename(os.path.abspath('../')), os.path.basename(currdir)) >- ourtree = os.path.abspath('../../') >- overlays = '%s %s' % (ports['PORTDIR_OVERLAY'], ourtree) >- mysettings = portc(local_config=False, env={'PORTDIR_OVERLAY': overlays}) >- dbapi = portdbapi(mysettings=mysettings) >+ ourtree = os.path.realpath('../..') >+ ourstat = os.stat(ourtree) >+ ourstat = (ourstat.st_ino, ourstat.st_dev) >+ for repo in ports.repositories: >+ try: >+ repostat = os.stat(repo.location) >+ except OSError: >+ continue >+ if ourstat == (repostat.st_ino, repostat.st_dev): >+ dbapi = portdbapi(mysettings=portc(local_config=False)) >+ break >+ else: >+ repos = {} >+ for repo in ports.repositories: >+ repos[repo.name] = repo.location >+ >+ with open(os.path.join(ourtree, 'profiles', 'repo_name'), >+ 'rt') as f: >+ repo_name = f.readline().strip() >+ >+ repos[repo_name] = ourtree >+ repos = ''.join('[{}]\nlocation={}\n'.format(k, v) >+ for k, v in repos.items()) >+ mysettings = portc(local_config=False, >+ env={'PORTAGE_REPOSITORIES': repos}) >+ dbapi = portdbapi(mysettings=mysettings) > # specify that we want just our nice tree we are in cwd > dbapi.porttrees = [ourtree] > process_display(package, keywords, dbapi) >-- >2.7.4 >
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 587856
: 439476