Commit 95a01b4
committed
desktops: detect installed DE via marker file, add Bianbu menu entries
`module_desktops status de=<X>` is the gate every Desktops submenu
entry runs to decide whether to show its "Uninstall / Disable login /
Change tier" actions. The check was a plain
`dpkg -l "$DESKTOP_PRIMARY_PKG" | grep ^ii`, which misfires whenever
two desktops share a primary-tier package — most notably on a Bianbu
install, where bianbu-desktop-minimal-en pulls gnome-session as a
dependency. The Desktops menu would then offer "Uninstall GNOME" and
"Change GNOME to full" while the actual installed DE is Bianbu, and
clicking them would tear down packages Bianbu owns.
Three coupled changes, since fixing detection without also rounding
out the Bianbu menu would leave a Bianbu user with an empty submenu
and only a single mid-tier install entry where every other DE
exposes minimal/mid/full:
1. Introduce _module_desktops_is_installed and route the three
status callers (status, tier, at-tier) through it. Three layers,
falling through in order:
a. /etc/armbian/desktop/<de>.tier exists → installed.
Authoritative because install/remove maintain the marker.
b. A different DE has its marker present → not installed. The
other DE's marker is the tiebreaker against the dpkg
fallback when desktops share packages.
c. No markers anywhere AND DESKTOP_PRIMARY_PKG is dpkg-installed
→ legacy installs that pre-date the marker convention or
were done with apt directly.
2. Add the standard six management entries for Bianbu in
config.system.json (Uninstall, autologin on/off, tier
minimal/mid/full), gated on `module_desktops status de=bianbu`,
so the submenu has actual options once the GNOME entries
correctly hide. IDs allocated as BIAN02/03/04/07/08/09 to match
the slot numbers used by the other DEs.
3. Bring Bianbu's install entries in line with the rest of the menu:
BIAN01 was the only Bianbu install slot and was misnamed —
labelled "Install Bianbu" with tier=mid, where every other DE's
slot 01 is minimal. Repoint BIAN01 to tier=minimal and add BIAN05
(mid) and BIAN06 (full) so the user sees the full minimal/mid/full
choice on a clean install instead of just one entry.1 parent 645a8a0 commit 95a01b4
2 files changed
Lines changed: 133 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
| 343 | + | |
344 | 344 | | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
345 | 357 | | |
346 | 358 | | |
347 | 359 | | |
348 | 360 | | |
349 | 361 | | |
350 | 362 | | |
351 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
352 | 376 | | |
353 | 377 | | |
354 | 378 | | |
| |||
408 | 432 | | |
409 | 433 | | |
410 | 434 | | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
411 | 446 | | |
412 | 447 | | |
413 | 448 | | |
| |||
518 | 553 | | |
519 | 554 | | |
520 | 555 | | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
521 | 567 | | |
522 | 568 | | |
523 | 569 | | |
| |||
628 | 674 | | |
629 | 675 | | |
630 | 676 | | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
631 | 688 | | |
632 | 689 | | |
633 | 690 | | |
| |||
760 | 817 | | |
761 | 818 | | |
762 | 819 | | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
763 | 831 | | |
764 | 832 | | |
765 | 833 | | |
| |||
771 | 839 | | |
772 | 840 | | |
773 | 841 | | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
774 | 853 | | |
775 | 854 | | |
776 | 855 | | |
| |||
782 | 861 | | |
783 | 862 | | |
784 | 863 | | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
785 | 875 | | |
786 | 876 | | |
787 | 877 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
427 | 465 | | |
428 | 466 | | |
429 | 467 | | |
| |||
875 | 913 | | |
876 | 914 | | |
877 | 915 | | |
878 | | - | |
879 | | - | |
880 | | - | |
881 | | - | |
| 916 | + | |
882 | 917 | | |
883 | 918 | | |
884 | 919 | | |
| |||
1107 | 1142 | | |
1108 | 1143 | | |
1109 | 1144 | | |
1110 | | - | |
| 1145 | + | |
1111 | 1146 | | |
1112 | 1147 | | |
1113 | 1148 | | |
| |||
1131 | 1166 | | |
1132 | 1167 | | |
1133 | 1168 | | |
1134 | | - | |
1135 | | - | |
| 1169 | + | |
1136 | 1170 | | |
1137 | 1171 | | |
1138 | 1172 | | |
| |||
0 commit comments