Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 583786 - app-cdr/burncenter: Errors handling (and improvements)
Summary: app-cdr/burncenter: Errors handling (and improvements)
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard: Pending removal: 2016-09-21
Keywords: PMASKED
Depends on:
Blocks:
 
Reported: 2016-05-22 14:24 UTC by tokiclover
Modified: 2016-09-21 19:06 UTC (History)
1 user (show)

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


Attachments
Perl module patch (Burncenter.pm.patch,15.23 KB, patch)
2016-05-22 14:24 UTC, tokiclover
Details | Diff
application patch (burncenter.patch,11.12 KB, patch)
2016-05-22 14:28 UTC, tokiclover
Details | Diff
fix-readaudio.patch (fix-readaudio.patch,524 bytes, patch)
2016-05-22 22:30 UTC, tokiclover
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tokiclover 2016-05-22 14:24:33 UTC
Created attachment 434966 [details, diff]
Perl module patch

I've just stumbled to have absolutely no errors handling, so every wrong user input will trigger no errors checks but only do as if everything was fine in the best world, and so, launch everything without a single check. Or else, when a subcommand fails, nothing will be done in regard to the failure; everything will go as if nothing happened.


Is this a bad joke or something? Any software is almost 50% of errors handling, and here, there is *simply* none. My Gosh. In the absence of a better choice (HELP--I am trying to get a simple app for this kind of things without success--), I took a look at the source and then...

Followed a monstrously big patch to make some minor errors checks and...

Second, I changed the configuration settings handling. Every line using a configuration setting was... launching a file read (the configuration file) and all. Are you kidding me or something? Even apps using monstrously big configuration file, load everything in memory because disk read/seek are expensive! So, here we have a very few settings requiring numerous disk read/seek  every time for every configuration setting? The bad joke. Changed it as well--load the configuration file once and for all.

So, the result is very big, monstrously big which looks like a rewrite which I did not want in the first place. Before I got something simple and efficient working in replacement, I will be using this modified version. Better errors handling can be done with a little effort, but, I am stopping here for now.

Anyone know better and simple solution for burning. I was almost in the verge of merging something with gtk+ dependency. Anyone? I am sorry but this kind of software does not deserve to be in the main tree. Something should be done; either the author try to make a quality software or this shall be removed in the official tree.

So, posting the patches in the hope somebody will make any use of them; because I don't expect the maintainers to use theme. Am I wrong? I even version bumped the minor number in face of the size of the patch. Nothing really scary, it's just there is not even a single errors check in the actual version--no joke here.
Comment 1 tokiclover 2016-05-22 14:28:41 UTC
Created attachment 434968 [details, diff]
application patch

Anybody can add the author to the CC list? Tried without any success.
Comment 2 tokiclover 2016-05-22 15:18:12 UTC
I forgot to add a third point in the first message: I have also added better temporary directory/file handling. There were previously almost static temporary directory/file in the actual version. When no errors checks were made and the application, chances to fails are really numerous. So, really having temporary directory/file is a must have to be able to make many burns in a single a session. So, added POSIX mkdtemp(3) by using File::Temp(3) Perl module. This one was more than necessary.

And then Added a default `~/burncenter' directory as a default to be burn directory rather than `/tmp/ToBurn'. Who actually put project there to burn? A more realistic path is to use the user home directory.
Comment 3 tokiclover 2016-05-22 18:52:47 UTC
Still a few things to add:

Fourth point is that there are regex matching everywhere even if there is no need to; it seems the author do not mind the cost of regex/matching compared to a simple equality. Python developers are or have to be aware of it to avoid regex/matching when no need to.

Fifth point is I added a simple menu entry to make ISO image from disk with a little cost; everything was there for that but a simple subroutine (~5 lines) and modifying an unwelcome cp(1) to dd(1) command. Easy, wasn'y it?

Sixth point is modified checksessions() subroutine to return the session string instead of processing a second call to get... the session.

And various minor improvements.
Comment 4 tokiclover 2016-05-22 22:30:22 UTC
Created attachment 435002 [details, diff]
fix-readaudio.patch

This patch fix readaudio() in burncenter because... rename() (perl function) does not work across filesystem. sigh. Sorry for that.

This is the occasion to add another point to the previous: Senventh is to use builtins (perlfunc manual page) instead of firing of system(3) for everything and so avoid firing up a shell and another binary instead of optimizing syscalls.
Comment 5 tokiclover 2016-05-23 09:25:51 UTC
Eightth point is that, this package depends on media-sound/normalize (missing dependency.)
Comment 6 Pacho Ramos gentoo-dev 2016-05-24 10:13:59 UTC
This package has no maintainer and its upstream died long time ago... are you sure it deserves the effort in trying to get it fixed? Maybe it would be better to remove this and move to one of the many alternatives for burning that are more actively developed and fixed :/
Comment 7 tokiclover 2016-06-01 08:29:48 UTC
Unless somebody fork this,--I could... still busy with other things,--this package does not deserve to be in any tree because of the lack of *any* error handling which isn't that hard with the patches included. Version bumping would be necessary--major version bump. I guess scheduling a removal after a mask period... well the usual procedure is unavoidable. app-cdr/cdw does almost the same job with a ncurses interface; while this package could be pretty efficient with users knowing what they are doing. While the former give that heaviness feeling of usage related to GUI solutions--what a pain and lost time just to select a file/directory!!!

Still thinking whether to fork this or not...
Comment 8 Pacho Ramos gentoo-dev 2016-06-12 10:37:57 UTC
I will CC treecleaners for now then
Comment 9 Pacho Ramos gentoo-dev 2016-09-21 19:06:32 UTC
removed