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

Add a way to install only main binary/package (Needed files) #23

Open
2 tasks
Azathothas opened this issue Feb 26, 2025 · 4 comments
Open
2 tasks

Add a way to install only main binary/package (Needed files) #23

Azathothas opened this issue Feb 26, 2025 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@Azathothas
Copy link
Member

Currently, there's no way to specify that soar install only the main binary/package

For instance:

  1. Install a minimal package
$ soar add "whoami#git.busybox.net.busybox.standalone.glibc"
[1/1] whoami#git.busybox.net.busybox.sta [━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━] 17.88 MiB/s    11.23 MiB/11.23 MiB
* whoami#git.busybox.net.busybox.standalone.glibc
  Built From Source (Latest Git HEAD). Check/Report @ https://git.busybox.net/busybox
  This is the standalone version i.e all applets were built individually
  Statically Linked on Debian (GLIBC)

Installed 1/1 packages
  1. Find the size of the main binary
$ du -sh ~/.local/share/soar/packages/whoami-git.busybox.net.busybox.standalone.glibc-4bXEiXWyXgL9/whoami
844K    /home/runner/.local/share/soar/packages/whoami-git.busybox.net.busybox.standalone.glibc-4bXEiXWyXgL9/whoami
  1. Find the size of the entire package
$ du -sh ~/.local/share/soar/packages/whoami-git.busybox.net.busybox.standalone.glibc-4bXEiXWyXgL9/*
32K     /home/runner/.local/share/soar/packages/whoami-git.busybox.net.busybox.standalone.glibc-4bXEiXWyXgL9/CHECKSUM
20K     /home/runner/.local/share/soar/packages/whoami-git.busybox.net.busybox.standalone.glibc-4bXEiXWyXgL9/LICENSE
40K     /home/runner/.local/share/soar/packages/whoami-git.busybox.net.busybox.standalone.glibc-4bXEiXWyXgL9/SBUILD
844K    /home/runner/.local/share/soar/packages/whoami-git.busybox.net.busybox.standalone.glibc-4bXEiXWyXgL9/whoami
12K     /home/runner/.local/share/soar/packages/whoami-git.busybox.net.busybox.standalone.glibc-4bXEiXWyXgL9/whoami.json
11M     /home/runner/.local/share/soar/packages/whoami-git.busybox.net.busybox.standalone.glibc-4bXEiXWyXgL9/whoami.log
40K     /home/runner/.local/share/soar/packages/whoami-git.busybox.net.busybox.standalone.glibc-4bXEiXWyXgL9/whoami.png
4.0K    /home/runner/.local/share/soar/packages/whoami-git.busybox.net.busybox.standalone.glibc-4bXEiXWyXgL9/whoami.version

Soar installed 11 MB of stuff that could have been skipped.


Proposals

  • --binary-only
    This could also be called --bare or something else
    This would use ghcr_blob to download the main package, however to not break signing etc,
    we can keep the existing logic but include only pkg_name + pkg_name.sig (sig would be removed after verification)

For static this would work out of the box, for other formats that need desktop integration, we can introduce

  • --minimal
    This would install the main pkg + icons/desktop files and nthg else

We can fetch logs etc on demand if local file doesn't exist

Note

It is better to reserve --needed as it is already used by pacman and implies: Install only if not already installed


Where would this be useful?
For starters, would save lots of bandwidth & storage for power users (who read manuals)
And on containers where storage is crucial, adding these option would make soar ideal choice rather than hackish script in bash that do the same thing

@pkgforge-bot

This comment has been minimized.

@QaidVoid QaidVoid added the enhancement New feature or request label Feb 26, 2025
@QaidVoid
Copy link
Member

QaidVoid commented Feb 26, 2025

I think it makes more sense to fetch packages without the log/sbuild/metadata files by default. These are usually unnecessary to keep around unless the user want to view them.

I'd also suggest we implement more fine-grained download control:

  • Add --include and --exclude flags
  • These would accept values like: binary, log, spec, metadata, license
  • (Obviously we wouldn't allow excluding the binary)
  • Version files could probably be excluded in all cases - not really necessary

We should also make this a config option so users don't need to specify preferences for every install.

And, these also need be tracked in the database for future updates of the package.

@Azathothas
Copy link
Member Author

I think it makes more sense to fetch packages without the log/sbuild/metadata files by default. These are usually unnecessary to keep around unless the user want to view them.

Need at least the LICENSE, otherwise would get called out for that too.

These would accept values like: binary, log, spec, metadata, license

If you go that far, then allowing direct filename like soar dl's --match & --exclude makes more sense than hardcoding names
This would work as we have ghcr_files if not can fetch the file_name from manifest

The most pressing issue is you allow a bare install, whatever extra flags-features enable this feature is fine by me.

@QaidVoid
Copy link
Member

Need at least the LICENSE

Yes, re-read.

allowing direct filename

filenames won't be ideal for global config option or flag when installing multiple packages. The only option is to use the deterministic type of the file.

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

No branches or pull requests

3 participants