[Debian-science-sagemath] Help needed to backport jupyter-notebook (Was: Help needed for backporting node-esprima (Was: Backporting sagemath))
Andreas Tille
tille at debian.org
Sat Apr 8 06:03:51 UTC 2017
Hi Ximin,
On Fri, Apr 07, 2017 at 02:56:00PM +0000, Ximin Luo wrote:
> > ^
> >
> > Error: can't find module index for: ../fonts/fontawesome-webfont.eot?v=4.2.0
> > at getModuleIndex (/build/ipywidgets-5.2.2/debian/fakewebpack-postprocess.js:64:19)
> > at Context.types.visit.visitCallExpression (/build/ipywidgets-5.2.2/debian/fakewebpack-postprocess.js:106:27)
> > at Context.invokeVisitorMethod (/usr/lib/nodejs/ast-types/lib/path-visitor.js:344:49)
> > at Visitor.PVp.visitWithoutReset (/usr/lib/nodejs/ast-types/lib/path-visitor.js:196:32)
> > at visitChildren (/usr/lib/nodejs/ast-types/lib/path-visitor.js:246:25)
> > at Visitor.PVp.visitWithoutReset (/usr/lib/nodejs/ast-types/lib/path-visitor.js:204:20)
> > at visitChildren (/usr/lib/nodejs/ast-types/lib/path-visitor.js:246:25)
> > at Visitor.PVp.visitWithoutReset (/usr/lib/nodejs/ast-types/lib/path-visitor.js:204:20)
> > at visitChildren (/usr/lib/nodejs/ast-types/lib/path-visitor.js:246:25)
> > at Visitor.PVp.visitWithoutReset (/usr/lib/nodejs/ast-types/lib/path-visitor.js:204:20)
> >
> >
> > Hope this helps. BTW, this should be easily reproducible since all
> > preconditions are now in backports.
>
> Hey,
>
> Try editing debian/fakewebpack/docs.modules to say "4.2.0" instead of "4.7.0" in various places.
>
> When it says "can't find module index for: XXX" it is looking for a line containing XXX, and will replace that with the matching line number.
>
> This is how my "fakewebpack" hack works, I know it is a bit stupid and not sustainable and I'll try to think of something that is easier to maintain soon, when I revisit ipywidgets for the next version 6.0.0.
Strangely enough this tip does not work as quilt patch - dpkg-source
detects source changes. However, I tried
diff --git a/debian/rules b/debian/rules
index 4590d8c..6e057e3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,6 +12,7 @@ override_dh_auto_configure:
override_dh_auto_build:
# fakewebpack
+ sed -i 's/4\.7\.0/4.2.0/' debian/fakewebpack/docs.modules
$(MAKE) -C debian -f fakewebpack.mk all
touch debian/fakewebpack-build/widgetsnbextension/extension.js.map
# See that patch for a description of why this is needed
which helped a but further. Now I get:
...
module 29: nodejs ../../fakewebpack-postprocess.js ./node_modules/font-awesome/fonts/fontawesome-webfont.woff2 ../../fakewebpack/docs.modules
Traceback (most recent call last):
File "./fakewebpack-generate.py", line 80, in <module>
sys.exit(main(*sys.argv[1:]))
File "./fakewebpack-generate.py", line 61, in main
cwd=srcdir).decode("utf-8")
File "/usr/lib/python3.4/subprocess.py", line 620, in check_output
raise CalledProcessError(retcode, process.args, output=output)
subprocess.CalledProcessError: Command '['nodejs', '../../fakewebpack-postprocess.js', './node_modules/font-awesome/fonts/fontawesome-webfont.woff2', '../../fakewebpack/docs.modules']' returned non-zero exit status 1
fakewebpack.mk:55: recipe for target 'fakewebpack-build/docs.stamp' failed
make[2]: *** [fakewebpack-build/docs.stamp] Error 1
...
and to create the javascript backtrace:
/build/ipywidgets-5.2.2/debian/fakewebpack-unpacked/node-libs-browser# nodejs ../../fakewebpack-postprocess.js ./node_modules/font-awesome/fonts/fontawesome-webfont.woff2 ../../fakewebpack/docs.modules
fs.js:549
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT: no such file or directory, open './node_modules/font-awesome/fonts/fontawesome-webfont.woff2'
at Error (native)
at Object.fs.openSync (fs.js:549:18)
at Object.fs.readFileSync (fs.js:397:15)
at Object.<anonymous> (/build/ipywidgets-5.2.2/debian/fakewebpack-postprocess.js:193:19)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
Do you have any further hints for this packaging magic? ;-)
Kind regards
Andreas.
--
http://fam-tille.de
More information about the Debian-science-sagemath
mailing list