FS#60027 - asp checkout fails: "Invalid cross-device link"

Attached to Project: Arch Linux
Opened by Sebastian Jug (jugs) - Tuesday, 11 September 2018, 22:37 GMT
Last edited by Dave Reisner (falconindy) - Friday, 14 September 2018, 00:43 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
I have my ~/.cache directory mounted to tmpfs, so after I run `asp update linux`. I'm unable to checkout in my build subdirectory in my home, not in tmpfs.
This was not an issue in asp 2-1, downgrading it works as expected in this setup.

Additional info:
asp 3-1

[host@host pkg]$ asp checkout linux
Cloning into 'linux'...
fatal: failed to create link 'linux/.git/objects/pack/pack-22d412caca45608f40f7079339454132b43cf8bc.idx': Invalid cross-device link
fatal: the remote end hung up unexpectedly

Steps to reproduce:
1. Mount ~/.cache as tmpfs
2. `asp update linux`
3. `cd ~/pkg; asp checkout linux`
4. See error
This task depends upon

Closed by  Dave Reisner (falconindy)
Friday, 14 September 2018, 00:43 GMT
Reason for closing:  Fixed
Additional comments about closing:  asp v4
Comment by Dave Reisner (falconindy) - Wednesday, 12 September 2018, 13:58 GMT
Thanks for the bug report. This is caused by https://github.com/falconindy/asp/commit/19142f31449c5b7d81e3c61873d025d855886fef. The problem is much more general than ASPROOT on tmpfs -- it'll be triggered any time your ASPROOT is on a filesystem different from where you create the checkout. That's probably not uncommon.

https://github.com/falconindy/asp/commit/33b433898ebd7771ca045338bfca7c910312970c should fix.
Comment by Eli Schwartz (eschwartz) - Wednesday, 12 September 2018, 18:18 GMT
That's odd, I would think that git would only use hardlinks when it knows it can. :/

Anyway, why not use --shared instead? This is not a case where you're afraid of info being pruned from the origin.
Comment by Dave Reisner (falconindy) - Wednesday, 12 September 2018, 18:26 GMT
> This is not a case where you're afraid of info being pruned from the origin.
In the case of the submitter, the origin is pruned every time they reboot.
Comment by Eli Schwartz (eschwartz) - Wednesday, 12 September 2018, 18:55 GMT
Well, in that case, the initial checkout would still work, and anyway it would solve the general case of cross-filesystem checkouts.

If ASPROOT disappears you will still need to reclone in order to do anything, though. (Except use the on-disk PKGBUILD.) And simply re-running asp update foo, should ensure the objects you need are restored.
Comment by Dave Reisner (falconindy) - Thursday, 13 September 2018, 10:37 GMT
Yep, --shared seems simpler. Thanks.

Loading...