Skip to content
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

Cache downloaded Archives #65

Open
arakis opened this issue Oct 5, 2023 · 1 comment
Open

Cache downloaded Archives #65

arakis opened this issue Oct 5, 2023 · 1 comment

Comments

@arakis
Copy link

arakis commented Oct 5, 2023

Like normal .deb-packages are cached, it would be great if the downloaded archives would also cached. There are several reasons why this could be useful, and for that reasons the Debian apt system itself caches all files.

In my case it's because if often rebuild my Linux system from scratch (infrastructure as code), but downloaded takes ages and is very expensive, because I'm 100% on cell phone connection in Africa.

Some thoughts: I see the point, that the cache directory would be bloated, because the archives are very huge. Having at least the previous version is useful, because sometimes new versions could have a glitch.

I see several options:

  • Just let the cache growing
  • or provide a clean-up script - per package or a utility-package containing that script.
  • Specify the cache directory via Environment Variable
  • If set, also pick up existing files from there, and do not delete after installation.
  • In theory, you can symlink the versioned archive file name with the version-less archive name.

Another option could be to make the installations from this (cloned GitHub) directly via some scripts, but it feels not right.

Why not just having some external scripts? Because than, there are no contributions to this project. I like the idea to bring this in here.

@SkoZombie
Copy link

The way the packages are built, the file names are standardised so you wouldn't easily know the version of a package even if it wasn't deleted and you'd risk installing an older version than you intended. It might be included in the directory name inside the archive for you to do some comparisons with.

The preinstall file does the download to the standardised location/ file and the postinstall file extracts it and removes it once done. These files are standard bash scripts if you want to have a go at adding the caching features you mentioned. This would need to be done for each package.

The JB downloads are kept separate to the DEBs so that no copyright rules are infringed from what I can tell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants