Bug 2 - Support "normalize" in addition to "normalize-audio" out of the box
Summary: Support "normalize" in addition to "normalize-audio" out of the box
Status: CONFIRMED
Alias: None
Product: abcde
Classification: Unclassified
Component: Encoding (show other bugs)
Version: unspecified
Hardware: All All
: Normal normal
Assignee: Steve McIntyre
URL:
Depends on:
Blocks:
 
Reported: 2015-06-29 16:49 BST by Ville Skyttä
Modified: 2015-12-16 23:31 GMT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ville Skyttä 2015-06-29 16:49:09 BST
abcde should support normalize installed as "normalize" in addition to "normalize-audio" out of the box. Upstream normalize calls it just "normalize", the name change to "normalize-audio" is AFAIK a change present only in Debian and derivatives.

Not sure what would be the preferred way to handle this. I currently patch this in the Fedora package but I don't think that is something I or others should need to be doing, abcde should work out of the box wrt this.

http://pkgs.fedoraproject.org/cgit/abcde.git/tree/abcde-2.7-normalize.patch
Comment 1 Andrew Strong 2015-06-30 09:26:05 BST
There needs to be a better check than the existing:

${NEEDNORMALIZER+$NORMALIZER} 

Something like the following (which is very crude) would work:

if [ -x "$(which normalize-audio)" ] ; then
	NORMALIZE=normalize-audio
	echo "Normalizing your file with normalize-audio..."
elif [ -x "$(which normalize)" ] ; then
	NORMALIZE=normalize
	echo "Cannot find normalize-audio, using normalize instead..."
	else
	NORMALIZE=""
fi

Not as it is of course but you get the meaning...
Comment 2 Andrew Strong 2015-06-30 10:11:05 BST
Streamlined perhaps up in checkexec ()....
Comment 3 Ville Skyttä 2015-06-30 10:26:38 BST
My first thought was to make checkexec() able to take multiple arguments so it could be called like "checkexec normalize-audio normalize" and loop through them but as checkexec currently strips off options, that wouldn't work. Using some other separator such as ; would. But obviously some other changes would be needed too so that it could set the variable used as well and do so while not messing with options in variables, if any...
Comment 4 Steve McIntyre 2015-07-06 21:30:24 BST
I'd be tempted to add another DEFAULT_ variable for normalizer, like we already have for CDROMREADERS and OUTPUT_BINARIES, and similar logic to those.

I don't really see any downsides to that. Anybody?
Comment 5 Andrew Strong 2015-07-07 08:56:04 BST
An alternative would be for Debian to rename their binary :).
Comment 6 Steve McIntyre 2015-07-07 13:18:45 BST
> An alternative would be for Debian to rename their binary :).

Ain't gonna happen. Debian policy is to try and minimise the use of generic words in program namespace like this, hence the renaming. There's a discussion about what to call the Google Drive package right now, for example. "drive" is just too generic.
Comment 7 Andrew Strong 2015-12-16 23:31:50 GMT
(In reply to Steve McIntyre from comment #4)
> I'd be tempted to add another DEFAULT_ variable for normalizer, like we
> already have for CDROMREADERS and OUTPUT_BINARIES, and similar logic to
> those.
> 
> I don't really see any downsides to that. Anybody?

I have partly put this in place but I am failing with a 126 error from normalize which has me stumped at the moment...