Giter Site home page Giter Site logo

Comments (3)

bkw777 avatar bkw777 commented on July 23, 2024

I have improved this a lot, and by now it's actually doing the right thing for most people most of the time. If you only ever use the gui, and don't go out of your way to confuse it by using sudo or pkexec rather than letting it use pkexec itself just when it needs to, then I think it never generates bad files from there any more. If you use the console app without sudo, also all good.

But there are still situations where it will do the wrong thing. If you run the console app from sudo, and it needs to download anything, then it creates root-owned files in your non-root home dir. This can actually be avoided (now). If for some reason you even wanted to use the console app manually or from your own script, you can run --list to download all the indexes and display all the available kernels. You can then run --download with one or more of those versions and it will download those kernels .deb files to cache, all without root still. And finally, you need sudo to run --install, but if you run "sudo mainline --install x.y.z" and x.y.z has already been downloaded, then mainline will not end up creating any directories or files as root. If everything it goes to look for is already there, then it just runs dpkg as root, which is harmless. Mostly, none of that even matters, because youre using the gui app anyway, and that is now doing the right thing.

It also (now) deletes .deb files after installing them, so your ~/.cache directory doesn't grow (much) forever.

And since bad files are no longer being created, --clean-cache actually works. But with no debs, you don't really need to bother with that any more anyway.

Then again, even when it's doing the right thing it's doing it gawdawful inelegantly and inefficiently internally. It's crap.

So it's a lot better, no longer flat out broken in most cases, and generally ok to use now.
But it still needs an even better overhaul, so I'm leaving this issue open.

from mainline.

bkw777 avatar bkw777 commented on July 23, 2024

For one thing, it creates a butt-load of directories in /tmp, and doesn't clean up after itself. You would think that would be pretty simple to fix. I sure did, until I saw the ridiculous ways the code works.I tried really... All I managed to do so far is at east I got it so that each individual function that uses /tmp makes it's own top level dir in /tmp, so that there is never a permissions problem from root and non-root trying to do things in the same dir.

This is ugly and bad hygene and basically crap, but, it's mostly harmless crap today, because /tmp is more and more frequently being done as a tmpfs filesystem in ram, which gets wiped out every reboot, and most systems have a cron job that cleans out /tmp periodically.

from mainline.

bkw777 avatar bkw777 commented on July 23, 2024

massive fixups. using sudo when you don't need it will still cause a mess, but it's cleaning up fully after itself now when used normally (let it ask for root itself when it needs to). No dirs or files are left behind in /tmp. No root-owned files are created in the users ~/.config/...

from mainline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.