-
Notifications
You must be signed in to change notification settings - Fork 468
Description
Describe the Bug
Leaving out the repos
in an apt::source
definition results in a main
component being added implicitly. This however can result in an invalid apt-source when the release is /
:
When there is apt-source with the content like deb https://pkgs.k8s.io/core:/stable:/v1.28/deb / main
, this is invalid (absolute Suite Component).
When now working around this by defining
release => '/',
repos => '',
this however still results in an error like the following:
Error: Could not prefetch package provider 'apt': Execution of '/usr/bin/apt-mark showmanual' returned 100: E: Malformed entry 3 in list file /etc/apt/sources.list.d/kubernetes.list (absolute Suite Component)
E: The list of sources could not be read.
Error: Failed to apply catalog: Execution of '/usr/bin/apt-mark showmanual' returned 100: E: Malformed entry 3 in list file /etc/apt/sources.list.d/kubernetes.list (absolute Suite Component)
E: The list of sources could not be read.
So puppet was able to successfully add the main
component to the source but is unable to remove it again. One has to manually edit the corresponding source entry to something different before puppet will change it again.
Expected Behavior
Puppet is in all cases able to correct the error in an apt source definition.
Steps to Reproduce
Steps to reproduce the behavior:
- run
puppet agent -t
with anapt::source
, that does not specifyrepos
. // alternatively add it manually to the source - change the
apt::source
to arepos
''
. - try to rerun
puppet agent -t
Environment
- Version 9.0.2
- Platform: tested on Ubuntu 20.04 (should be the same on all other version of Ubuntu and Debian)
Additional Context
This makes it impossible to workaround the issue, that Puppet enforces to specify a repos
(components), even though they are optional in an apt source. see #1132