[DRE-maint] Bug#800108: gem2deb: permanently broken when cache is missing

Antonio Terceiro terceiro at debian.org
Mon Sep 28 13:31:31 UTC 2015


Control: tags -1 - unreproducible moreinfo
Control: tags -1 + pending

On Sun, Sep 27, 2015 at 10:46:00PM +0000, brian m. carlson wrote:
> On Sun, Sep 27, 2015 at 07:31:58PM -0300, Antonio Terceiro wrote:
> > well, gem2deb notices the empty cache and tells you that you need to run
> > `apt-file update` before continuing, so unless you show me how else it
> > breaks, I suspect that there is nothing to fix here.
> 
> Ah, but it doesn't.  It produces the error in my original post, which
> says that the cache will be regenerated, but doesn't say that it failed
> because the apt-file data is missing.  For me, apt-file exited 0 (with
> no output), meaning that it took the if branch in this block, not the
> else branch:
> 
>   if system('apt-file search /usr/share/rubygems-integration/ > ' + cache + '.new')
>     system('sed', '-i', '-e', 's#/.*/##; s/-[0-9.]\+.gemspec//', cache + '.new')
>     FileUtils.mv(cache + '.new', cache)
>   else
>     puts 'E: dh-make-ruby needs an up-to-date apt-file cache in order to map gem names to package names'
>     exit $?.exitstatus
>   end
> 
> So it didn't say that apt-file was out of date.  If you change mirrors
> in /etc/apt/sources.list, it will produce this error.  And since it's
> hard (for me, at least) to find a Debian mirror that is both fast and
> reliable, I end up doing this frequently, and this is an unhelpful
> failure case.

Ah right. I still couldn't reproduce the case where apt-file search
exits with 0 and still provides no data, but I was able to fake that by
simlinking /usr/local/bin/apt-file to /bin/true *and* removing
~/.cache/gem2deb/gem_to_packages.yaml, and then I can reproduce.

I pushed a fix for this to the git repository.

-- 
Antonio Terceiro <terceiro at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-ruby-extras-maintainers/attachments/20150928/16e8fca5/attachment.sig>


More information about the Pkg-ruby-extras-maintainers mailing list