Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pmbootstrap
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
postmarketOS
pmbootstrap
Commits
8c9c0ce9
Commit
8c9c0ce9
authored
6 years ago
by
Grant Miller
Committed by
Oliver Smith
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Check if device was renamed
parent
d3780364
No related branches found
No related tags found
No related merge requests found
Pipeline
#188598
failed
6 years ago
Stage: checks
Stage: tests
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pmb/config/init.py
+5
-0
5 additions, 0 deletions
pmb/config/init.py
pmb/parse/deviceinfo.py
+4
-6
4 additions, 6 deletions
pmb/parse/deviceinfo.py
with
9 additions
and
6 deletions
pmb/config/init.py
+
5
−
0
View file @
8c9c0ce9
...
...
@@ -222,6 +222,11 @@ def ask_for_device(args):
device_exists
=
os
.
path
.
exists
(
args
.
aports
+
"
/device/device-
"
+
device
+
"
/deviceinfo
"
)
if
not
device_exists
:
if
device
==
args
.
device
:
raise
RuntimeError
(
"
This device does not exist anymore, check
"
"
<https://postmarketos.org/renamed>
"
"
to see if it was renamed
"
)
logging
.
info
(
"
You are about to do a new device port for
'"
+
device
+
"'
.
"
)
if
not
pmb
.
helpers
.
cli
.
confirm
(
args
,
default
=
True
):
...
...
This diff is collapsed.
Click to expand it.
pmb/parse/deviceinfo.py
+
4
−
6
View file @
8c9c0ce9
...
...
@@ -57,12 +57,10 @@ def deviceinfo(args, device=None):
aport
=
args
.
aports
+
"
/device/device-
"
+
device
if
not
os
.
path
.
exists
(
aport
)
or
not
os
.
path
.
exists
(
aport
+
"
/deviceinfo
"
):
logging
.
fatal
(
"
You will need to create a device-specific package
"
)
logging
.
fatal
(
"
before you can continue. Please create at least the
"
)
logging
.
fatal
(
"
following files:
"
)
logging
.
fatal
(
aport
+
"
/APKBUILD
"
)
logging
.
fatal
(
aport
+
"
/deviceinfo
"
)
raise
RuntimeError
(
"
Incomplete device information
"
)
raise
RuntimeError
(
"
Device
'"
+
device
+
"'
not found. Run
'
pmbootstrap init
'
to
"
"
start a new device port or to choose another device. It may have
"
"
been renamed, see <https://postmarketos.org/renamed>
"
)
ret
=
{}
path
=
aport
+
"
/deviceinfo
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment