Hi! On Fri, 2016-08-19 at 13:47:15 +0200, Philipp Hahn wrote: > I accidentally called "dpkg-name" on some *.udeb files and they got > renamed to .deb.
Yes, and the reasons are a bit ugly, so you might want to skip the following paragraph… This is the consequence of the half-assed integration of .udebs into the lower-level deb toolchain. I started merging support into dpkg years ago, but got into some technical disagreement with the debian-installer team at the time (#452273), and while the discussion got a bit heated, I think it had definitely not yet reached a point of no-return, it then was referred to the tech-ctte by an uninvolved party for no good reason (#575059), at which point I lost any kind of motivation and before they imposed any kind of decree on any of the "sides", I reverted the change and stopped any further work on integrating udebs natively in dpkg. So that's what you are seeing above. > Looking inside dpkg-name, it tries to evaluate "Package-Type" [1], but > that is not contained in the control file of the binary package, so > always evaluates to "deb": > > 123 my $type = $fields->{'Package-Type'} || 'deb'; Right, “deb” is the default type so normal .deb packages will not have that field, “udeb” is special cased in dpkg-genchanges to avoid including that “huge” field, but any other value would get the field in the binary package: ,--- dpkg-genchanges --- my $pkg_type = $pkg->{'Package-Type'} || $pkg->get_custom_field('Package-Type') || 'deb'; if ($pkg_type eq 'udeb') { delete $fields->{'Package-Type'}; delete $fields->{'Homepage'}; } else { for my $f (qw(Subarchitecture Kernel-Version Installer-Menu-Item)) { warning(g_('%s package with udeb specific field %s'), $pkg_type, $f) if defined($fields->{$f}); } } `--- I also thought I had added support for Package-Type to dpkg-deb but it seems not, I'll be doing so, but of course that will still not help with .udebs, as per above. > Is there some other (preferred) way to identify .udeb packages? > 1. "Section: debian-installer"? This is the current best "heuristic", but it still feels wrong, as the true marker for whether a package is a deb or something else is the Package-Type field. Thanks, Guillem