Comments (11)
This could be worked around by providing -T
or directly providing the list of files to archive, instead of using a directory (.
in this case)
from toybox.
I tried to reproduce this on the host debian one (to see what success looked like) and got "tar: invalid argument ‘-C’ for ‘--sort’, Valid arguments are: - ‘none’ - ‘name’ - ‘inode’". I see I did (sort);: so the argument to sort is optional (takes it if cuddled ala -snone or --sort=none, but "-s sort" is two unrelated arguments...). The argument thing is kind of bonkers because "none" is what you get without the argument, "inode" is essentially random on modern filesystems, so only "name" makes any sense?
I used --sort=name and got:
$ tar tvf testing.tar
drwxr-xr-x landley/landley 0 2023-09-30 11:14 ./
-rw-r--r-- landley/landley 0 2023-09-30 11:13 ./bar
hrw-r--r-- landley/landley 0 2023-09-30 11:13 ./foo link to ./bar
Is that the output you expect here? First entry is type 5 (dir), second is 0 (file), third is 1 (hardlink).
Rob
from toybox.
Ha, interesting corner case. I added the missing dereference flag, but it's still not treating entry 3 as a hardlink because the link count is 1, and I'm only adding entries with a link count >1 to the seen inode list because I didn't bother to do a fancy tree or hash table and instead used "most non-directory nodes have a link count of 1" as a filter to keep the linear search from getting punitive.
Probably the dirtree plumbing should record that the dirent saw a symlink but we read through it in the returned node somewhere, and then I can use that as a flag to add it to the potential hardlink list. Hmmm...
from toybox.
Nope, doing that doesn't help. And the reason it doesn't is the second entry aliased with the first by following a symlink, but the first is a perfectly normal file (which already went past unremarked), and it has to record BOTH to see the collision. So with -h it has to record normal files with link count 1. Hmmm...
from toybox.
Ok, try commit 658a944 and note that I didn't try to optimize the hardlink list; if performance obviously suffers doing tar -ch on giant directories I assume someone will let me know.
from toybox.
Thank you @landley ! Let us update our prebuilts and try out the new commit you have.
from toybox.
Thank you @landley ! Let us update our prebuilts and try out the new commit you have.
i'll take that as a request for new prebuilts... coming up!
from toybox.
https://android-review.googlesource.com/c/platform/prebuilts/build-tools/+/2776234 has a toybox with everything up to and including yesterday's timeout fix.
from toybox.
(currently blocked on a one-true-awk bug: onetrueawk/awk#199)
from toybox.
I plead the third.
from toybox.
(updated toybox by just skipping one-true-awk for now...)
from toybox.
Related Issues (20)
- Implement -execdir for safety and security HOT 2
- xargs has non-conforming behavior (failing to exit) when a child exits with exit status 255 HOT 3
- install does not handle the creation of "drwxr-s---" correctly HOT 6
- xsendfile error checking
- add a useful common ip HOT 3
- Request diff -I/--ignore-matching-lines
- [Documentation] Differences to busybox? HOT 3
- [Feature request] Could a static-option be added to the menu interface? HOT 5
- [Documentation / Question] Can toybox be combined with e. g. mruby? HOT 9
- building a rootfs without a kernel HOT 10
- Most scripts use /bin/bash, which not all systems have. Use /usr/bin/env instead? HOT 11
- [Q] Can `bash` compatibility in toysh be turned off during build time and during run time? HOT 2
- building 0.8.11 with ssl and tls is broken HOT 15
- When running shell scripts, the process coredump.
- POSIX deviation: test arithmetic operands must support decimal only HOT 12
- find -size <number-without-suffix> not POSIX HOT 7
- Can you include oksh? HOT 1
- On incremental builds' reproducibility HOT 1
- ASAN failures in various file processing commands HOT 2
- [Feature Suggestion] progress meter (pv subcommand) HOT 5
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 toybox.