Skip to content

Cannot update on Fedora 30 #498

Closed
Closed

Description

@alexfornuto

Describe the bug

I'm guessing that Fedora sees the latest release as a new piece of software and not an upgrade to the previously-installed version.

❯ gh --version
gh version 0.5.4 (2020-02-04)
https://github.com/cli/cli/releases/tag/v0.5.4

(BTW, my shell is telling me that gh --version is not exiting with 0, not sure why not...)

Steps to reproduce the behavior

  1. Download latest RPM:
❯ wget https://github.com/cli/cli/releases/download/v0.5.5/gh_0.5.5_linux_386.rpm
--2020-02-18 16:35:31--  https://github.com/cli/cli/releases/download/v0.5.5/gh_0.5.5_linux_386.rpm
Resolving github.com (github.com)... 140.82.114.3
Connecting to github.com (github.com)|140.82.114.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
..........................
HTTP request sent, awaiting response... 200 OK
Length: 4623126 (4.4M) [application/octet-stream]
Saving to: ‘gh_0.5.5_linux_386.rpm’

gh_0.5.5_linux_386.rpm                                100%[=========================================================================================================================>]   4.41M  8.59MB/s    in 0.5s    

2020-02-18 16:35:38 (8.59 MB/s) - ‘gh_0.5.5_linux_386.rpm’ saved [4623126/4623126]
  1. Attempt to install it:
❯ sudo dnf install ./gh_0.5.5_linux_386.rpm
[sudo] password for alex: 
Last metadata expiration check: 0:05:42 ago on Tue 18 Feb 2020 04:30:14 PM CST.
Dependencies resolved.
============================
 Package                                         Architecture                                      Version                                              Repository                                                 Size
============================
Installing:
 gh                                              i386                                              0.5.5-1                                              @commandline                                              4.4 M

Transaction Summary
============================
Install  1 Package

Total size: 4.4 M
Installed size: 11 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Error: Transaction test error:
  file /usr/local/bin/gh from install of gh-0:0.5.5-1.i386 conflicts with file from package gh-0:0.5.4-1.x86_64

Expected vs actual behavior

Usually when upgrading packages, even those not in the package manager, dnf lists the new package as "Upgrading:", instead of "Installing:" Also, usually it succeeds.

System Information

❯ cat /etc/os-release
NAME=Fedora
VERSION="30 (Workstation Edition)"

Activity

  1. mislav commented on Feb 19, 2020

    @mislav
    Contributor

    Thank you for reporting!

    Does dnf upgrade <file> work in this case? Should we amend the installation docs?

  2. alexfornuto commented on Feb 19, 2020

    @alexfornuto
    Author

    @mislav dnf upgrade doesn't take arguments, it looks for updates to software managed by version control. I don't know what the fix is, having never maintained a dnf package before, but I would guess something needs to change that lets dnf know that these packages are different versions of the same thing.

    When I said dnf shows the package as "Upgrading", I was referring to the output of dnf install ./file. For example:

    ❯ sudo dnf install ./zoom_x86_64-3.5.352596.0119.rpm
    Last metadata expiration check: 0:02:43 ago on Wed 19 Feb 2020 08:24:48 AM CST.
    Dependencies resolved.
    ======================
     Package                                       Architecture                                    Version                                                      Repository                                             Size
    ======================
    Upgrading:
     zoom                                          x86_64                                          3.5.352596.0119-1                                            @commandline                                           67 M
    
    Transaction Summary
    ======================
    Upgrade  1 Package
    
    Total size: 67 M
    Is this ok [y/N]: 
    

    In order to get myself to the latest version of gh, I can uninstall the old version and install the new one, but I'm worried I'll have to generate new keys and lose any other settings saved by the current version.

  3. mislav commented on Feb 19, 2020

    @mislav
    Contributor

    In order to get myself to the latest version of gh, I can uninstall the old version and install the new one, but I'm worried I'll have to generate new keys and lose any other settings saved by the current version.

    I see. GitHub CLI stores its settings under ~/.config/gh/. I don't think uninstalling the package will remove that directory, since it has no knowledge of it, so I think it's safe to uninstall+reinstall. Although, I wish there was a smoother upgrade path.

    Let us know if you find it!

  4. alexfornuto commented on Feb 19, 2020

    @alexfornuto
    Author

    Thanks @mislav. I've successfully uninstalled/upgraded without loss of auth. I'd be happy to contribute these "upgrade" instructions to your docs, though I'd hope it would only be temporary.

  5. mislav commented on Feb 19, 2020

    @mislav
    Contributor

    I'd be happy to contribute these "upgrade" instructions to your docs

    Please do!

  6. added and removed
    bugSomething isn't working
    on Feb 19, 2020
  7. mwichmann commented on Feb 28, 2020

    @mwichmann

    FWIW, I just tried upgrading to the 0.5.7 with dnf install and it didn't exhibit the behavior described above. So it seems things have gotten better.

    Dependencies resolved.
    ==============================================================================================================
     Package              Architecture             Version                   Repository                      Size
    ==============================================================================================================
    Upgrading:
     gh                   x86_64                   0.5.7-1                   @commandline                   5.6 M
    
    Transaction Summary
    ==============================================================================================================
    Upgrade  1 Package
    
    Total size: 5.6 M
    Is this ok [y/N]: y
    Downloading Packages:
    Running transaction check
    Transaction check succeeded.
    Running transaction test
    Transaction test succeeded.
    Running transaction
      Preparing        :                                                                                      1/1 
      Upgrading        : gh-0.5.7-1.x86_64                                                                    1/2 
      Cleanup          : gh-0.5.5-1.x86_64                                                                    2/2 
      Verifying        : gh-0.5.7-1.x86_64                                                                    1/2 
      Verifying        : gh-0.5.5-1.x86_64                                                                    2/2 
    
    Upgraded:
      gh-0.5.7-1.x86_64                                                                                           
    
    Complete!
    
  8. alexfornuto commented on Feb 28, 2020

    @alexfornuto
    Author

    I tried upgrading from 0.5.5 to 0.5.7 and got the same behavior as detailed here, but hopefully the next release will replicate the behavior @mwichmann found, and we can close this without me having to honor my offer to update your docs.

  9. mislav commented on Mar 6, 2020

    @mislav
    Contributor

    @alexfornuto Now that 0.6.x is out, could you try upgrading again?

  10. alexfornuto commented on Mar 6, 2020

    @alexfornuto
    Author

    Yes, I could. And I did. Upgrading now works as expected. Blast fax kudos all around!

  11. mavit commented on Mar 7, 2020

    @mavit

    I think what happened here was that dnf didn't know that you wanted the newer i386 package to replace the older x86_64 package, rather than to be installed in parallel.

  12. alexfornuto commented on Mar 8, 2020

    @alexfornuto
    Author

    .....yup. That was the 386 package. I'll go flog myself now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions