[Abcde-users] Newbie asking for help - Patching abcde

Roger rogerx.oss at gmail.com
Wed Jan 1 22:16:59 GMT 2014


> On Tue, Dec 31, 2013 at 07:57:11PM +0000, John Lane wrote:
>   On 28/09/13 19:44, Edward Petrie-Smith wrote:
>
>     All,
>
>     I have just installed version 2.5.4 from source on my Ubuntu platform.
>
>     I remember coming across a patch that included the ability to embed
>     album art into the mp3 being created by abcde, and managed to find it
>     available from [1]http://code.google.com/p/abcde/issues/detail?id=33.
>
>     I've used patch in the past to patch binaries etc.
>     ([2]http://www.cyberciti.biz/faq/appy-patch-file-using-patch-command/)
>     but struggling with how I go about installing the patch here.
>
>     Could somebody please help me here by explaining what I need to patch
>     abcde here? Can I just apply the patch in isolation, or do I need to
>     install patches 0001-0004 before I can apply this patch.
>
>     Edward.

As explained previously, I post more a more simple explanation using root 
priveleges with the /usr/bin/abcde file.

# cp /usr/bin/abcde /usr/bin/abcde.orig
# cd /usr/bin

Make your changes to /usr/bin/abcde and then,

# diff -urN abcde.orig abcde > /home/john/abcde-MyCustomFixPatch-20140101.patch

To apply this new patch,

# cd /usr/bin
# patch --dry-run < /home/john/abcde-20140101.patch


Probably should "cp /usr/bin/abcde /home/john/" and run all commands as user 
from within /home/john, as I was just trying to more vividly & simply explain 
the process.

The reason you run diff from within the root folder, if you open the patch 
file, you'll notice the patch file contains the  path of abcde.  Running from 
within the root folder, you prevent having such unique paths as "/home/john", 
requiring others to strip (patch -p1) the paths when applying your patch.


As far as patching abcde, I've just printed out the code here, but find the 
code length about 30 pages long printed double sided, or two-sided, which is 
hideous.  The last 10% contain two extensively long () pipes, making the code 
further unreadable.  I was thinking the last two pipes should probably go in 
separate files, or /usr/lib/abcde/my_function.sh (and sourced into the script 
if the option is called), as with most other customizations.  The only code 
that then should be within /usr/bin/abcde, is the necessary basic code or 
scripting for running abcde.  Hence, putthing all user not commonly run 
functions or modules into separate files, keeping stuff not often used or 
tested seperate from the main code/script base.

If you noticed, the current "custom functions" implemented within abcde 
basically do not function correctly as I already mentioned on the mailing list 
here.  Basically because they weren't able to hook into the current scripting, 
as it probably wasn't thought about initially. :-/  Now, the code base is 
almost too big, without just basically rewriting everything.  And then 
everything as to be further tested, for which most of which I do not use. (ie.  
musicbrainz, ...)

-- 
Roger
http://rogerx.freeshell.org/



More information about the Abcde-users mailing list