forked from Mirror/pmbootstrap
deviceinfo: remove external_disk_install and external_disk, use external_storage instead (#1301)
* deviceinfo: remove external_disk_install and external_disk, use external_storage instead * Complain when external_disk* is used
This commit is contained in:
parent
915dc8a049
commit
94306b51ee
136 changed files with 207 additions and 269 deletions
|
@ -132,12 +132,11 @@ def generate_deviceinfo(args, pkgname, name, manufacturer, arch, has_keyboard,
|
|||
deviceinfo_date=""
|
||||
deviceinfo_dtb=""
|
||||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_external_disk_install="false"
|
||||
deviceinfo_arch=\"""" + arch + """\"
|
||||
|
||||
# Device related
|
||||
deviceinfo_keyboard=\"""" + ("true" if has_keyboard else "false") + """\"
|
||||
deviceinfo_external_disk=\"""" + ("true" if has_external_storage else "false") + """\"
|
||||
deviceinfo_external_storage=\"""" + ("true" if has_external_storage else "false") + """\"
|
||||
deviceinfo_screen_width="800"
|
||||
deviceinfo_screen_height="600"
|
||||
deviceinfo_dev_touchscreen=""
|
||||
|
|
|
@ -218,13 +218,12 @@ deviceinfo_attributes = [
|
|||
"date",
|
||||
"dtb",
|
||||
"modules_initfs",
|
||||
"external_disk_install",
|
||||
"arch",
|
||||
"nonfree",
|
||||
|
||||
# device
|
||||
"keyboard",
|
||||
"external_disk",
|
||||
"external_storage",
|
||||
"screen_width",
|
||||
"screen_height",
|
||||
"dev_touchscreen",
|
||||
|
|
|
@ -46,7 +46,7 @@ def previous_install(args):
|
|||
|
||||
def mount_sdcard(args):
|
||||
# Sanity checks
|
||||
if args.deviceinfo["external_disk_install"] != "true":
|
||||
if args.deviceinfo["external_storage"] != "true":
|
||||
raise RuntimeError("According to the deviceinfo, this device does"
|
||||
" not support a sdcard installation.")
|
||||
if not os.path.exists(args.sdcard):
|
||||
|
|
|
@ -66,4 +66,11 @@ def deviceinfo(args, device=None):
|
|||
" deviceinfo_flash_method. Please adjust your"
|
||||
" deviceinfo file: " + path)
|
||||
|
||||
# Sanity check: "external_disk*" is legacy
|
||||
if "external_disk" in ret or "external_disk_install" in ret:
|
||||
raise RuntimeError("Instead of deviceinfo_external_disk and"
|
||||
" deviceinfo_external_disk_install, please use the"
|
||||
" new variable deviceinfo_external_storage in your"
|
||||
" deviceinfo file: " + path)
|
||||
|
||||
return ret
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue