Comments (14)
The root cause is that the python2 package is compiled without os.link support, since hard links are not supported on Android (starting in Android version 6). This causes the line oslink = os.link
to fail with the above exception.
- Adding back os.link (as a method which would would not work on Android 6) would unfortunately cause
pip
to break, see termux/termux-packages#29. - If mercurial was changed to work without os.link (at least on Android) that would be great, but probably not very likely to be accepted by the mercurial project.
Does changing the line oslink = os.link
to something like oslink = os.symlink
in $PREFIX/lib/python2.7/site-packages/mercurial/posix.py
cause mercurial to run (with basic functionality such as cloning and pushing working)?
from termux-app.
I think symlinks are more error-prone than just copying (that's what AFAIK mercurial does in Windows), so I added:
[...]
import shutil
[...]
oslink = shutil.copy2
[...]
And it works like a charm!
from termux-app.
Reported upstream: https://bz.mercurial-scm.org/show_bug.cgi?id=4974
from termux-app.
If you could package this, you could add a patch, but maybe I'm asking for too much work...
from termux-app.
Great work reporting it to mercurial! I'll look into how much work it would be to package mercurial with this patch (otherwise I'll add a note about the manual patching steps needed when installing from pip in an upcoming collection of help pages)!
from termux-app.
A reference for the removed hard link support in Android 6 is https://code.google.com/p/android-developer-preview/issues/detail?id=3150
from termux-app.
Please DO NOT package mercurial with symlinks replacing hardlinks. Copies are fine, that's what we'll fall back to anyway.
FWIW, I've mailed a fix for this to our list, and it should get reviewed in the next few days, at which point I'd really appreciate someone testing it (I'm not sure how to test it myself.)
from termux-app.
@durin42 Yes, let's forget I ever mentioned symlinks as fallbacks :).
Great, let us know here if you want us to help testing a patch (and perhaps write down instructions/steps for anything special to be tested)!
If you want to test anything yourself, install the Termux app, and then install required packages by executing
apt install python2-dev gcc
You should now be able to install mercurial with
pip2 install mercurial
from termux-app.
Alrighty, if someone could test http://selenic.com/hg (if a zip is easier: https://selenic.com/hg/archive/42aa0e570eaa.zip) and let me know if it works, I'd greatly appreciate it.
Thanks!
from termux-app.
@durin42 Nice work! I built mercurial with make local
and verified that basic cloning, pushing, committing, pulling and pushing works.
Do you have an estimate for which version this would be available in mercurial (and when)?
from termux-app.
The patch is on our default branch for our next major release, which will be on February 1, 2016. The patch should apply to the stable branch, so if you want you can point people at a custom zip that has that applied for now.
(https://www.mercurial-scm.org/wiki/TimeBasedReleasePlan if you're curious)
On Dec 11, 2015, at 18:48, Fredrik Fornwall [email protected] wrote:
@durin42 https://github.com/durin42 Nice work! I built mercurial with make local and verified that basic cloning, pushing, committing, pulling and pushing works.
Do you have an estimate for which version this would be available in mercurial (and when)?
—
Reply to this email directly or view it on GitHub #22 (comment).
from termux-app.
Ok, interested people can apply https://selenic.com/repo/hg/rev/b0d90fef16b6 to $PREFIX/python2.7/site-packages/mercurial/posix.py
after installing mercurial through pip in the meantime.
Thanks for the help!
from termux-app.
Works perfectly. Anybody interested can run pip2 install https://selenic.com/hg/archive/42aa0e570eaa.zip
(add --upgrade
if you had a previous version).
from termux-app.
@yajo That's great! Didn't know that you could point pip to the zip file directly.
from termux-app.
Related Issues (20)
- Incorrect permissions after upgrading to PHP 8.3 HOT 1
- [Feature]: Switch session by keyboard HOT 6
- [Bug]: Termux SAF cannot delete non-empty directory HOT 1
- Termux intent HOT 3
- [Feature]: fping 5.1 HOT 1
- Allow access HOT 14
- [Bug]: nodejs Dependencies HOT 7
- [Bug]: Can't run Nodejs, libicu version incompatible HOT 3
- [Bug]: error on package PHP HOT 1
- [Feature]: Change the mouse wheel scroll rate.
- [Bug]: npm install HOT 1
- [Feature]: Ability to use emacs shortcuts
- [Bug]: termux-file-editor running after sharing links with unknown/not included uri schemes
- [Bug]: Memory HOT 4
- [Feature]: customize terminal HOT 1
- [Bug]: First word repeats when using "swype" to type. HOT 2
- [Feature]: Release 119 HOT 1
- [Bug]: poco x3 pro (no root) package installer fails (log file)
- Arrow keys not working on samsung keyboard[Bug]:
- [Feature]: Support "termux:" scheme when temux-scheme-opener script is created.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from termux-app.