archlinux-downgrade / downgrade

Downgrade packages in Arch Linux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Display additional information on package origins and remove architecture from downgrade menu display

atreyasha opened this issue · comments

Currently, the downgrade package display lists packages under two categories, namely local and remote. This issue proposes the additon of more information into these categories, such as listing the package databases (eg. core, community and aur). For simplicity, we also assume that all foreign packages will be listed as aur packages.

An example of the modification could be from this list style:

Available packages:

-   1)  terraform    0.11.11  2  x86_64  (remote)
-   2)  terraform    0.11.12  1  x86_64  (local)
+   3)  terraform    0.11.13  1  x86_64  (remote)
+   4)  terraform    0.11.13  1  x86_64  (local)
-   5)  terraform    0.12.0   1  x86_64  (remote)
-   6)  terraform    0.12.0   1  x86_64  (local)
    7)  terraform    0.12.1   1  x86_64  (remote)

select a package by number:

To the following list style:

Available packages:

-   1)  terraform    0.11.11  2  x86_64  (remote) (community)
-   2)  terraform    0.11.12  1  x86_64  (local)  (community)
+   3)  terraform    0.11.13  1  x86_64  (remote) (community)
+   4)  terraform    0.11.13  1  x86_64  (local)  (community)
-   5)  terraform    0.12.0   1  x86_64  (remote) (community)
-   6)  terraform    0.12.0   1  x86_64  (local)  (community)
    7)  terraform    0.12.1   1  x86_64  (remote) (community)

select a package by number:

WDYT of this format?

Available packages:

-   1)  community/terraform    0.11.11  2  x86_64  (remote)
-   2)  community/terraform    0.11.12  1  x86_64  (local)
+   3)  community/terraform    0.11.13  1  x86_64  (remote)
+   4)  community/terraform    0.11.13  1  x86_64  (local)
-   5)  community/terraform    0.12.0   1  x86_64  (remote)
-   6)  community/terraform    0.12.0   1  x86_64  (local)
    7)  community/terraform    0.12.1   1  x86_64  (remote)

select a package by number:

Also, unrelated, but we could probably remove the architecture from the output now.

👍 for architecture removal.

If we go with printing the package DB on every entry, I like your suggestion better.

However looking at both of our suggestions, something struck me. For every package's downgrade menu display, there would only be one package DB. It might be redundant to print the package DB on every entry.

How about something simpler and less texty like this? (with architecture for now)

Available packages (community):

-   1)  terraform    0.11.11  2  x86_64  (remote)
-   2)  terraform    0.11.12  1  x86_64  (local)
+   3)  terraform    0.11.13  1  x86_64  (remote)
+   4)  terraform    0.11.13  1  x86_64  (local)
-   5)  terraform    0.12.0   1  x86_64  (remote)
-   6)  terraform    0.12.0   1  x86_64  (local)
    7)  terraform    0.12.1   1  x86_64  (remote)

select a package by number:

How about...

Love it.

I think there's an edge-case where a package has moved repositories during its lifetime, and old versions may be in one place and new versions in another. I don't really care about this case, and I'm not even sure how downgrade's actual functionality reacts to it today.

I think there's an edge-case where a package has moved repositories during its lifetime, and old versions may be in one place and new versions in another. I don't really care about this case, and I'm not even sure how downgrade's actual functionality reacts to it today.

Ah yes. I would agree in not caring too much about this for now and would rather just grab the latest package DB to display in the menu.