holzschu / Carnets

Carnets is a stand-alone Jupyter notebook server and client. Edit your notebooks on the go, even where there is no network.
https://holzschu.github.io/Carnets_Jupyter/
BSD 3-Clause "New" or "Revised" License
566 stars 34 forks source link

get_frameworks.sh Patching Javascript files fails previously applied patch #5

Closed iain2k closed 5 years ago

iain2k commented 5 years ago

Cloning the repo from new then running the ./get_frameworks.sh script fails patching the Javascript files.

Patching Javscript files:
patching file lib/python3.7/site-packages/ipykernel/heartbeat.py
Hunk #1 FAILED at 66.
1 out of 1 hunk FAILED -- saving rejects to file lib/python3.7/site-packages/ipykernel/heartbeat.py.rej
patching file lib/python3.7/site-packages/ipykernel/kernelapp.py
Hunk #1 FAILED at 456.
Hunk #2 succeeded at 236 with fuzz 2 (offset -300 lines).
1 out of 2 hunks FAILED -- saving rejects to file lib/python3.7/site-packages/ipykernel/kernelapp.py.rej
patching file lib/python3.7/site-packages/notebook/static/edit/js/main.min.js
patching file lib/python3.7/site-packages/notebook/static/notebook/js/main.min.js
patching file lib/python3.7/site-packages/notebook/static/tree/js/main.min.js
patching file lib/python3.7/site-packages/notebook/static/tree/js/newnotebook.js
patching file lib/python3.7/site-packages/notebook/static/tree/js/shutdownbutton.js
patching file lib/python3.7/site-packages/notebook/templates/page.html
Reversed (or previously applied) patch detected!  Assume -R? [n]  

Library.patch

+++ Library/lib/python3.7/site-packages/notebook/templates/page.html    2019-01-28 12:23:45.000000000 +0100
@@ -137,11 +137,13 @@
   {% block login_widget %}

     <span id="login_widget">
+  <!--  iOS: commented out
       {% if logged_in %}
         <button id="logout" class="btn btn-sm navbar-btn">{% trans %}Logout{% endtrans %}</button>
       {% elif login_available and not logged_in %}
         <button id="login" class="btn btn-sm navbar-btn">{% trans %}Login{% endtrans %}</button>
       {% endif %}
+  -->
     </span>

The patch is already applied to page.html.

    <span id="login_widget">
  <!--  iOS: commented out
      {% if logged_in %}
        <button id="logout" class="btn btn-sm navbar-btn">{% trans %}Logout{% endtrans %}</button>
      {% elif login_available and not logged_in %}
        <button id="login" class="btn btn-sm navbar-btn">{% trans %}Login{% endtrans %}</button>
      {% endif %}
  -->
    </span>
iain2k commented 5 years ago

Skipping the patches I can successfully build Carnets.

holzschu commented 5 years ago

Thank you for spotting that one! Explanation: this error message appears when you try to apply a patch twice to the same file. I had forgotten to erase Library to reset its state before downloading it from the release. It should be fixed with commit 2c4b5bd.