SUSE-Cloud / automation

Automation scripts for development, testing, and CI
Apache License 2.0
68 stars 139 forks source link

Fix amphora image rpm selection process (SOC-11407) #3931

Closed rtamalin closed 3 years ago

rtamalin commented 3 years ago

The linux find command returns the list of files found in a directory in the order they are found in the directory listing which is usually some form of inode order, and not necessarily lexically sorted.

This patch fixes the issue by including a 'sort --version-sort' in the shell command pipeline before the 'tail -n1' so that the list of RPM packages is version sorted.