-
-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(archlinux): .MTREE should have parent dirs as well #645
Conversation
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Codecov Report
@@ Coverage Diff @@
## main #645 +/- ##
==========================================
- Coverage 75.69% 75.68% -0.01%
==========================================
Files 14 14
Lines 2942 2941 -1
==========================================
- Hits 2227 2226 -1
Misses 506 506
Partials 209 209
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
I can’t really review this PR right now but from a first glance I think this should be fixed by taking advantage of the new content api I introduced. There we create implicit directories (a dedicated content type) that we add for debs but not for rpms. So arch packages should work like debs in this regard. |
We probably just need to add implicit dirs in the content type switch in WriteTo. Currently the parent dirs are probably added as regular file entries due to the default case. |
This should do the trick: func (me *MtreeEntry) WriteTo(w io.Writer) (int64, error) {
switch me.Type {
- case files.TypeDir:
+ case files.TypeDir, files.TypeImplicitDir:
n, err := fmt.Fprintf(
w,
"./%s time=%d.0 mode=%o type=dir\n", However, the test does take the I'm sorry, but I don't have the time to rewrite the test, otherwise I would have already pushed the diff above. |
ah way better indeed, will work on it, thanks! |
Co-Authored-By: Co-authored-by: Erik Geiser <erik.geiser@posteo.net> Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Deploying with Cloudflare Pages
|
@erikgeiser fwiw that doesn't work, will look into why later... but the root folders are still missing there... |
Yeah I missed this one: Line 177 in 571a32b
The mtree entry should always be added. |
Ah right, I'm 100% blind 😂 |
Co-Authored-By: Co-authored-by: Erik Geiser <erik.geiser@posteo.net> Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
ight, all fixed, thanks for the help @erikgeiser |
this walks up the destination and creates the
.MTREE
entries for the parents too, otherwise packages are not installable bypacman
.if anyone knows a better way to do this, I'm all ears...
closes #638