-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[BUG] pkgrepo.managed fails with "'SourceEntry' object has no attribute 'repo_line'" #62546
Comments
So, the behavior is a little more nuanced than my initial report suggests. When I try to apply this state on a pristine, untouched Debian installation, it succeeds in creating the apt repo and this error does not occur. I investigated the two environments to try to determine what is different between them. Contents of /etc/apt/sources.list.d/linode-longview.list on WORKING host:
Contents of /etc/apt/sources.list.d/linode-longview.list on BROKEN host:
It looks as though the omission of that trailing slash is the cause of this failure. I manually edited linode-longview.list on the broken host to add a This might actually be a bug in the previous version of Salt that originally created this file, as my state's |
Interestingly, I see a different error for
|
This one is related to this issue #62474, Removing |
Can you test this fix #62555 |
Description
After upgrading to Salt 3005, a previously working
pkgrepo.managed
state now fails with the error "'SourceEntry' object has no attribute 'repo_line'."The apparent cause is in salt/modules/aptpkg.py, either in
mod_repo()
orexpand_repo_def()
. Each of these lines assumes the locally-definedSourceEntry
class is used, which defines arepo_line()
method. However on my system, apparently,HAS_APT
is True and a vendor-provided implementation of theSourceEntry
class withoutrepo_line()
is being used. (I can dig more into that later if desired.)Setup
Example state:
Running on an up-to-date Debian 11 machine on Linode. Reproducible in a local VirtualBox VM.
Steps to Reproduce the behavior
Expected behavior
In my specific case, this state should succeed with no changes since the Apt repo already exists. In other situations, I would expect it to create/update the repo as warranted.
Versions Report
The text was updated successfully, but these errors were encountered: