Package: apt
Version: 3.2.0
X-Debbugs-CC: [email protected]

Greetings APT developers,

Whilst maintaining oma (https://github.com/AOSC-Dev/oma), a package management frontend based on libapt-pkg, we ran into multiple user reports that oma is unable to handled comma-separated items in the "Architectures:" entry.

Take for example this .sources file from Cursor:

  ### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
  Types: deb
  URIs: https://downloads.cursor.com/aptrepo
  Suites: stable
  Components: main
  Architectures: amd64,arm64
  Signed-By: /usr/share/keyrings/anysphere.gpg

We see that the two architectures are listed in a comma-separated fashion. However, sources.list(5) specifies that:

  Note especially that multiple values are separated  by  whitespaces
  (like spaces, tabs and newlines), not by commas as in the one-line
  format.

Meaning that the example above should be invalid and rejected by APT, but it was in fact allowed. Following this specification, oma was implemented in a way which it returns a warning and does not treat commas as separators:

WARNING Mirror https://downloads.cursor.com/aptrepo does not contain architectures enabled in local configuration ('amd64' 'i386' enabled, 'amd64,arm64' available from the mirror)

Whereas APT accepts this source configuration just fine...

APT maintainers, would you please clarify on the usage of commas in DEB822 sources? It would be very helpful as we are currently not sure as to whether we should heed to the manpages or the de facto implementation currently found in APT.

Best Regards,
Mingcong Bai

Reply via email to