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

Suggestion: Import and export ("backup") a list of currently installed packages #121

Open
Olf0 opened this issue Mar 2, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@Olf0
Copy link
Collaborator

Olf0 commented Mar 2, 2022

Storeman has gained the feature to import and export ("backup") of the list of currently installed packages a few years ago. It was very well received, because that allows for easy migration of the installed packages (list) between devices and when flashing the same device anew.

The export simply creates a list of the currently installed packages from the SailfishOS:Chum repository (¿or all repositories?). I think that a simple, human readable format (with one package per line) is preferable, because it is at most a few hundred packages (= lines) long. One might consider to store the whole %{name}-%{version}-%{release} tuple, because unneeded information can still be discarded on import. I also suggest to consider a simple (but also human readable) header denoting the software and its version, which created the file. And the file needs a "sounding" (i.e., easily recognisable and self-explanatory) name, e.g., sailfishos-chum_packages-backup.txt.

It also makes sense to look (and maybe steal and adapt) Storeman's code and to consider to conform to the file format Storeman is using for this (if it is fulfilling the aforementioned requirements).

The import allows for selecting a backup file, parses it and installs the packages listed, which are still available. I actually never used Storeman's import function, so I cannot tell what Storeman does in detail.

@Olf0 Olf0 added the enhancement New feature or request label Mar 17, 2023
@Gaspartame
Copy link

Gaspartame commented Jun 29, 2023

It also makes sense to look (and maybe steal and adapt) Storeman's code

Or from install-history app by @nephros (if export feature doesn't add much work)

@nephros
Copy link
Contributor

nephros commented Jun 29, 2023

It also makes sense to look (and maybe steal and adapt) Storeman's code

Or from install-history app by @nephros (if export feature doesn't add much work)

I don't think that's suitable.
Install History works by parsing the zypp history file, which may or may not represent the list of installed packages.

Querying the RPM db would be better.

@Olf0
Copy link
Collaborator Author

Olf0 commented Jul 1, 2023

… because the RPM-database always provides information about all currently installed RPMs (if not, something went really wrong).

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