Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 215408 - sys-apps/collectl does not work - bad requires and file locations
Summary: sys-apps/collectl does not work - bad requires and file locations
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-30 06:19 UTC by Mart Raudsepp
Modified: 2009-04-27 05:36 UTC (History)
2 users (show)

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


Attachments
new patched ebuild (collectl-2.5.0.ebuild,1.02 KB, text/plain)
2008-07-20 06:16 UTC, P Purkayastha
Details
new ebuild, version 3.0.0 (collectl-3.0.0.ebuild,1.02 KB, text/plain)
2008-07-20 07:50 UTC, P Purkayastha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mart Raudsepp gentoo-dev 2008-03-30 06:19:58 UTC
sys-apps/collectl appears to be completely broken.
It has nonsense like

require "/usr/share/${PN}/Syslog.pm"    if !$PcFlag;

after emerged to /usr/bin/collectl resulting in:

Use of uninitialized value in concatenation (.) or string at /usr/bin/collectl line 135.
Can't locate /usr/share//Syslog.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/vendor_perl/5.8.8/i686-linux /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl /usr/lib/perl5/site_perl/5.8.8/i686-linux /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.6/i686-linux /usr/lib/perl5/site_perl /usr/lib/perl5/5.8.8/i686-linux /usr/lib/perl5/5.8.8 /usr/local/lib/site_perl .) at /usr/bin/collectl line 135.


In addition it installs a rc script /etc/init.d/collectl which tries to start-stop-daemon /usr/sbin/collectl, which doesn't exist (it's in /usr/bin as installed currently). of course if it'd fine it, it wouldn't work anyhow per above..
Comment 1 M. Edward Borasky 2008-04-05 07:27:21 UTC
Yeah ... I found the "/usr/sbin/collectl" problem but not the one reported here. So I'm not going to file a duplicate. Anyhow, version 2.5.1 is out now, so I don't see much point in fixing 2.5.0. I'm planning to download 2.5.1 and seeing if I can get the vanilla version to work.
Comment 2 M. Edward Borasky 2008-04-05 15:42:47 UTC
2.5.1 runs just fine straight from source on my machine (amd64 2.6.24-r4).
Comment 3 P Purkayastha 2008-07-20 06:14:57 UTC
(In reply to comment #0)
> sys-apps/collectl appears to be completely broken.
> It has nonsense like
> 
> require "/usr/share/${PN}/Syslog.pm"    if !$PcFlag;
> 

The problem is with the ebuild. It has two mistakes in the sed expression in src_unpack.
1. sed uses single quotes (') due to which the ${PN} in the sed expression is substituted literally in the file collectl.pl
2. sed replaces all the lines (there are two) starting with "require", whereas the original intention of the ebuild maintainer was to replace only one of the lines.

The following patch fixes the ebuild:
--- /usr/portage/sys-apps/collectl/collectl-2.5.0.ebuild	2008-03-16 03:26:42.000000000 -0400
+++ /usr/local/portage/sys-apps/collectl/collectl-2.5.0.ebuild	2008-07-20 02:08:08.000000000 -0400
@@ -21,7 +21,7 @@
 	unpack ${A}
 	cd "${S}"
 	sed -i \
-		-e '/^require/s: ".*/: "/usr/share/${PN}/:' \
+		-e "/^require.*formatit.ph\";/s: \".*/: \"/usr/share/${PN}/:" \
 		collectl.pl || die
 }
Comment 4 P Purkayastha 2008-07-20 06:16:03 UTC
Created attachment 160896 [details]
new patched ebuild

New patched ebuild for collectl-2.5.0
Comment 5 P Purkayastha 2008-07-20 07:50:16 UTC
Created attachment 160901 [details]
new ebuild, version 3.0.0

There is a new version of collectl available.
New collectl-3.0.0 ebuild. The SRC_URI line has changed, in addition to the lines changed in the previous attachment:

-SRC_URI="mirror://sourceforge/collectl/${P}-src.tar.gz"
+SRC_URI="mirror://sourceforge/collectl/${P}.src.tar.gz"
Comment 6 Kenneth Lakin 2009-04-26 22:10:34 UTC
The 2.5.0 and 2.4.1 ebuilds that are currently in Portage fail with the error mentioned in this bug report.
The 2.5.0 ebuild in Comment #4 works just fine for me. Please replace the one in Portage with it.
Comment 7 Kenneth Lakin 2009-04-26 22:17:52 UTC
Additionally, the 3.0.0 ebuild in Comment #5 works fine for me as well.


Would  P Purkayastha care to write an ebuild for 3.2.1 and attach it to Bug #266649 ? :)
http://bugs.gentoo.org/show_bug.cgi?id=266649
Comment 8 SpanKY gentoo-dev 2009-04-27 05:36:28 UTC
3.2.1 in the tree with the proposed fix

in the future, post a diff, not an entire ebuild