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

The humanname is ignored in pkgrepo.managed on openSUSE Leap (zypper repo) #62053

Closed
515k4 opened this issue May 11, 2022 · 1 comment · Fixed by #62086
Closed

The humanname is ignored in pkgrepo.managed on openSUSE Leap (zypper repo) #62053

515k4 opened this issue May 11, 2022 · 1 comment · Fixed by #62086
Labels
Bug broken, incorrect, or confusing behavior needs-triage openSUSE

Comments

@515k4
Copy link
Contributor

515k4 commented May 11, 2022

Description of Issue

I am setting up zypper repository on openSUSE Leap 15.3 using pkgrepo.managed. The repository is created but humanname is ignored, i.e. the name= in repo file is missing. If I run state.test later it print the name is missing and is going to change but nothing happend when I apply the state again.

Setup

$ cat salt/repo.sls 
set_python_repo:
  pkgrepo.managed:
    - name: python
    - humanname: "Thirdparty python repo"
    - baseurl: "https://download.opensuse.org/repositories/devel:/languages:/python/$releasever/"
    - enabled: False

Steps to Reproduce Issue

$ sudo salt-call --local --file-root=salt state.apply repo
local:
----------
          ID: set_python_repo
    Function: pkgrepo.managed
        Name: python
      Result: True
     Comment: Configured package repo 'python'
     Started: 19:47:20.583080
    Duration: 1517.897 ms
     Changes:   
              ----------
              repo:
                  python

Summary for local
------------
Succeeded: 1 (changed=1)
Failed:    0
------------
Total states run:     1
Total run time:   1.518 s

$ sudo salt-call --local --file-root=salt state.test repo
local:
----------
          ID: set_python_repo
    Function: pkgrepo.managed
        Name: python
      Result: None
     Comment: Package repo 'python' would be configured. This may cause pkg states to behave differently than stated if this action is repeated without test=True, due to the differences in the configured repositories.
     Started: 19:50:26.721913
    Duration: 1430.329 ms
     Changes:   
              ----------
              name:
                  ----------
                  new:
                      Thirdparty python repo
                  old:
                      None

Summary for local
------------
Succeeded: 1 (unchanged=1, changed=1)
Failed:    0
------------
Total states run:     1
Total run time:   1.430 s

$ sudo salt-call --local --file-root=salt state.apply repo
local:
----------
          ID: set_python_repo
    Function: pkgrepo.managed
        Name: python
      Result: True
     Comment: Configured package repo 'python'
     Started: 19:51:21.493703
    Duration: 1414.8 ms
     Changes:   

Summary for local
------------
Succeeded: 1
Failed:    0
------------
Total states run:     1
Total run time:   1.415 s

$ cat /etc/zypp/repos.d/python.repo 
[python]
enabled=0
autorefresh=0
baseurl=https://download.opensuse.org/repositories/devel:/languages:/python/$releasever/

If I manually add the name, it will work as expected:

$ cat /etc/zypp/repos.d/python.repo
[python]
name=Thirdparty python repo
enabled=0
autorefresh=0
baseurl=https://download.opensuse.org/repositories/devel:/languages:/python/$releasever/

$ sudo salt-call --local --file-root=salt state.test repo
local:
----------
          ID: set_python_repo
    Function: pkgrepo.managed
        Name: python
      Result: True
     Comment: Package repo 'python' already configured
     Started: 19:56:35.176087
    Duration: 1422.705 ms
     Changes:   

Summary for local
------------
Succeeded: 1
Failed:    0
------------
Total states run:     1
Total run time:   1.423 s

Versions Report

$ sudo salt-call --versions-report
Salt Version:
          Salt: 3002.2
 
Dependency Versions:
          cffi: 1.13.2
      cherrypy: Not Installed
      dateutil: 2.8.1
     docker-py: 4.2.0
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 2.10.1
       libgit2: Not Installed
      M2Crypto: 0.35.2
          Mako: 1.0.7
       msgpack: 0.5.6
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: 2.17
      pycrypto: 3.9.0
  pycryptodome: Not Installed
        pygit2: Not Installed
        Python: 3.6.15 (default, Sep 23 2021, 15:41:43) [GCC]
  python-gnupg: Not Installed
        PyYAML: 5.4.1
         PyZMQ: 17.1.2
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.2.3
 
System Versions:
          dist: opensuse-leap 15.3 n/a
        locale: UTF-8
       machine: x86_64
       release: 5.3.18-150300.59.63-default
        system: Linux
       version: openSUSE Leap 15.3 n/a
@welcome
Copy link

welcome bot commented May 11, 2022

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
If you have additional questions, email us at [email protected]. We’re glad you’ve joined our community and look forward to doing awesome things with you!

@OrangeDog OrangeDog added Bug broken, incorrect, or confusing behavior needs-triage openSUSE labels May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior needs-triage openSUSE
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants