forked from Mirror/pmbootstrap
pmbootstrap init: Show pkgdesc for each postmarketos-ui package (#763)
This way we could give the user a rough idea what will be installed, and also use this to display a short warning about long compile times (e.g. until the plasma mobile stuff is upstreamed).
This commit is contained in:
parent
34ac1c1538
commit
92e55ae1cd
6 changed files with 18 additions and 13 deletions
|
@ -1,7 +1,7 @@
|
||||||
pkgname=postmarketos-ui-hildon
|
pkgname=postmarketos-ui-hildon
|
||||||
pkgver=1
|
pkgver=1
|
||||||
pkgrel=1
|
pkgrel=2
|
||||||
pkgdesc="Lightweight desktop, optimized for single-touch touchscreen devices"
|
pkgdesc="(X11) Lightweight GTK+2 UI (optimized for single-touch touchscreens)"
|
||||||
url="https://github.com/postmarketOS"
|
url="https://github.com/postmarketOS"
|
||||||
arch="noarch"
|
arch="noarch"
|
||||||
license="GPL3+"
|
license="GPL3+"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
pkgname=postmarketos-ui-weston
|
pkgname=postmarketos-ui-weston
|
||||||
pkgver=3
|
pkgver=4
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Meta package for weston"
|
pkgdesc="(Wayland) Reference compositor (demo, not a phone interface)"
|
||||||
url="https://github.com/postmarketOS"
|
url="https://github.com/postmarketOS"
|
||||||
arch="noarch"
|
arch="noarch"
|
||||||
license="GPL3+"
|
license="GPL3+"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
pkgname=postmarketos-ui-xfce4
|
pkgname=postmarketos-ui-xfce4
|
||||||
pkgver=0.0
|
pkgver=0.0
|
||||||
pkgrel=2
|
pkgrel=3
|
||||||
pkgdesc="Meta package for xfce4"
|
pkgdesc="(X11) Lightweight GTK+3 desktop (stylus recommended)"
|
||||||
url="https://github.com/postmarketOS/xfce4-phone"
|
url="https://github.com/postmarketOS/xfce4-phone"
|
||||||
arch="noarch"
|
arch="noarch"
|
||||||
license="GPL3"
|
license="GPL3"
|
||||||
|
|
|
@ -172,6 +172,7 @@ apkbuild_attributes = {
|
||||||
"makedepends": {"array": True},
|
"makedepends": {"array": True},
|
||||||
"options": {"array": True},
|
"options": {"array": True},
|
||||||
"pkgname": {"array": False},
|
"pkgname": {"array": False},
|
||||||
|
"pkgdesc": {"array": False},
|
||||||
"pkgrel": {"array": False},
|
"pkgrel": {"array": False},
|
||||||
"pkgver": {"array": False},
|
"pkgver": {"array": False},
|
||||||
"subpackages": {"array": True},
|
"subpackages": {"array": True},
|
||||||
|
|
|
@ -60,7 +60,9 @@ def ask_for_work_path(args):
|
||||||
def ask_for_ui(args):
|
def ask_for_ui(args):
|
||||||
ui_list = pmb.helpers.ui.list(args)
|
ui_list = pmb.helpers.ui.list(args)
|
||||||
logging.info("Available user interfaces (" +
|
logging.info("Available user interfaces (" +
|
||||||
str(len(ui_list) - 1) + "): " + ", ".join(ui_list))
|
str(len(ui_list) - 1) + "): ")
|
||||||
|
for ui, description in ui_list.items():
|
||||||
|
logging.info("* " + ui + ": " + description)
|
||||||
while True:
|
while True:
|
||||||
ret = pmb.helpers.cli.ask(args, "User interface", None, args.ui, True)
|
ret = pmb.helpers.cli.ask(args, "User interface", None, args.ui, True)
|
||||||
if ret in ui_list:
|
if ret in ui_list:
|
||||||
|
|
|
@ -18,16 +18,18 @@ along with pmbootstrap. If not, see <http://www.gnu.org/licenses/>.
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
import glob
|
import glob
|
||||||
|
import pmb.parse
|
||||||
|
|
||||||
|
|
||||||
def list(args):
|
def list(args):
|
||||||
"""
|
"""
|
||||||
Get all UIs, for which aports are available
|
Get all UIs, for which aports are available with their description.
|
||||||
:returns: ["postmarketos-ui-one", "postmarketos-ui-two", ..., "none"]
|
|
||||||
|
:returns: {"none": "No graphical...", "weston": "Wayland reference..."}
|
||||||
"""
|
"""
|
||||||
ret = []
|
ret = {"none": "No graphical environment"}
|
||||||
for path in glob.glob(args.aports + "/main/postmarketos-ui-*"):
|
for path in sorted(glob.glob(args.aports + "/main/postmarketos-ui-*")):
|
||||||
|
apkbuild = pmb.parse.apkbuild(args, path + "/APKBUILD")
|
||||||
ui = os.path.basename(path).split("-", 2)[2]
|
ui = os.path.basename(path).split("-", 2)[2]
|
||||||
ret.append(ui)
|
ret[ui] = apkbuild["pkgdesc"]
|
||||||
ret.append('none')
|
|
||||||
return ret
|
return ret
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue