[Abcde-users] OUTPUTTYPE=wav Spawns Warning Preventing Cleaning

Roger rogerx.oss at gmail.com
Wed May 1 23:37:40 BST 2013


Starting a new bug, as I'm getting lost talking to myself within a thread sort 
of off-topic.

When selecting OUTPUTTYPE=wav, abcde spawns a warning during comparison of 
encode and move operations documented within the tmp/abcde*/status file.  This 
warning in turn prevent the cleaning action as documented below within the set 
-x output.

The bit of scripting is here at approx. line 4465:

# Check if we have moved all the formats we had previously encoded, if we are not using the FORCE.
if [ "$DOCLEAN" = "y" ] && [ ! "$FORCE" = "y" ]; then
        ENCODED_FORMATS=$(grep -E "^encodetrack-(.{3,6})-(.{1,2})$" "$ABCDETEMPDIR/status" | cut -d"-" -f2 | sort -u | tr '\n' '|')
        MOVED_FORMATS=$(grep -E "^movetrack-output-(.{3,6})$" "$ABCDETEMPDIR/status" | cut -d"-" -f3 | sort -u | tr '\n' '|')
        if [ "$ENCODED_FORMATS" != "$MOVED_FORMATS" ]; then
                log warning "The encoded formats does not match with the moved ones"
                log warning "Formats encoded: $( echo $ENCODED_FORMATS | tr "|" " " )"
                log warning "Formats moved: $( echo $MOVED_FORMATS | tr "|" " " )"
                log warning "Use \"abcde -a clean -f -C $DISCID\" to force the removal of the remaining data."
                DOCLEAN=n
        fi
fi


The set -x Output:

-bash line 277: ENCODED_FORMATS='ogg|'
--bash line 277: grep -E '^movetrack-output-(.{3,6})$' /home/roger/tmp/abcde.7e10781a/status
--bash line 277: cut -d- -f3
--bash line 277: sort -u
--bash line 277: tr '\n' '|'
-bash line 277: MOVED_FORMATS='ogg|wav|'
-bash line 277: '[' 'ogg|' '!=' 'ogg|wav|' ']'
-bash line 277: log warning 'The encoded formats does not match with the moved ones'
-bash line 277: BLURB=warning
-bash line 277: shift
-bash line 277: case $BLURB in
-bash line 277: echo '[WARNING] The encoded formats does not match with the moved ones'
[WARNING] The encoded formats does not match with the moved ones
--bash line 277: echo 'ogg|'
--bash line 277: tr '|' ' '
-bash line 277: log warning 'Formats encoded: ogg '
-bash line 277: BLURB=warning
-bash line 277: shift
-bash line 277: case $BLURB in
-bash line 277: echo '[WARNING] Formats encoded: ogg '
[WARNING] Formats encoded: ogg
--bash line 277: echo 'ogg|wav|'
--bash line 277: tr '|' ' '
-bash line 277: log warning 'Formats moved: ogg wav '
-bash line 277: BLURB=warning
-bash line 277: shift
-bash line 277: case $BLURB in
-bash line 277: echo '[WARNING] Formats moved: ogg wav '
[WARNING] Formats moved: ogg wav
-bash line 277: log warning 'Use "abcde -a clean -f -C 7e10781a" to force the removal of the remaining data.'
-bash line 277: BLURB=warning
-bash line 277: shift
-bash line 277: case $BLURB in
-bash line 277: echo '[WARNING] Use "abcde -a clean -f -C 7e10781a" to force the removal of the remaining data.'
[WARNING] Use "abcde -a clean -f -C 7e10781a" to force the removal of the remaining data.
-bash line 277: DOCLEAN=n
-bash line 277: '[' n = y ']'
-bash line 277: echo 'Finished. Not cleaning /home/roger/tmp/abcde.7e10781a.'
Finished. Not cleaning /home/roger/tmp/abcde.7e10781a.


I'm examining more of this, and I see it's pretty simple now.

This bit of script is basically comparing the status log file for encoded and 
moved file types, and trims off the bits of info to get something like "ogg|" 
or "ogg|wav|".  (The scripting is basically building a list using canatation, 
or something like "filetype|" after finding each filetype within each move or 
encoded status line.)

I think the best fix to this now is to simply add status log output (ie.  
"encodetrack-wav-20") after each successful cdparanoia/cdda2wav extract.

Once done we should find the following within the status log file:

readtrack-01
encodetrack-wav-01
readtrack-02
encodetrack-wav-02
readtrack-01
encodetrack-wav-03

Can't find where readtrack is inserted within the status log file.  Somewhere 
around Line 3024?  Add a duplicate line:

echo readtrack-$UTRACKNUM >> "$ABCDETEMPDIR/status"
# Duplicate output so check file with file moves at Line 4465 finds wav types.
if !OUTPUTTYPE contains "wav"; then
  echo readtrack-$UTRACKNUM >> "$ABCDETEMPDIR/status"

This sucks.  Another chicken before egg syndrom, concerning whether or not 
somebody is going to OUTPUTTYPE wav or not!

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



More information about the Abcde-users mailing list