#1111789 apt,dpkg: two different meanings for the jargon term "component"

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
Simon McVittie
Date:
2025-08-21 22:07:03 UTC
Severity:
normal
#1111789#5
Date:
2025-02-05 15:49:03 UTC
From:
To:
Prompted by recent discussion on #debian-devel:

We have two different jargon meanings for "component" in the dpkg/apt
packaging ecosystem, which seems like a source of confusion.

In dpkg-source format 3.0 (quilt) with a multiple-upstream-tarball
package, a component is the identifier for a secondary .orig tarball,
and equivalently, the subdirectory of the source tree into which it
unpacks. For example in `apt source yquake2`, which combines several
closely-related upstream projects:

yquake2_8.41+dfsg.orig.tar.gz
yquake2_8.41+dfsg.orig-ctf.tar.gz
yquake2_8.41+dfsg.orig-rogue.tar.gz
yquake2_8.41+dfsg.orig-xatrix.tar.gz
yquake2_8.41+dfsg-1.debian.tar.xz
yquake2_8.41+dfsg-1.dsc

the components are ctf, rogue and xatrix. I don't think this term
is necessarily load-bearing API in dpkg itself, but it's part of the
configuration file syntax in at least git-buildpackage and uscan. I'm
not aware of any other jargon terms being used this particular concept.

Meanwhile, in /etc/apt/sources.list.d/*.sources and in apt archive
maintenance software like dak and reprepro, a component is something like
main, contrib or universe, referred to in Policy as an "archive area"
and in the Debian Social Contract as an "area". To add to the confusion,
dpkg's deb-src-control(5) uses part of the Section field to store the
archive area, and apt's apt-ftparchive(1) uses Sections to configure
the list of archive areas (but a section is something different, like
libdevel or x11).

This can result in true statements that don't appear to make sense, like
the fact that changing a package's component requires ftp team approval,
but changing a packages's components does not :-)

Would it be possible for one project or the other to introduce a new name
for what it now calls components, and eventually deprecate the old name?

For example apt could introduce "Archive-Areas: main contrib", turn
Components into an alias for that, and eventually deprecate Components.
(I'm not suggesting that it should ever actually be removed entirely:
there is probably too much inertia for that.)

Or, dpkg could start referring to the parts of a multiple-upstream-tarball
as something else (subdirectories? subprojects? extra upstreams?), and
encourage projects like git-buildpackage and uscan to prefer that name
and deprecate calling it a component.

Obviously there would be significant backwards compatibility considerations
to take into account, either way, so this is not a trivial change.

    smcv

#1111789#10
Date:
2025-02-05 17:29:48 UTC
From:
To:
I don't think there's a meaningful overlap in practice where the use of the
term is ambiguous.

The name was picked over 20 years ago, and changing it now would
generate more friction than the overlap with dpkg's term currently
has. We want stuff to be easy to use, and having two ways to do it
generally isn't.

I think the colloquial verbiage is "additional orig tarball", because
frankly nobody cares about remembering the name for it, that's also
significantly reducing the impact of it.

#1111789#15
Date:
2025-08-21 22:05:07 UTC
From:
To:
Hi!

In the dpkg-source documentation I see it more as a "variable name" to
refer to the text to replace with, than a defining term. But it seems
I was also unhappy with the naming in the code, and in dpkg commit
52230e6fe98fdd1b2de2651e95d4f7afb74c7fed I renamed the variables from
origtar to addonfile, I guess to make room for the subsequent addonsign
variable and "addon orig.tar" references in error messages in dpkg
commit c5aa5d8e00d076a4ca4b35ab8f2a3eb082bb6cd5.

And I think I like «addon» better than «component» for the documentation
as well, so I've changed that locally (see the attached patch), and
I'm planning on including that in my next push. Let me know if that
improves or makes things worse. :) I'm also going to change references
in the wiki, at least at <https://wiki.debian.org/Projects/DebSrc3.0>.

But…

… I agree these names are used in different contexts, so of course one
can construct possibly ambiguous phrasings, but you can also give
enough context to make these clear. :)

I think it might still make sense for both to rename things to make
terminology more clear, so that's why I've cloned the report to apt,
but they might decide it's not worth it on their side.

If it's something that apt parses, then I think it should be fine to
transition to something better or more clear (I've also found those terms
confusing), if it's something apt emits, then that's going to be a pain
and probably not worth it (unless there's a CLI version bump or similar),
as the amount of local consumers is going to be hard to measure.

I think the other common usage is “multi upstream tarball” (aka “MUT”),
but I think any of:

  * addon orig.tar
  * addon orig tarball
  * additional orig.tar
  * additional orig tarball
  * multi upstream tarball (aka “MUT” in some contexts)

might be clear enough, depending on the usage or what it refers to.

Thanks,
Guillem