Package: debconf-utils
Version: 1.5.74
Severity: wishlist
Tags: patch
X-Debbugs-Cc: jw...@debian.org

Hi! While working with debconf-get-selections I've found the need to sort the
output to make it easier to diff it against other configurations.

Jakub Wilk (CCed) was kind enough to provide a patch which I'm attaching,
and he agreed to me forwarding it here.

Please consider applying it.

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'unstable-debug'), (500, 
'testing-debug'), (500, 'buildd-unstable'), (500, 'testing'), (1, 
'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, arm64, armhf

Kernel: Linux 5.7.0-2-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=es_AR.UTF-8, LC_CTYPE=es_AR.UTF-8 (charmap=UTF-8), 
LANGUAGE=es_AR:es
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages debconf-utils depends on:
ii  debconf  1.5.74

debconf-utils recommends no packages.

debconf-utils suggests no packages.

-- no debconf information
--- unpacked/usr/bin/debconf-get-selections     2020-04-18 13:10:08.000000000 
+0200
+++ /usr/bin/debconf-get-selections     2020-08-21 15:18:42.663503841 +0200
@@ -53,8 +53,11 @@
 }
 
 my $qi = Debconf::Question->iterator;
-
+my @qs;
 while (my $q = $qi->iterate) {
+       push @qs, $q;
+}
+for my $q (sort { $a->name cmp $b->name } @qs) {
        my ($name, $type, $value) = ($q->name, $q->type, $q->value);
        next if (! length $type || $type eq 'text' || $type eq 'title');
        print "# ".$q->description."\n";

Reply via email to