<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-10-27 22:09 GMT+01:00 Antonio Terceiro <span dir="ltr"><<a href="mailto:terceiro@debian.org" target="_blank">terceiro@debian.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">On Tue, Oct 27, 2015 at 06:09:00PM +0100, Jérémy Lal wrote:<br>
> Package: autodep8<br>
> Version: 0.2<br>
> Severity: normal<br>
><br>
> Dear Maintainer,<br>
><br>
> Please use this one-liner instead<br>
><br>
> upstream_name=$(python -c "import json; print(json.load(open('package.json'))['name'])")<br>
<br>
this broke on the very first NodeJS package I went to try it (requirejs):<br>
<br>
$ pwd<br>
/tmp/requirejs-2.1.20<br>
$ python -c "import json; print(json.load(open('package.json'))['name'])"<br>
Traceback (most recent call last):<br>
  File "<string>", line 1, in <module><br>
  KeyError: 'name'<br>
<br>
We probably want to fallback to looking at the source package name? </blockquote></div><br></div><div class="gmail_extra">This is the first time i see this.</div><div class="gmail_extra">Yes, keeping existing code as fallback seems to be safer.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Note that there is something odd with that module...</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra"><a href="https://github.com/jrburke/r.js">https://github.com/jrburke/r.js</a><br></div><div class="gmail_extra"><a href="https://github.com/jrburke/r.js/commit/40fa066e">https://github.com/jrburke/r.js/commit/40fa066e</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><a href="https://github.com/jrburke/requirejs">https://github.com/jrburke/requirejs</a></div><div class="gmail_extra"><a href="https://github.com/jrburke/requirejs/commit/a2029ccd">https://github.com/jrburke/requirejs/commit/a2029ccd</a><br></div><div class="gmail_extra"><br></div><div>So the correct upstream source seems to be requirejs, not r.js.</div><div>In any case upstream is using a meta-packager (volo) so in this case</div><div>package.json cannot be trusted (the fact it is available in the git</div><div>repository is misleading - it shouldn't even be there).</div><div><br></div><div>Jérémy</div></div></div>