From: Zac Medico Date: Fri, 17 Aug 2007 18:17:50 +0000 (-0000) Subject: For bug #189219, use pkgcmp() to sort versions in selected/protected/omitted unmerge... X-Git-Tag: v2.1.3.9~40 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=257d2399cb937f1aa7a9cc853314c16522c82540;p=portage.git For bug #189219, use pkgcmp() to sort versions in selected/protected/omitted unmerge display. (trunk r7639) svn path=/main/branches/2.1.2/; revision=7640 --- diff --git a/bin/emerge b/bin/emerge index f9d381297..179899046 100755 --- a/bin/emerge +++ b/bin/emerge @@ -4191,12 +4191,14 @@ def unmerge(settings, myopts, vartree, unmerge_action, unmerge_files, if "--quiet" not in myopts: portage.writemsg_stdout((mytype + ": ").rjust(14), noiselevel=-1) if pkgmap[x][mytype]: - for mypkg in pkgmap[x][mytype]: - mysplit=portage.catpkgsplit(mypkg) - if mysplit[3]=="r0": - myversion=mysplit[2] + sorted_pkgs = [portage.catpkgsplit(mypkg)[1:] \ + for mypkg in pkgmap[x][mytype]] + sorted_pkgs.sort(portage.pkgcmp) + for pn, ver, rev in sorted_pkgs: + if rev == "r0": + myversion = ver else: - myversion=mysplit[2]+"-"+mysplit[3] + myversion = ver + "-" + rev if mytype=="selected": portage.writemsg_stdout( colorize("UNMERGE_WARN", myversion + " "), noiselevel=-1)