Skip to content

Mismatch between how Captain and APT normalize package names #24

Description

@schorschii

(follow-up of #16, an issue found by @Bob-A-Dook)

Captain's code hits the "no-success path" when handling a package if the package name contains uppercase letters (even when it's successfully installed), because the line

if self.deb.pkgname in cache:

evaluates to False.

That's because the value of self.deb.pkgname is OCO-Agent, while the cache object only has a lowercase entry oco-agent after installation:

<Package: name:'oco-agent' architecture='amd64' id:166258>

Looks like there is a mismatch between how Captain and APT normalize package names. As a result, Captain doesn't find some packages in cache and doesn't consider it fully installed.

This leads to two side effects:

  • there is no "OCO-Agent is now installed" message after the installation finishes,
  • the Install Package button stays green and clickable after the installation, even if you close and reopen the DEB file.

In contrast, APT rightfully considers the package as installed.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions