Gentoo Archives: gentoo-soc

From: Brian Dolbec <dolsen@g.o>
To: gentoo-soc@l.g.o
Subject: Re: [gentoo-soc] Last Compiled Info in Porthole
Date: Tue, 09 Apr 2019 17:28:00
Message-Id: 20190409102802.7e1c74cd@professor-x
In Reply to: Re: [gentoo-soc] Last Compiled Info in Porthole by Ethan Kiang
1 On Tue, 9 Apr 2019 12:50:30 -0400
2 Ethan Kiang <chocopuff298@×××××.com> wrote:
3
4 > On a tangential side-note, I am having trouble opening the .glade
5 > files.
6 >
7 > I get the following error message:
8 > (glade:4447): GladeUI-WARNING **: 12:47:37.346: Couldnt recognize
9 > GtkBuilder xml, skipping
10 > /home/ethan/Development/porthole/porthole-0.6.1/porthole/glade/porthole.glade
11 >
12 > I looked into that specific error and online posts seem to imply a
13 > custom version of Glade being used? I'm not too sure.
14 >
15 > On Mon, Apr 8, 2019 at 8:37 PM Brian Dolbec <dolsen@g.o> wrote:
16 >
17 > > On Tue, 09 Apr 2019 07:36:45 +0800
18 > > Benda Xu <heroxbd@g.o> wrote:
19 > >
20 > > > Hi Ethan,
21 > > >
22 > > > Ethan Kiang <chocopuff298@×××××.com> writes:
23 > > >
24 > > > > diff --git a/porthole/backends/portlandlib.py
25 > > > > b/porthole/backends/portlandlib.py new file mode 100644
26 > > > > index 0000000..c165adb
27 > > > > --- /dev/null
28 > > > > +++ b/porthole/backends/portlandlib.py
29 > > > > @@ -0,0 +1,47 @@
30 > > > > +import re
31 > > > > +import datetime
32 > > > > +from os import listdir
33 > > > > +import subprocess
34 > > > > +
35 > > > > +EPREFIX = subprocess.check_output(["portageq", "envvar",
36 > > > > "EPREFIX"]).decode().strip()
37 > > >
38 > > > Is it possible that the portage API is used here?
39 > > >
40 > > > Benda
41 > > >
42 > > >
43 > >
44 > > Yes. There is a portage api for this. But the only code really
45 > > needed from this file is get_compile_time() modified to use code
46 > > already existing in porthole's portagelib.py
47 > >
48 > > brian@professor-x ~ $ python
49 > > python-exec: Invalid impl in /etc/python-exec/python-exec.conf:
50 > > python3.4 Python 3.5.7 (default, Mar 25 2019, 08:41:16)
51 > > [GCC 8.2.0] on linux
52 > > Type "help", "copyright", "credits" or "license" for more
53 > > information.
54 > > >>> import portage
55 > > >>> portage.const.EPREFIX
56 > > ''
57 > > >>> portage.const.EPREFIX or '/'
58 > > '/'
59 > >
60 > >
61 > > So, depending on what you need use either of the above
62 > >
63 > >
64
65 must have been from when the gnome team had dual versions gtk2/gtk3 in
66 the tree. But there also has been some hand editing if I recall
67 correctly. Possibly some is due to changes in glade for gtk3 not
68 recognizing old gtk2 xml.

Replies

Subject Author
Re: [gentoo-soc] Last Compiled Info in Porthole Ethan Kiang <chocopuff298@×××××.com>