Bug ID 917403
Summary zypper lr sort by field != 'alias' is non-functional
Classification openSUSE
Product openSUSE Distribution
Version 13.2
Hardware All
OS openSUSE 13.2
Status NEW
Severity Normal
Priority P5 - None
Component libzypp
Assignee zypp-maintainers@forge.provo.novell.com
Reporter grantksupport@operamail.com
QA Contact qa-bugs@suse.de
Found By ---
Blocker ---

zypper's "lr" provides sorting by field

    rpm -qa | grep -i zypp | sort
        libzypp-14.32.0-9.1.x86_64
        libzypp-devel-14.32.0-9.1.x86_64
        perl-zypp-0.6.4-12.1.x86_64
        python-zypp-0.6.4-12.1.x86_64
        zypper-1.11.17-9.1.x86_64
        zypper-log-1.11.17-9.1.noarch
        zypp-plugin-python-0.4-2.1.3.x86_64

    zypper lr --help
        repos (lr) [options] [repo] ...

        List all defined repositories.

          Command options:
        -e, --export <FILE.repo>  Export all defined repositories as a single
local .repo file.
        -a, --alias               Show also repository alias.
        -n, --name                Show also repository name.
        -u, --uri                 Show also base URI of repositories.
        -p, --priority            Show also repository priority.
        -r, --refresh             Show also the autorefresh flag.
        -d, --details             Show more information like URI, priority,
type.
        -s, --service             Show also alias of parent service.
        -E, --show-enabled-only   Show enabled repos only.
        -U, --sort-by-uri         Sort the list by URI.
        -P, --sort-by-priority    Sort the list by repository priority.
        -A, --sort-by-alias       Sort the list by alias.
        -N, --sort-by-name        Sort the list by name.

sort by 'alias' appears to work

    zypper lr -A
        #   | Alias        | Name           | Enabled | Refresh
        ----+--------------+----------------+---------+--------
          1 | Apache       | Apache         | Yes     | Yes    
          2 | ApacheMod    | ApacheMod      | Yes     | Yes    
          3 | Archiving    | Archiving      | Yes     | Yes    
          4 | Backup       | Backup         | Yes     | Yes    
          5 | BaseSystem   | BaseSystem     | No      | Yes    
          6 | C_C++        | C_C++          | No      | Yes    
          7 | Chromium     | Chromium       | Yes     | Yes    
        ...

but sort by other field, e.g. 'priority', doesn't

    zypper lr -P
        #   | Alias        | Name           | Enabled | Refresh | Priority
        ----+--------------+----------------+---------+---------+---------
          1 | Apache       | Apache         | Yes     | Yes     |   60    
          2 | ApacheMod    | ApacheMod      | Yes     | Yes     |   60    
          3 | Archiving    | Archiving      | Yes     | Yes     |   99    
          4 | Backup       | Backup         | Yes     | Yes     |   69    
          5 | BaseSystem   | BaseSystem     | No      | Yes     |   35    
          6 | C_C++        | C_C++          | No      | Yes     |   40    
          7 | Chromium     | Chromium       | Yes     | Yes     |   45    
        ...


You are receiving this mail because: