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

If a package is deinstalled and then reinstalled for upgrade purposes: logged messages should include the deinstallation #2413

Open
grahamperrin opened this issue Jan 30, 2025 · 2 comments

Comments

@grahamperrin
Copy link
Contributor

Following an upgrade command a few hours ago, I was surprised to find this line alone logged for Telegram:

telegram-desktop-5.10.6 installed

– surprised, because telegram-desktop was installed long before the upgrade.

In cases such as this, it seems that:

  • /var/log/messages does include the installation, but not the preceding deinstallation.

Without looking in detail at my recent log files, the number of deinstalled lines is wrong (too low) compared to the number of installed lines:

grahamperrin:~ % grep deinstalled /tmp/messages.0 | wc -l
       1
grahamperrin:~ % grep \ installed /tmp/messages.0 | wc -l
    1409
grahamperrin:~ % grep reinstalled /tmp/messages.0 | wc -l
      54
grahamperrin:~ % grep upgraded /tmp/messages.0 | wc -l
     444
grahamperrin:~ % head -n 1 /tmp/messages.0 ; tail -n 1 /tmp/messages.0
Jan 22 19:00:00 mowa219-gjp4-zbook-freebsd newsyslog[5605]: logfile turned over due to size>1000K
Jan 26 01:00:00 mowa219-gjp4-zbook-freebsd newsyslog[6790]: logfile turned over due to size>1000K
grahamperrin:~ % grep deinstalled /var/log/messages | wc -l
       6
grahamperrin:~ % grep \ installed /var/log/messages | wc -l
     469
grahamperrin:~ % grep reinstalled /var/log/messages | wc -l
      10
grahamperrin:~ % grep upgraded /var/log/messages | wc -l
     136
grahamperrin:~ % head -n 1 /var/log/messages ; date
Jan 26 01:00:00 mowa219-gjp4-zbook-freebsd newsyslog[6790]: logfile turned over due to size>1000K
Thu 30 Jan 2025 00:48:37 GMT
grahamperrin:~ % 

In detail

After observing the Telegram case, I created a test boot environment to capture more detail.

2025-01-29 18-26 test, telegram-desktop upgraded but logged as installed.txt

Current environment

grahamperrin:~ % pkg iinfo ^pkg$
pkg-2.0.5
grahamperrin:~ % uname -aKU
FreeBSD mowa219-gjp4-zbook-freebsd 15.0-CURRENT FreeBSD 15.0-CURRENT main-n275068-0078df5f0258 GENERIC-NODEBUG amd64 1500030 1500030
grahamperrin:~ 
@ericbsd
Copy link
Member

ericbsd commented Feb 4, 2025

On my side, pkg upgrade -f has deleted a lot of packages, and the desktop have crashed.

Image

I was not able to recover the desktop from the TTY.

@grahamperrin
Copy link
Contributor Author

grahamperrin commented Feb 4, 2025

For #2413 (comment) @ericbsd please, can you create a separate issue?

For this issue #2413 to remain focused on logging. Thanks


Noted:

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