BACKPORT: FROMGIT: config: Sort USE_EXPAND variables

Without the sort, we end up extending the USE_EXPAND variables with
a non deterministic ordering. This makes binary package creation non
hermetic.

i.e.,
```
-declare -x PYTHON_TARGETS="python3_8 python3_7 python3_6 python3_10 python3_9"
+declare -x PYTHON_TARGETS="python3_8 python3_9 python3_10 python3_7 python3_6"
```

Assuming `PYTHON_TARGETS=python3_8` in make.conf, after this change we
get:
```
declare -x PYTHON_TARGETS="python3_8 python3_10 python3_6 python3_7 python3_9"
```

Ideally we would completely sort the USE_EXPAND variables, but the
LINGUAS variable appears to need a very specific ordering.

Bug: https://bugs.gentoo.org/914441
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Closes: https://github.com/gentoo/portage/pull/1098
Signed-off-by: Sam James <sam@gentoo.org>
(cherry picked from commit c16ff6913b3d0a4d4ea0f6ee811ece541865bd8f
 https://anongit.gentoo.org/git/proj/portage.git master)

Conflicts:
   lib/portage/package/ebuild/config.py

BUG=b:281732865
TEST=CQ

Change-Id: Ieaa1bec3b566733e95c4afacdeeb9ba6cfa586bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/portage_tool/+/5269404
Commit-Queue: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Raul Rangel <rrangel@chromium.org>
1 file changed