summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2019-03-15 14:42:03 +0000
committerSimon McVittie <smcv@debian.org>2019-03-15 15:25:35 +0000
commite6633f03b2537e10956b38e9b2d5f2ec6809bb7b (patch)
treee60a3969b8c61788ec5f953516344d6a1a65a6a7
parent01b936bea24cee3afd08c6d345ca17d962b3352b (diff)
vendor/getinfo: Iterate through vendors in lexicographic order
find(1) works in readdir() order, which isn't guaranteed to be sorted. If the current vendor is not an exact match for any subdirectory in vendor/, and is somehow a derivative of more than one of them, we should at least produce a deterministic answer. Closes: #924662 Signed-off-by: Simon McVittie <smcv@collabora.com>
-rwxr-xr-xvendor/getinfo2
1 files changed, 1 insertions, 1 deletions
diff --git a/vendor/getinfo b/vendor/getinfo
index 37eb74cef..8830c238f 100755
--- a/vendor/getinfo
+++ b/vendor/getinfo
@@ -6,7 +6,7 @@ BASEDIR="$(readlink -f "$(dirname $0)")"
getcurrent() {
# search for an exact match to use the correct sources.list example
cd $BASEDIR
- DISTROS="$(find . -mindepth 1 -maxdepth 1 -type d | cut -d'/' -f 2)"
+ DISTROS="$(find . -mindepth 1 -maxdepth 1 -type d | cut -d'/' -f 2 | LC_ALL=C sort)"
for DISTRO in $DISTROS; do
if dpkg-vendor --is $DISTRO; then
echo $DISTRO