Running rmadison from strict snap exits non zero

I have a strict snap [1] built and partially working but when rmadison is run I get the following error.

[ERROR] Error querying rmadison: Command '['rmadison', '-a', 'source', '-s', 'artful-proposed', 'linux']' returned non-zero exit status 2
rmadison: you must have the liburi-perl package installed
to use this script

I have confirmed that I do have network access and there is nothing in sudo /snap/bin/ scanlog ubuntu-watch-packages.

I have added liburi-perl as a stage-package but I get the same error.

When running /snap/bin/ubuntu-watch-packages --help which doesn’t call rmadison it works fine and when built and installed as classic snap it works fine too.




perl is a bit ugly to snap, you somehow need to add the path the liburi-perl module is in to the perl search path ( @INC ) …

probably via a wrapper …

Agreed, for get-iplayer (a perl application) I used an environment section under the apps: stanza to achieve this without a wrapper. Like this.

        LC_ALL: "C.UTF-8"
        PERL5LIB:  "$SNAP/usr/lib/x86_64-linux-gnu/perl-base/:$SNAP/usr/lib/x86_64-linux-gnu/perl5/5.22/:$SNAP/usr/share/perl5/:$SNAP/usr/share/perl/5.22.1/:$SNAP/usr/lib/x86_64-linux-gnu/perl/5.22/:$SNAP/usr/lib/x86_64-linux-gnu/perl/5.22.1/"
        LD_LIBRARY_PATH: "$SNAP/usr/lib/x86_64-linux-gnu/pulseaudio/:$LD_LIBRARY_PATH"
    command: get_iplayer
      - network                                                                                                                                                                              
      - removable-media                                                                                                                                                                      
      - home   
1 Like

Not to counteract on the part where people help on resolving how to get things done in perl, but why not call the API directly.

We do it here

It is just an HTTP GET like

@popey Thanks. I did get something working by setting the PERL5LIB var but rmadison was requesting access to /etc/wgetrc too.

@sergiusens Excellent, much simpler. Thank you