Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 218978 - app-portage/elogviewer-0.5.2-r1: CTRL-C purges elog directory without warning
Summary: app-portage/elogviewer-0.5.2-r1: CTRL-C purges elog directory without warning
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-23 04:13 UTC by James Blanding
Modified: 2008-04-25 02:19 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to add warning dialog (elogviewer.clear_warning.patch,1.11 KB, patch)
2008-04-24 23:05 UTC, James Blanding
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Blanding 2008-04-23 04:13:01 UTC
Pressing Control-C with elogviewer in the foreground deletes all files in /var/log/portage/elog/ without prompting or warning.

Reproducible: Always

Steps to Reproduce:
1. Back up your elog directory
2. Start elogviewer
3. Press Control-C

Actual Results:  
All text in the elog list and detail display frames in elogviewer disappears.  All files under /var/log/portage/elog are deleted.  Also, a debug message is output to the terminal window from which elogviewer is running:

/usr/bin/elogviewer:236: GtkWarning: gtk_tree_path_append_index: assertion `index >= 0' failed
  selection.select_path(path)

Expected Results:  
Since Control-C is not a supported keybinding in elogviewer, it should either be ignored or trapped.

# emerge --info
Portage 2.1.4.4 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23-gentoo-r3.2008032902 i686)
=================================================================
System uname: 2.6.23-gentoo-r3.2008032902 i686 AMD Athlon(tm) XP 1800+
Timestamp of tree: Tue, 22 Apr 2008 06:45:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.4
dev-lang/python:     2.3.5-r3, 2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -fomit-frame-pointer -pipe -fno-ident"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=athlon-xp -O2 -fomit-frame-pointer -pipe -fno-ident"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/ http://open-systems.ufl.edu/mirrors/gentoo http://gentoo.chem.wisc.edu/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X acpi alsa apache2 aspell berkdb bzip2 cdr cli cracklib crypt cups dri fortran gdbm gpm gtk gtk2 iconv isdnlog jpeg midi mmx mudflap ncurses nls nptl nptlonly nvidia openmp pam pcre perl png pppd python readline reflection session spl sse ssl tcpd tiff vim-syntax x86 xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Christian Faulhammer (RETIRED) gentoo-dev 2008-04-24 13:57:29 UTC
(In reply to comment #0)
> Pressing Control-C with elogviewer in the foreground deletes all files in
> /var/log/portage/elog/ without prompting or warning.

 I am inclined to close this as INVALID (see reasoning below), but maybe will hack a warning into elogviewer.

> Expected Results:  
> Since Control-C is not a supported keybinding in elogviewer, it should either
> be ignored or trapped.

 It is.  If you open the file menu you will find that "Clear" is bound to Ctrl-C.  
Comment 2 James Blanding 2008-04-24 21:15:30 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > Pressing Control-C with elogviewer in the foreground deletes all files in
> > /var/log/portage/elog/ without prompting or warning.
> 
>  I am inclined to close this as INVALID (see reasoning below), but maybe will
> hack a warning into elogviewer.
> 
> > Expected Results:  
> > Since Control-C is not a supported keybinding in elogviewer, it should either
> > be ignored or trapped.
> 
>  It is.  If you open the file menu you will find that "Clear" is bound to
> Ctrl-C.  
> 

Doh...well I feel like an dolt now.  Sorry about that.  I ran into this issue because I highlighted some text in the details display frame and habitually pressed Control-C to copy it, forgetting about the X11 clipboard.  I think it would be a useful enhancement to have a warning displayed.
Comment 3 James Blanding 2008-04-24 21:18:17 UTC
Changed to Enhancement; request for warning prompt when using Clear function.
Comment 4 James Blanding 2008-04-24 23:05:34 UTC
Created attachment 150891 [details, diff]
patch to add warning dialog

In a pitiful attempt to redeem myself, I figured I'd try my hand at submitting a patch to add a warning dialog.  Perhaps at best, doing this poorly will motivate someone else to do it properly. :D  FWIW, I've never written Python before, and pygtk.org is down (saved by Google Cache), but I did my best anyway.  Please be gentle...
Comment 5 Christian Faulhammer (RETIRED) gentoo-dev 2008-04-25 02:19:27 UTC
(In reply to comment #4)
> In a pitiful attempt to redeem myself, I figured I'd try my hand at submitting
> a patch to add a warning dialog.  Perhaps at best, doing this poorly will
> motivate someone else to do it properly. :D  FWIW, I've never written Python
> before, and pygtk.org is down (saved by Google Cache), but I did my best
> anyway.  Please be gentle...

 Thanks a lot, the patch looks ok from my point of view.  I was looking into it but you saved me some time as I am not that Python skilled.  Choosing Ctrl-C as a short cut for a clear function is not the best solution. :)

Committed to the tree and closing this bug.  Stabilisation in 30 days.