chromebrew / chromebrew

Package manager for Chrome OS
https://chromebrew.github.io
GNU General Public License v3.0
2.33k stars 380 forks source link

`lib/fixup.rb` does not handle removing deprecated packages properly. #9783

Open Zopolis4 opened 6 months ago

Zopolis4 commented 6 months ago

Describe the bug When removing a deprecated package, lib/fixup.rb removes the files, but does not remove them from the list of installed packages. This is due to an error in the code for writing to device.json

To Reproduce Steps to reproduce the behavior:

  1. Please indicate where the command(s) were executed.

satmandu/crewbuild:amd64 docker image (Digest: sha256:c650cf0911bd7b9f4cca4d3289386dbb1d9f68e2765e37958459338096d152a3

  1. I executed the command(s) below:

      crew install js91
      crew update # Accept the removal of js91 here
      crew list installed | grep "js91"

    Output:

      chronos@67adfbd614ad /usr/local/lib/crew/packages $ crew update
      From https://github.com/chromebrew/chromebrew
       * branch                master     -> FETCH_HEAD
      HEAD is now at e62d1ce08 Vscodium 1.87.2.24072 => 1.89.1.24130 (#9780)
      Package lists, crew, and library updated.
    
      Js91 found in package fixup list
      Js91 is deprecated and should be removed.
      Js91: Replaced by newer versions of js.
    
      Would you like to remove deprecated package Js91? [y/N] y
      js91 removed!
      Checking for package updates...
      Your software is up to date.
    
      js91 # from the checking of crew list installed | grep "js91"

    Expected behavior That js91 is removed from the list of installed packages.

Expand - Architecture: `x86_64` (`x86_64`) - Processor vendor: `GenuineIntel` - User space: `64-bit` - Chromebrew Kernel version: `5.10` - Chromebrew Running in Container: `true` - Chromebrew version: `1.48.1` - Chromebrew prefix: `/usr/local` - Chromebrew libdir: `/usr/local/lib64` - Last update in local repository: e62d1ce08 `Vscodium 1.87.2.24072 => 1.89.1.24130 (#9780) (33 minutes ago)` - OS variant: `Chrome OS` - OS version: `nocturne-release/R124-15823.40.0` - OS channel: `stable-channel`
github-actions[bot] commented 1 day ago

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments. If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release with crew update && yes | crew upgrade, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label. This bot exists to prevent issues from becoming stale and forgotten. Chromebrew is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly.