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

[feature suggestion] pkg should preserve packages that it deletes temporaily when they are not currently available in the binary package database #2235

Open
yurivict opened this issue Jan 31, 2024 · 5 comments

Comments

@yurivict
Copy link
Member

yurivict commented Jan 31, 2024

Problem description

At the moment chromium is not available as a binary package on 14 amd64 for some transient reason.

While installing some other packages pkg temporarily removed chromium, and then failed to reinstall it because it isn't currently available.

As a result chromium disappeared on this system while some unrelated packages were installed or updated.

Chromium is a particularly important package because it is a major web browser, and removing such package without user intent causes problems for users. An important package disappears during a seemingly unrelated operation without an obvious reason.

Feature suggestion

When some software package should be temporarily uninstalled and it isn't available in the package DB - pkg should:

  • create or offer the user to create a binary package for this software package from its installed version
  • use this binary package to reinstall this software, or offer the user to reinstall it.
@bapt
Copy link
Member

bapt commented Jan 31, 2024

pkg already does that the packages are in the cache directory so one can manually install it via pkg install /var/cache/pkg/chromium

@bdrewery
Copy link
Member

This would require saving all of the old dependencies as well. At some level, package or shlib files. This behavior has bitten me plenty. People have asked for similar fix to Poudriere but the same problems exist with dependencies. Smarter fat packages could solve this but I don't see that happening.

@yurivict
Copy link
Member Author

yurivict commented Jan 31, 2024

@bapt

Packages are places into /var/cache/pkg when they are originally installed with pkg, and not when they are installed by building from a port.
This cache was cleaned at some point for unrelated reasons, and the file wasn't there.

So I suggest that /var/cache/pkg/{name}.xxx is created in the case when:
(1) it needs to be removed
(2) it isn't in /var/cache/pkg
(3) it isn't in the binary package DB

@yurivict
Copy link
Member Author

yurivict commented Jan 31, 2024

True, some dependency might be different, etc., but in the current specific case I reinstalled chromium by creating a binary package from the file system backup from 2-3 days ago and it works fine. In case when that backup wouldn't have been available - I wouldn't be able to use chromium for many hours until it would rebuild.

I believe this is a real problem for regular users that an important package can just disappear like this.

@grahamperrin
Copy link
Contributor

Also:

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

4 participants