deb,build: export ddebs from binary builds
dh_strip registers debug-symbol packages in debian/files under their renamed .ddeb name; they are deliverables of the build just like the regular .debs. Both artifact-type filters, the one collecting the build's artifacts and the one feeding the .buildinfo/.changes checksum sections, accepted only deb and udeb, so every ddeb a build produced was silently discarded: nothing exported next to the .debs, nothing in the upload metadata. The filter is now a shared FilesEntry::is_binary_artifact() predicate (plus unit tests) used by both call sites, so the two cannot drift apart again. One dpkg distinction has to be copied rather than shared: dpkg-genchanges lists only deb/udeb packages in the changes' Binary: and Description (a ddeb travels in Files and the checksum sections but is not a listed binary of the upload), while dpkg-genbuildinfo lists every binary artifact's package, ddebs included. The package list is therefore accumulated twice, once per consumer. The binary-metadata differential fixture gains a Package-Type: ddeb package, so the native .changes/.buildinfo generation is compared against real dpkg with a ddeb present. Without the fix the comparison fails on the checksum sections (golden distributes the ddeb, ours dropped it); with it every field matches.
This commit is contained in:
+1
-1
@@ -939,7 +939,7 @@ fn collect_binary_artifacts(
|
||||
let upload_dir = Path::new(build_root);
|
||||
let mut artifacts = Vec::new();
|
||||
for entry in files_list.iter() {
|
||||
if matches!(entry.package_type.as_deref(), Some("deb") | Some("udeb")) {
|
||||
if entry.is_binary_artifact() {
|
||||
artifacts.push(upload_dir.join(&entry.filename));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user