Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-10543

apt : sources.list should be removed instead of emptied

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: apt
    • Labels:
    • Environment:

      puppet 5, debian buster

    • Template:
      MODULES Bug Template
    • Acceptance Criteria:
      Hide

      /etc/apt/sources.list should be removable at the very least.

      attached patch just removes the file if it's purged.

      Show
      /etc/apt/sources.list should be removable at the very least. attached patch just removes the file if it's purged.
    • Method Found:
      Manual Test
    • Zendesk Ticket IDs:
      40813
    • Zendesk Ticket Count:
      1
    • QA Risk Assessment:
      Needs Assessment

      Description

      Basic Info
      Module Version:7.2.0
      Puppet Version: 5.5.10
      OS Name/Version: debian 10 buster

      When the "purge" mode is set on the `preferences` file, that file is removed. But oddly, when the same is done on the `sources.list` file, the file is created with a comment (instead of being left empty).

      Here we like to have the `sources.list` completely absent: it makes commandline completion easier to drop us in `sources.list.d`, for example. It's also consistent with the way the `preferences` file work.

      This is the hiera.yaml snippet I used:

      apt::purge:
       sources.list: true
       preferences: true
      

      And I simply did an `include apt`.

      Desired Behavior:

      `/etc/apt/sources.list` should be removed when "purge" is set.

      Actual Behavior:

      The file is created with the content `# Repos managed by puppet.` instead

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            anarcat Antoine
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support