Hello community, here is the log from the commit of package linuxrc for openSUSE:Factory checked in at 2019-06-12 13:04:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/linuxrc (Old) and /work/SRC/openSUSE:Factory/.linuxrc.new.4811 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "linuxrc" Wed Jun 12 13:04:39 2019 rev:270 rq:706341 version:6.0.11 Changes: -------- --- /work/SRC/openSUSE:Factory/linuxrc/linuxrc.changes 2019-05-03 22:27:25.688337709 +0200 +++ /work/SRC/openSUSE:Factory/.linuxrc.new.4811/linuxrc.changes 2019-06-12 13:04:41.685224031 +0200 @@ -1,0 +2,7 @@ +Wed May 29 14:10:51 UTC 2019 - [email protected] + +- merge gh#openSUSE/linuxrc#189 +- iterate through device list in sorted order (bsc#1058039) +- 6.0.11 + +-------------------------------------------------------------------- Old: ---- linuxrc-6.0.10.tar.xz New: ---- linuxrc-6.0.11.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ linuxrc.spec ++++++ --- /var/tmp/diff_new_pack.4F2eLX/_old 2019-06-12 13:04:42.201223814 +0200 +++ /var/tmp/diff_new_pack.4F2eLX/_new 2019-06-12 13:04:42.205223812 +0200 @@ -17,7 +17,7 @@ Name: linuxrc -Version: 6.0.10 +Version: 6.0.11 Release: 0 Summary: SUSE Installation Program License: GPL-3.0+ ++++++ linuxrc-6.0.10.tar.xz -> linuxrc-6.0.11.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-6.0.10/VERSION new/linuxrc-6.0.11/VERSION --- old/linuxrc-6.0.10/VERSION 2019-05-02 14:00:28.000000000 +0200 +++ new/linuxrc-6.0.11/VERSION 2019-05-29 16:10:51.000000000 +0200 @@ -1 +1 @@ -6.0.10 +6.0.11 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-6.0.10/changelog new/linuxrc-6.0.11/changelog --- old/linuxrc-6.0.10/changelog 2019-05-02 14:00:28.000000000 +0200 +++ new/linuxrc-6.0.11/changelog 2019-05-29 16:10:51.000000000 +0200 @@ -1,3 +1,7 @@ +2019-05-29: 6.0.11 + - merge gh#openSUSE/linuxrc#189 + - iterate through device list in sorted order (bsc#1058039) + 2019-05-02: 6.0.10 - merge gh#openSUSE/linuxrc#188 - add 'autoassembly' boot option to prevent MD/RAID autoassembly diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-6.0.10/url.c new/linuxrc-6.0.11/url.c --- old/linuxrc-6.0.10/url.c 2019-05-02 14:00:28.000000000 +0200 +++ new/linuxrc-6.0.11/url.c 2019-05-29 16:10:51.000000000 +0200 @@ -1,4 +1,4 @@ -#define _GNU_SOURCE /* strnlen, getline, strcasestr */ +#define _GNU_SOURCE /* strnlen, getline, strcasestr, strverscmp */ /* @@ -69,6 +69,7 @@ static int same_device_name(hd_t *hd1, hd_t *hd2); static hd_t *relink_array(hd_t *hd_array[]); static void log_hd_list(char *label, hd_t *hd); +static int cmp_hd_entries_by_name(const void *p0, const void *p1); static hd_t *sort_a_bit(hd_t *hd_list); static int link_detected(hd_t *hd); static char *url_print_zypp(url_t *url); @@ -3021,6 +3022,25 @@ /* + * Compare two hardware items by name using strverscmp(). + */ +int cmp_hd_entries_by_name(const void *p0, const void *p1) +{ + hd_t **hd0, **hd1; + char *name0, *name1; + + hd0 = (hd_t **) p0; + hd1 = (hd_t **) p1; + + name0 = (*hd0)->unix_dev_name; + name1 = (*hd1)->unix_dev_name; + + // either string might be NULL + return strverscmp(name0 ?: "", name1 ?: ""); +} + + +/* * Re-sort hardware list to make some people happy. */ hd_t *sort_a_bit(hd_t *hd_list) @@ -3047,11 +3067,20 @@ hd_array[u++] = hd; } } - hd_array[u] = NULL; + + // remember correct item count + hds = u; + hd_array[hds] = NULL; + + hd_list = relink_array(hd_array); + + /* 2. sort list by name */ + + qsort(hd_array, hds, sizeof *hd_array, cmp_hd_entries_by_name); hd_list = relink_array(hd_array); - /* 2. cards with link first */ + /* 3. cards with link first */ for(u = 0, hd = hd_list; hd; hd = hd->next) { if(link_detected(hd)) hd_array[u++] = hd; @@ -3063,7 +3092,7 @@ hd_list = relink_array(hd_array); - /* 3. wlan cards last */ + /* 4. wlan cards last */ for(u = 0, hd = hd_list; hd; hd = hd->next) { if(!hd->is.wlan) hd_array[u++] = hd; @@ -3075,7 +3104,7 @@ hd_list = relink_array(hd_array); - /* 4. network interfaces last */ + /* 5. network interfaces last */ for(u = 0, hd = hd_list; hd; hd = hd->next) { if(hd->hw_class != hw_network) hd_array[u++] = hd;
