Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Elogviewer, a python/gtk graphical elog viewer

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
79 posts
  • 1
  • 2
  • 3
  • 4
  • Next
Author
Message
synss
Apprentice
Apprentice
User avatar
Posts: 282
Joined: Wed Mar 08, 2006 5:42 pm
Location: Dijon > Berlin > Tokyo > Nürnberg > München

Elogviewer, a python/gtk graphical elog viewer

  • Quote

Post by synss » Thu May 25, 2006 9:38 pm

I started from an idea of nmbrthry in here

Last updated Tue Oct 10 01:16:55 JST 2006 v. 0.4.1

Abstract This program (python/pygtk) parses the elogs (portage 2.1) in a graphical environment.
Features:
  • graphical elog viewer
    filters the output on demand
    button to delete elog(s)
    keyboard shortcuts
Usage: elogviewer or PORT_LOGDIR=/path/to/elogs/.. elogviewer

License: GPL2 or later

Code: Select all

emerge layman
layman -f
layman -a sunrise
emerge elogviewer
"Official" site with a screenshot http://sourceforge.net/projects/elogviewer.
Last edited by synss on Thu Oct 26, 2006 2:19 pm, edited 11 times in total.
Compress portage tree
Elog viewer
Autodetect swap
Top
nmbrthry
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 80
Joined: Tue Jun 21, 2005 3:03 am
Location: Urbana-Champaign, IL

  • Quote

Post by nmbrthry » Fri Jun 02, 2006 3:50 am

Wow, this is really coming together nicely. I'm glad you were able to take my idea and run with it.
Top
maxima
Apprentice
Apprentice
Posts: 150
Joined: Fri Oct 01, 2004 4:13 pm

  • Quote

Post by maxima » Sun Jun 11, 2006 10:45 am

thank you very much, it works perfectly here. I have some minor annoyances though
- the outer border is too wide, I want it looks like the other GNOME apps
- can you supress the error message when you're trying to tick/untick the textboxes where nothing is selected

Anyway good job. I suggest you submit this to bugzilla, request for portage inclusion.
Top
synss
Apprentice
Apprentice
User avatar
Posts: 282
Joined: Wed Mar 08, 2006 5:42 pm
Location: Dijon > Berlin > Tokyo > Nürnberg > München

  • Quote

Post by synss » Sun Jun 11, 2006 5:51 pm

Thank you for your feedback, maxima. I updated the code to take your suggestions into account. I would love to have that prog in the official tree!
Compress portage tree
Elog viewer
Autodetect swap
Top
maxima
Apprentice
Apprentice
Posts: 150
Joined: Fri Oct 01, 2004 4:13 pm

  • Quote

Post by maxima » Mon Jun 12, 2006 12:41 am

Thank you, that was fast. I have one more suggestion, it would be nice if you could use gtk treeview or gtk expander in the viewing area. Sorry if I'm asking to much. I want to learn python myself but haven't got time to do it. I read from the other thread that you don't know python, that wasn't true right?
Top
synss
Apprentice
Apprentice
User avatar
Posts: 282
Joined: Wed Mar 08, 2006 5:42 pm
Location: Dijon > Berlin > Tokyo > Nürnberg > München

  • Quote

Post by synss » Mon Jun 12, 2006 5:42 pm

Thank you! I will see what I can do.
maxima wrote:I read from the other thread that you don't know python, that wasn't true right?
:) No, that (wa)s true. But I have experience in more difficult programming using c/c++, fortran, even some MS Visual C# (research, science), so that going for another language of the same type is not very difficult. And it is also true that I do not like GUI that much, do not use it that much and do not like to design it that much either. I like writing code, that's my fun! Although for the elogs, "less" was definitely not optimal! So I rewrote nmbrthry's prog (is not that the FOSS philosophy after all?) and pygtk is really nice and easy! The ppl who have made that are definitely good at making things effective.

Enough with my CV...

If I have time this week and feel like so, I will try using the gtk.expander.

I also submitted it to bugzilla, so maybe elogviewer will make it to app-portage! For those who want to make it the gentoo way, I have written (very fast I must say) an ebuild. Go get it from bugzy to be sure you have the latest version http://bugs.gentoo.org/show_bug.cgi?id=136496

But thank you for your support maxima, I really appreciate.
Compress portage tree
Elog viewer
Autodetect swap
Top
FLP
n00b
n00b
Posts: 16
Joined: Wed May 18, 2005 3:53 pm

  • Quote

Post by FLP » Mon Jun 12, 2006 6:19 pm

Works really nice, no problems at all. Good work. :)
Top
unz
l33t
l33t
User avatar
Posts: 819
Joined: Wed Jul 28, 2004 12:19 am
Location: Roma, Italia

  • Quote

Post by unz » Mon Jun 12, 2006 10:13 pm

great prog!!! it needs an icon and a .desktop entry ;)
Ma che c'hai là? Sulla spalla!!!! http://lascimmia.it/
Top
maxima
Apprentice
Apprentice
Posts: 150
Joined: Fri Oct 01, 2004 4:13 pm

  • Quote

Post by maxima » Wed Jun 14, 2006 5:11 am

I've just noticed the delete function doesn't work even it's run as root. And the log files have a permission 644 owned by root, is there any way to change the default permission ?
Top
synss
Apprentice
Apprentice
User avatar
Posts: 282
Joined: Wed Mar 08, 2006 5:42 pm
Location: Dijon > Berlin > Tokyo > Nürnberg > München

  • Quote

Post by synss » Wed Jun 14, 2006 8:04 am

@maxima, it works here, if you downloaded the update yesterday, I had made a mistake and uploaded a "debug" version where I print the filename at the console instead of deleting it, although it should not have been hosted very long. Is it what is happening (is thefilename printed at the console?) in which case getting the file from the forum here should solve it. If not, I need more info...

It is also becoming complicated to update on my computer, the forum link and bugzilla, you seem more familiar than me about all these things, do you know of a simpler way of updating/sharing the source? I am not sure opening a sourceforge or similar account is really worth it, but I don't know... And my computer is a laptop so I cannot share the files from here via subversion or ftp or whatever.
Compress portage tree
Elog viewer
Autodetect swap
Top
maxima
Apprentice
Apprentice
Posts: 150
Joined: Fri Oct 01, 2004 4:13 pm

  • Quote

Post by maxima » Wed Jun 14, 2006 10:21 am

oh I downloaded it from bugzilla, ok I'll try the one from here but I can't test it now my log is empty. And yes the one I have prints the filename to the console.

about the sharing I'm not too sure either, I think you can just put a link in the bugzilla & forum and make the link point to the parent where you store all the tarballs. So you don't have to upload everytime you're making a new release.
Top
theoakwise
n00b
n00b
Posts: 37
Joined: Sat May 15, 2004 3:01 am

ignore me.

  • Quote

Post by theoakwise » Sat Jun 17, 2006 11:52 pm

[EDIT]Nuts. When will I learn patience? If I'd've just waited for the ebuild to finish, I'd've seen the solution. SORRY![/EDIT]

I'm having a problem where my portage seems not to create the elog subidir of the directory in the PORT_LOGDIR variable. I fiddled with the elogviewer code to make it work, but I'm wondering if I'm doing something wrong?

Relevant make.conf section (I made elogviewer just take the PORT_LOGDIR variable as is, rather than trying to change to the elog subdir):

Code: Select all

PORT_LOGDIR=/var/log/portage/elog
PORTAGE_ELOG_CLASSES="warn error info log"
PORTAGE_ELOG_SYSTEM="save"
make.conf.example has this to say:

Code: Select all

# PORTAGE_ELOG_SYSTEM: selects the module(s) to process the log messages. Modules
#                      included in portage are (empty means logging is disabled):
#                          save (saves one log per package in $PORT_LOGDIR/elog, 
#                                /var/log/portage/elog if $PORT_LOGDIR is unset)
Which is certainly not how things are going. I get all the log files in the PORT_LOGDIR directory.
Top
Jeremy_Z
l33t
l33t
User avatar
Posts: 671
Joined: Mon Apr 05, 2004 3:21 pm
Location: Shanghai

  • Quote

Post by Jeremy_Z » Thu Jun 22, 2006 4:41 am

Hi all, nice work synss.

I ported your app to PyKDE for those who can't use gtk in their kde environment. I am looking for some web space to put the file in for now, synss maybe you can host it on your website ?

Edit : Ok i found something, you can get it at Kelogviewer
"Because two groups of consumers drive the absolute high end of home computing: the gamers and the porn surfers." /.
My gentoo projects, Kelogviewer and a QT4 gui for etc-proposals
Top
TehCaster
n00b
n00b
Posts: 3
Joined: Wed Jun 28, 2006 10:41 am

  • Quote

Post by TehCaster » Wed Jun 28, 2006 11:02 am

Jeremy_Z wrote:Hi all, nice work synss.
Edit : Ok i found something, you can get it at Kelogviewer
This URL gives me 403...

synss: good app, but:
- you are missing "prerm" and "postrm" phases, they need to be added to class Filter: filter = { ... } (those were not elogged in earlier 2.1 versions by mistake but it's fixed now)
- after deleting last log it gives some exception (not fatal :)
- I would like a keyboard shortcut (Del would be great :) for deleting log, clicking mouse is bothering me :)

Keep up the good work!
Top
Jeremy_Z
l33t
l33t
User avatar
Posts: 671
Joined: Mon Apr 05, 2004 3:21 pm
Location: Shanghai

  • Quote

Post by Jeremy_Z » Wed Jun 28, 2006 3:27 pm

Yes, that provider is crap ... and i managed to screw things with their "admin interface" were deleted files are style listed but no more accessible so i cannot even re-create an "index.php".

So i've wisely chosen to drop them for something with an ftp access.

You can get it there : http://jeremywick.phpnet.us/kelogviewer.tgz
"Because two groups of consumers drive the absolute high end of home computing: the gamers and the porn surfers." /.
My gentoo projects, Kelogviewer and a QT4 gui for etc-proposals
Top
synss
Apprentice
Apprentice
User avatar
Posts: 282
Joined: Wed Mar 08, 2006 5:42 pm
Location: Dijon > Berlin > Tokyo > Nürnberg > München

  • Quote

Post by synss » Thu Jun 29, 2006 12:08 am

Jeremy_Z: nice you also make it kde-friendly.

If somebody is interested in programming, it would probably be very helpful for people without X/on ssh, to have an ncurse version too. I have kept all GUI-related stuff separated from the rest, so it should not be a major effort to anyone knowing a bit of ncurses.

TehCaster: "prerm" and "postrm" phases are added on the version linked from the top of the forum + the archive fetched by the ebuild.

"after deleting last log it gives some exception" i found that too, I though I had gotten rid of it, though... but it is still there. Pain.
"I would like a keyboard shortcut..." me too :)



Anyway, the program will be on standby for a couple of months as I am going on voluntary unemployement. I do need holidays! I have no idea how much time I'll spend on my computer during that time and what access to the internet I'll have. Probably not much :D (makes me happy, there are other things in life almost as enjoyable as python)
Compress portage tree
Elog viewer
Autodetect swap
Top
Jeremy_Z
l33t
l33t
User avatar
Posts: 671
Joined: Mon Apr 05, 2004 3:21 pm
Location: Shanghai

  • Quote

Post by Jeremy_Z » Thu Jun 29, 2006 3:08 am

Back here, i put the so wished for shortcut :D and corrected some details. I do not have much time to spend on it neither, but i might take a look on ncurses because i never used it in dev before (well just like python or QT, so why not).
"Because two groups of consumers drive the absolute high end of home computing: the gamers and the porn surfers." /.
My gentoo projects, Kelogviewer and a QT4 gui for etc-proposals
Top
dberkholz
Retired Dev
Retired Dev
User avatar
Posts: 1008
Joined: Tue Mar 18, 2003 6:51 am
Location: Minneapolis, MN, USA
Contact:
Contact dberkholz
Website

  • Quote

Post by dberkholz » Tue Aug 01, 2006 5:41 am

FWIW I wrote a CLI-based tool for this ages ago -- http://dev.gentoo.org/~dberkholz/scripts/eread -- maybe some of you can use it.
Top
uweklosa
Tux's lil' helper
Tux's lil' helper
Posts: 105
Joined: Fri Feb 18, 2005 5:32 pm
Contact:
Contact uweklosa
Website

  • Quote

Post by uweklosa » Sat Aug 05, 2006 4:51 pm

I updated the script of dbberkholz

Code: Select all

#!/bin/bash

# This is a script to read portage log items from einfo, ewarn etc, new in the
# portage-2.1 series.
#
# Author: Donnie Berkholz <spyderous@gentoo.org>
# Updated by: Uwe Klosa <uwe.klosa@gmail.com>

# Set ELOGDIR
ELOGDIR=/var/log/portage/elog/

# Set up select prompt
PS3="Choice? "

select_loop() {
        ANY_FILES=$(/usr/bin/find ${ELOGDIR} -type f)

        if [[ -z ${ANY_FILES} ]]; then
                echo "No log items to read"
                break
        fi

        echo
        echo "This is a list of portage log items. Choose a number to view that file or type q to quit."
        echo

        # Pick which file to read
        select FILE in ${ANY_FILES}; do
                case ${REPLY} in
                        q)
                                echo "Quitting"
                                QUIT="yes"
                                break
                                ;;
                        *)
                                /usr/bin/less ${FILE}
                                read -p "Delete file? [y/N] " DELETE
                                case ${DELETE} in
                                        q)
                                                echo "Quitting"
                                                QUIT="yes"
                                                break
                                                ;;
                                        y|Y)
                                                /usr/bin/rm -f ${FILE}
                                                SUCCESS=$?
                                                if [[ ${SUCCESS} = 0 ]]; then
                                                        echo "Deleted ${FILE}"
                                                else
                                                        echo "Unable to delete ${FILE}"
                                                fi
                                                ;;
                                        # Empty string defaults to N (save file)
                                        n|N|"")
                                                echo "Saving ${FILE}"
                                                ;;
                                        *)
                                                echo "Invalid response. Saving ${FILE}"
                                                ;;
                                esac
                                ;;
                esac
                break
        done
}

until [[ -n ${QUIT} ]]; do
        select_loop
done
Top
dberkholz
Retired Dev
Retired Dev
User avatar
Posts: 1008
Joined: Tue Mar 18, 2003 6:51 am
Location: Minneapolis, MN, USA
Contact:
Contact dberkholz
Website

  • Quote

Post by dberkholz » Sat Aug 05, 2006 8:06 pm

uweklosa wrote:I updated the script of dbberkholz
Thanks! I incorporated your changes and uploaded a new copy.
Top
binro
l33t
l33t
User avatar
Posts: 753
Joined: Fri May 06, 2005 7:16 pm
Location: Bangkok

  • Quote

Post by binro » Fri Aug 11, 2006 12:18 pm

I am bit confused as to which type of log file (k)elogviewer is processing. If I set my logging options like this:

Code: Select all

PORTAGE_ELOG_CLASSES="warn error log"
PORTAGE_ELOG_SYSTEM="syslog save"
PORT_LOGDIR="/var/log/portage"
I get a whole mass of files in "/var/log/portage" which look like this:
  • >>> Unpacking source...
    >>> Unpacking portage-2.1.1_pre4.tar.bz2 to /var/tmp/portage/portage-2.1.1_pre4-r2/work
    >>> Unpacking portage-2.1.1_pre4-r2.patch.bz2 to /var/tmp/portage/portage-2.1.1_pre4-r2/work
    * Applying portage-2.1.1_pre4-r2.patch ...
    [ ok ]
    * Setting portage.VERSION to 2.1.1_pre4-r2 ...
    [ ok ]
    >>> Source unpacked.
    >>> Compiling source in /var/tmp/portage/portage-2.1.1_pre4-r2/work/portage-2.1.1_pre4 ...
    >>> Source compiled.
    >>> Test phase [not enabled]: sys-apps/portage-2.1.1_pre4-r2

    >>> Install portage-2.1.1_pre4-r2 into /var/tmp/portage/portage-2.1.1_pre4-r2/image/ category sys-apps
    patching file make.conf
    >>> Completed installing portage-2.1.1_pre4-r2 into /var/tmp/portage/portage-2.1.1_pre4-r2/image/

    man:
    gzipping man page: quickpkg.1
    gzipping man page: emaint.1
    gzipping man page: emerge.1
    gzipping man page: repoman.1
    gzipping man page: env-update.1
    gzipping man page: dispatch-conf.1
    gzipping man page: ebuild.1
    gzipping man page: etc-update.1
    gzipping man page: portage.5
    gzipping man page: make.conf.5
    gzipping man page: ebuild.5
    strip: i686-pc-linux-gnu-strip --strip-unneeded
    usr/lib/portage/bin/tbz2tool
    *
    * For help with using portage please consult the Gentoo Handbook
    * at http://www.gentoo.org/doc/en/handbook/h ... xml?part=3
    *
and three files in "/var/log/portage/elog" which look like this:
  • LOG: unpack
    Setting portage.VERSION to 2.1.1_pre4-r2 ...

    LOG: postinst

    For help with using portage please consult the Gentoo Handbook
    at http://www.gentoo.org/doc/en/handbook/h ... xml?part=3
If I set

Code: Select all

PORT_LOGDIR="/var/log/portage/elog"
all the files go there but elogviewer ignores them because they don't have the correct header. So what is supposed to be going on?! I am currently running portage-2.1.1_pre4-r4.
"Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling
Top
synss
Apprentice
Apprentice
User avatar
Posts: 282
Joined: Wed Mar 08, 2006 5:42 pm
Location: Dijon > Berlin > Tokyo > Nürnberg > München

  • Quote

Post by synss » Fri Aug 11, 2006 12:31 pm

it only deals with the ones you have put under
and three files in "/var/log/portage/elog" which look like this:
that is enotice, ewarn, etc. written in the ebuilds, not the complete log.
Compress portage tree
Elog viewer
Autodetect swap
Top
binro
l33t
l33t
User avatar
Posts: 753
Joined: Fri May 06, 2005 7:16 pm
Location: Bangkok

  • Quote

Post by binro » Fri Aug 11, 2006 12:38 pm

Ok, thanks for the clarification.
"Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling
Top
lateralus__
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 100
Joined: Fri May 19, 2006 10:02 am
Location: Belgium
Contact:
Contact lateralus__
Website

  • Quote

Post by lateralus__ » Fri Aug 11, 2006 3:22 pm

Thank you so much for this incredible little application.
It works like a charm :wink:
There are a lot of lies going around.... and half of them are true.
-- Winston Churchill
Top
framirez
n00b
n00b
Posts: 11
Joined: Fri Aug 11, 2006 3:57 pm

when it gonna be in portage?

  • Quote

Post by framirez » Tue Aug 15, 2006 5:12 pm

i was wondering when we gonna have it available in portage its a really helpful tool..

also i havent been able to download it.. all i get is a bunch of text.. lot of crap from the download link http://www.rz-berlin.mpg.de/~laurin/elogviewer
Top
Post Reply

79 posts
  • 1
  • 2
  • 3
  • 4
  • Next

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy