Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 242420 - [patch] app-portage/elogv-0.7.1: doesn't wrap long lines in elog files (patch included)
Summary: [patch] app-portage/elogv-0.7.1: doesn't wrap long lines in elog files (patch...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-17 04:00 UTC by Douglas Anderson
Modified: 2008-10-31 20:00 UTC (History)
3 users (show)

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


Attachments
An elog with a long line for testing (app-portage:elogv_longlines-0.7.1:20081014-051546.log,607 bytes, text/plain)
2008-10-17 04:04 UTC, Douglas Anderson
Details
Adds a function to wrap long lines in elogs (elogv.patch,2.37 KB, patch)
2008-10-17 04:05 UTC, Douglas Anderson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Douglas Anderson 2008-10-17 04:00:46 UTC
elogv-0.7.1 doesn't provide a way to scroll horizontally in the log window, and also doesn't wrap long lines, so it won't display the full text of some elogs.

Reproducible: Always

Steps to Reproduce:
1. Install "portage-utils" (doesn't always install elog file), or put my attached modified .log file in /var/log/portage/elog/
2. Run elogv and try to read one of the above logs
3. Compare contents of actual file to what's displayed

Actual Results:  
│______________________________________________________________________________│
│LOG: postinst                                                                 │
│                                                                              │
│This is a long line that goes over 80 characters and should be wrapped, so tha│
│                                                                              │
│In order to use this software, you need to activate                           │
│Portage's elog features.  Required is                                         │
│                 PORTAGE_ELOG_SYSTEM="save"                                   │
│and at least one out of                                                       │
│                                                                              │
│                                                                 Continue...  │
└─────────────────────────────────────── Press F1 or h to show the help screen ┘

Expected Results:  
│______________________________________________________________________________│
│LOG: postinst                                                                 │
│                                                                              │
│This is a long line that goes over 80 characters and should be wrapped, so    │
│that we can see the whole line and heed its prescient advice.                 │
│                                                                              │
│In order to use this software, you need to activate                           │
│Portage's elog features.  Required is                                         │
│                 PORTAGE_ELOG_SYSTEM="save"                                   │
│                                                                              │
│                                                                 Continue...  │
└─────────────────────────────────────── Press F1 or h to show the help screen ┘
Comment 1 Douglas Anderson 2008-10-17 04:04:20 UTC
Created attachment 168760 [details]
An elog with a long line for testing
Comment 2 Douglas Anderson 2008-10-17 04:05:29 UTC
Created attachment 168762 [details, diff]
Adds a function to wrap long lines in elogs
Comment 3 Paul Varner (RETIRED) gentoo-dev 2008-10-17 15:30:12 UTC
Christian,

Who is upstream for elogv? I get a blank page when I go to the homepage.

In the meantime, I'll look at patching and bumping the existing source and ebuild.
Comment 4 Christian Faulhammer (RETIRED) gentoo-dev 2008-10-17 23:11:13 UTC
(In reply to comment #3)
> Christian,
> 
> Who is upstream for elogv? I get a blank page when I go to the homepage.
> 
> In the meantime, I'll look at patching and bumping the existing source and
> ebuild.

 It is the gechi-overlay on sourceforge, they still have a project page there, but Luca (the original author) reacts on direct requests and makes release when pushed a little. :)  Adding him to CC file.  Hi Luca.
Comment 5 Luca Marturana 2008-10-18 10:11:17 UTC
(In reply to comment #4)
>  It is the gechi-overlay on sourceforge, they still have a project page there,
> but Luca (the original author) reacts on direct requests and makes release when
> pushed a little. :)  Adding him to CC file.  Hi Luca.
> 

Hi to all, thanks for the presentation Christian. :)

Usually an elog should have at most 80 chars for line. Because this is the standard for console messages and code files lines and elogv doesn't work if the terminal is smaller than 80 chars.

Anyway your patch, Douglas, it's very good and solves the problem so I added it to svn head and I will release a new version soon including this patch. ;)

Thanks for the report and the patch. ;)

Bye
Comment 6 Douglas Anderson 2008-10-18 17:02:36 UTC
(In reply to comment #5)
> Usually an elog should have at most 80 chars for line. Because this is the
> standard for console messages and code files lines and elogv doesn't work if
> the terminal is smaller than 80 chars.

I agree, but unfortunately some ebuilds in the tree consistently go over, like these lines from portage-utils-0.1.29.ebuild:
[...]
        elog "${ROOT}/etc/portage/postsync.d/q-reinitialize has been installed for convenience"
        elog "If you wish for it to be automatically run at the end of every --sync simply chmod +x ${ROOT}/etc/portage/postsync.d/q-reinitialize"
[...]

Also it would be hard for ebuild writers to keep strictly to <80 in the case of variables in the elog line, like above.

> Anyway your patch, Douglas, it's very good and solves the problem so I added it
> to svn head and I will release a new version soon including this patch. ;)
> 
> Thanks for the report and the patch. ;)

Awesome, you're welcome. :)
Comment 7 Luca Marturana 2008-10-28 12:58:15 UTC
@gentoo developers

The new version of elogv which corrects this bug was released, you can find it at http://sourceforge.net/project/showfiles.php?group_id=176946.

The previous ebuild should work unmodified.
Comment 8 Christian Faulhammer (RETIRED) gentoo-dev 2008-10-31 20:00:05 UTC
(In reply to comment #7)
> @gentoo developers
> 
> The new version of elogv which corrects this bug was released, you can find it
> at http://sourceforge.net/project/showfiles.php?group_id=176946.
> 
> The previous ebuild should work unmodified.

 So it does.  Bumped in tree.

Luca, I would be happy if you could have a look at bug 236056 and bug 233493.