saltstack / saltstack/salt

[BUG] Certain package not detected as installed (rpm/zypp)

Open
#60,287 8 comments 0 reactions 1 assignee View on GitHub

@xeacott is already working on this.

Since Jun 1, 2021.

bug severity-medium
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description
Certain packages are not detected as installed. These are Canon print drivers downloaded from https://support.brother.com/g/b/downloadlist.aspx?c=us_ot&lang=en&prod=dcpt500w_all&os=127#SelectLanguageType-558_0_1 . Even though installed when applying the state files zypper tries to reinstall them, leading to an error

Setup

install_printer_drivers:
    pkg.installed:
        - pkgs: 
            - epson-inkjet-printer-escpr
            - iscan
            - iscan-network-nt
            - iscan-data
            - dcpt500wcupswrapper
            - dcpt500wlpr

Steps to Reproduce the behavior
Try to apply the above state snippet with a repository that has the listed packages installed.

Expected behavior
The packages should be detected as installed.

Screenshots
N/A

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
          Salt: 3002.2
 
Dependency Versions:
          cffi: 1.14.5
      cherrypy: Not Installed
      dateutil: 2.8.1
     docker-py: 4.4.4
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 2.11.3
       libgit2: Not Installed
      M2Crypto: 0.37.1
          Mako: Not Installed
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: 2.20
      pycrypto: 3.10.1
  pycryptodome: Not Installed
        pygit2: Not Installed
        Python: 3.8.10 (default, May 05 2021, 15:36:36) [GCC]
  python-gnupg: Not Installed
        PyYAML: 5.4.1
         PyZMQ: 22.0.3
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.3.4
 
System Versions:
          dist: opensuse-tumbleweed 20210524 n/a
        locale: utf-8
       machine: x86_64
       release: 5.12.4-1-default
        system: Linux
       version: openSUSE Tumbleweed 20210524 n/a

Additional context

pkg.info_installed finds information about the package, but pkg.version is unable to do so, see below

$ sudo ./run-salt.sh pkg.info_installed dcpt500wlpr
local:
    ----------
    dcpt500wlpr:
        ----------
        arch:
            i386
        build_date:
            2015-04-19T23:09:08Z
        build_date_time_t:
            1429484948
        build_host:
            localhost.localdomain
        description:
            Brother inkjet printer Driver
        group:
            Applications
        install_date:
            2019-04-15T20:22:00Z
        install_date_time_t:
            1555359720
        license:
            2003-2015 Brother Industries, Ltd. All Rights Reserved
        packager:
            root@localhost.localdomain
        release:
            0
        relocations:
            (not relocatable)
        signature:
            (none)
        size:
            5028638
        source:
            dcpt500wlpr-3.0.2-0.src.rpm
        summary:
            Brother lpr Inkjet Printer Driver
        vendor:
            Brother Industries, Ltd.
        version:
            3.0.2
$ sudo ./run-salt.sh pkg.version dcpt500wlpr
local:
    ----------

The run-salt.sh script is a simple wrapper to run salt masterless.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.