Bug 227660 - audio/abcde: port has conflicting dependencies
Summary: audio/abcde: port has conflicting dependencies
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Torsten Zuehlsdorff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-20 19:31 UTC by perlhack
Modified: 2018-08-06 19:15 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (tz)


Attachments
Proposed patch (1.13 KB, patch)
2018-04-25 10:18 UTC, Torsten Zuehlsdorff
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description perlhack 2018-04-20 19:31:29 UTC
abcde depends on www/p5-WebService-MusicBrainz0 (currently version 0.94 in ports), but the installed script 'abcde-musicbrainz-tool' in the abcde port/pkg depends on www/p5-WebService-MusicBrainz (currently version 1.03 in ports; script requires 1.04, so www/p5-WebService-MusicBrainz would also need to be updated). The two versions of p5-WebService-MusicBrainz conflict with each other.

It's likely that when the script was added to the port in November 2017, its dependencies were inadvertently forgotten. These are:

p5-Digest-SHA
p5-MusicBrainz-DiscID
p5-WebService-MusicBrainz
p5-Getopt-Long
p5-Pod-Usage

They should be added to the port's dependencies, and the conflict with www/p5-WebService-MusicBrainz0 resolved.

Note: the script 'abcde-musicbrainz-tool' is used when configuring abcde to use MusicBrainz as the CDDBMETHOD (ie - instead of CDDB).
Comment 1 perlhack 2018-04-20 19:35:48 UTC
Minor mistake - those are runtime dependencies for the script, not build dependencies.
Comment 2 Torsten Zuehlsdorff freebsd_committer 2018-04-25 10:18:03 UTC
Created attachment 192795 [details]
Proposed patch
Comment 3 Torsten Zuehlsdorff freebsd_committer 2018-04-25 10:20:10 UTC
Hello,

you are right. But www/p5-WebService-MusicBrainz0 was needed in November, since the support for 1.x was added with 2.9.x. 

I updated the dependency and added also the missing ones you described.

Attached a patch with all the changes. Since i'm no longer using the software and will step down as maintainer: can you please test my changes? 

And do you have interest in becoming the maintainer? ;)

Thank you for the PR!

Greetings,
Torsten
Comment 4 perlhack 2018-04-27 18:55:01 UTC
I've applied the patch and rebuilt the port and its dependencies. I get the following when I run 'abcde' with no parameters:

# abcde
Grabbing entire CD - tracks:  01 02 03 04 05 06 07 08 09
Discid undefined.
[ERROR] abcde: abcde-musicbrainz-tool failed to run; ABORT


However, when I run the tool 'abcde-musicbrainz-tool' with no parameters, I get:

# abcde-musicbrainz-tool
UmlobDRQ_5ftXmcX9zNWWXvkN0Q- 9 150 30849 58501 72016 117673 153859 182851 219652 247367 3523

This matches the MusicBrainz entry for the disc I used to test this:
https://musicbrainz.org/cdtoc/UmlobDRQ_5ftXmcX9zNWWXvkN0Q-

So 'abcde-musicbrainz-tool' works now, but it fails when called from 'abcde'. 


I ran 'abcde' in debug mode, and parsing the generated log file, I see the following:

<snip>
+ for CDDBMETHCHOICE in $(echo "$CDDBMETHOD"  | tr -d '  ' | tr , ' ')
+ addstatus 'Lookup method 0: musicbrainz'
+ echo 'Lookup method 0: musicbrainz'
+ idx=1
+ vecho 'Found 0 matches so far'
+ '[' x '!=' x ']'
+ vecho 'Trying lookup method musicbrainz'
+ '[' x '!=' x ']'
+ case "$CDDBMETHCHOICE" in
+ do_musicbrainz_read
+ checkstatus musicbrainz-readcomplete
+ PATTERN='^musicbrainz-readcomplete(=.*)?$'
++ grep -E '^musicbrainz-readcomplete(=.*)?$' /home/perlhack/audio/abcde./status
++ tail -n 1
+ BLURB=
+ '[' -z '' ']'
+ return 1
+ vecho 'Obtaining Musicbrainz results...'
+ '[' x '!=' x ']'
++ echo ''
++ cut '-d ' -f1
+ CDDBDISCID=
++ echo ''
++ cut '-d ' -f1
+ MBDISCID=
+ local SOURCE_WORKDIR=/home/perlhack/audio/abcde./data-musicbrainz
+ mkdir -p /home/perlhack/audio/abcde./data-musicbrainz
+ abcde-musicbrainz-tool --command data --discid '' --workdir /home/perlhack/audio/abcde./data-musicbrainz --start 0
Discid undefined.
+ error=1
+ '[' 1 '!=' 0 ']'
+ log error 'abcde-musicbrainz-tool failed to run; ABORT'
+ BLURB=error

The problematic part seems to be this:
abcde-musicbrainz-tool --command data --discid '' ...

'abcde' is calling 'abcde-musicbrainz-tool' with an empty discid, then aborts. So the failure is now in the program, not in the port.


As far as this PR is concerned, you can CLOSE it as resolved. I'll have to file a bug upstream about this new issue. Thanks for taking the time to fix this.
Comment 5 perlhack 2018-04-27 19:13:00 UTC
For posterity, the upstream issue noted in my previous comment is likely the same one as this:

https://abcde.einval.com/bugzilla/show_bug.cgi?id=66
Comment 6 commit-hook freebsd_committer 2018-05-02 10:56:28 UTC
A commit references this bug:

Author: tz
Date: Wed May  2 10:55:52 UTC 2018
New revision: 468825
URL: https://svnweb.freebsd.org/changeset/ports/468825

Log:
  audio/abcde: resolve conflicting dependencies

  abcde depends on www/p5-WebService-MusicBrainz0, but the installed script
  'abcde-musicbrainz-tool' depends on www/p5-WebService-MusicBrainz. The two
  versions of p5-WebService-MusicBrainz conflict with each other.
  Update dependency to use p5-WebService-MusicBrainz, which is supported since
  the update of audio/abcde to 2.9.x

  Also adding the missing dependencies:
  - p5-Digest-SHA
  - p5-MusicBrainz-DiscID
  - p5-WebService-MusicBrainz
  - p5-Getopt-Long
  - p5-Pod-Usage

  At least release myself from being MAINTAINER of this port.

  PR:		227660
  Reported by:	<perlhack@protonmail.com>
  Reviewed by:	<perlhack@protonmail.com>

Changes:
  head/audio/abcde/Makefile
Comment 7 Torsten Zuehlsdorff freebsd_committer 2018-05-02 10:57:24 UTC
Committed, thanks for the PR and your testing! :)

Greetings,
Torsten
Comment 8 Tilman Keskinoz freebsd_committer 2018-08-06 19:15:43 UTC
Just in Case anyone else is googling this error.
Musicbrainz discid calculation is still broken in latest ports version with the error "Discid undefined." as reported.

and the upstream bug seems to be
https://abcde.einval.com/bugzilla/show_bug.cgi?id=54

Unfortunately no patch available :(