Skip to content

Using different source_format requires that resources are specified differently. #1309

Open

Description

@lboclboc

Describe the Bug

Depending of the source_format specified this module works differently. If using sources as source_format it warns about "location", "release", "repos" and "architectures" must be arrays.
If using a "list" format, the generated list-files does not work if using arrays as above.

Expected Behavior

I expected the resources to work with same data fields for both source_formats

Steps to Reproduce

Don't specify the fileds as arrays and use source_format = "sources", it will give the warning.

Environment

  • Version 11.4.0
  • Ubuntu 26.04

Additional Context

Activity

  1. jst-cyr commented on Oct 30, 2026

    @jst-cyr
    Member

    Hi @lboclboc , thanks for the report! From my understanding, the list and sources are intentionally different file formats (the classic single-line sources.list syntax vs. the newer multi-line DEB822 stanza format), and DEB822 fields like URIs/Suites/Components are supposed to have multiple values. From what I can tell from the history and existing README, that's why the module expects arrays there.

    That said, a couple of questions so we pin down what's actually going wrong versus expected:

    1. For the list format with arrays, did you pass array values for location/release/repos with source_format => 'list'? If so, could you share the way you are invoking this?
    2. For the sources (DEB822) side, the warnings you saw are the module auto-converting your scalar values and still applying them. Did that produce a broken/incorrect .sources file, or just a noisy warning with otherwise-working output?
    3. At the root, what is the use case of what you are trying to do? Are you reusing the same parameter set across hosts that end up on different source_format values?

    This will help us better understand what the root issue is.

  2. jst-cyr commented on Oct 30, 2026

    @jst-cyr
    Member

    Also, I just saw that there is #1305 that seems to be addressing some sources parameter issues. Would the fix there address your needs with this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions