Commit Graph

2213 Commits

Author SHA1 Message Date
steadfasterX
fcec1c8887
common: do not abort when recovery-in-boot
when using strict (i.e set -e added by this PR) a build will fail on release when there is no recovery.img. this makes that non-fatal allowing to proceed

Signed-off-by: steadfasterX <steadfasterX@users.noreply.github.com>
2024-04-22 10:24:18 +02:00
steadfasterX
7724c3effd
make divest functions error aware
this commit adds (the currently non-existing) error handling when
using divest's functions and scripts.
all the magic here gets activated when `source ../../Scripts/init.sh`
gets executed which is already a mandatory step before starting any
of the divest functions.

when something fails during patching, resetting or building
each error will be catched + printed including an error code now.
last but not least the executed file and the line number causing that
failure will be shown, too.

as all divest functions get source'd and so not a single build
script gets executed all ERR's needs to be trapped to catch issues.
I am not aware of another way to handle that properly as sourcing
means we cannot track a script or smth while this approach here
just works.

Example for an error thrown in a function call:

> ERROR: $DOS_WORKSPACE_ROOT/Scripts/Common/Functions.sh -> verifyAllPlatformTags() ended with status >1< at line >49<

Final SUCCESS result message after using `patchWorkspace`:

> [FINAL RESULT] No error detected (please check the above output nevertheless!)

Final ERROR result message after using `patchWorkspace`:

> [FINAL RESULT] Serious error(s) found!!!
> Summary error code was: 126. Check & fix all error lines above

Some notes:

- when an error occurs the process continues until the end (like it is now)
  i.e. an error will not stop the current and following tasks
- when multiple errors occur the exit codes will be summed
- buildDevice: a (summed) end result gets printed (SUCCESS or ERROR) at the very end
- the trap used to catch any error will also be active for any command executed
  on the cli. that means: type "false" -> ENTER and you will get an error, too
  same for any script exectued after source init.sh
- when all goes well the trap will be resetted at the end but there are cases
  where this might not happen -> that is why `resetEnv` can be executed to
  reset the trap, i.e. all becomes as it was before sourcing init.sh
- `resetEnv` gets called automatically:
  - after a successful `patchWorkspace` run
  - whenever CTRL+C is used (during a running task or just on the cli)
  - a process get killed (SIGHUP, TERM)
- the whole implementation might not catch all errors though - it highly depends
  on how the function or the script/program called actually handles errors or better
  said: if they return a proper exit code on failures.
  For example some tools (like some git cmds) might print an error but don't return
  a non-zero exit code. This cannot be tracked other then with your eyes or these
  must be replaced by other methods returning a non-zero exit code on failures.

Signed-off-by: steadfasterX <steadfasterX@gmail.com>
2024-04-22 10:24:18 +02:00
Tavi
8eb40b7a97
Optimize images
Signed-off-by: Tavi <tavi@divested.dev>
2024-04-21 14:30:59 -04:00
Tavi
a16b5a89c7
Update CVE patchers
Signed-off-by: Tavi <tavi@divested.dev>
2024-04-16 08:41:35 -04:00
Tavi
aa52315312
Picks
Signed-off-by: Tavi <tavi@divested.dev>
2024-04-14 13:54:25 -04:00
steadfasterX
fb8ee6e2eb functions: do not fail if not building pixel devices
Signed-off-by: steadfasterX <steadfasterX@users.noreply.github.com>
2024-04-10 11:45:45 -04:00
Tavi
25da5b3f74
Update CVE patchers
Signed-off-by: Tavi <tavi@divested.dev>
2024-04-10 11:21:10 -04:00
Tavi
fce6f95a73
Churn
Signed-off-by: Tavi <tavi@divested.dev>
2024-04-10 08:27:30 -04:00
Tavi
570d2edfee
Update CVE patchers
Signed-off-by: Tavi <tavi@divested.dev>
2024-04-10 08:16:01 -04:00
Tavi
e7de509de5
Record current checkouts
Signed-off-by: Tavi <tavi@divested.dev>
2024-04-10 08:15:58 -04:00
Tavi
e1e6d55cc6
Improve 78cb11ac
Signed-off-by: Tavi <tavi@divested.dev>
2024-04-10 07:48:20 -04:00
Tavi
78cb11acd7 tensor stuff
Signed-off-by: Tavi <tavi@divested.dev>
2024-04-10 07:24:29 -04:00
Tavi
741e5a7ca3
Fixup
also 16.0 probably needs a backport of IsRecoveryMode
compile tested on 20.0

Signed-off-by: Tavi <tavi@divested.dev>
2024-04-09 16:40:05 -04:00
Tavi
3f430b038e
18.1: April ASB picks
1 extra patch

Signed-off-by: Tavi <tavi@divested.dev>
2024-04-09 16:29:38 -04:00
Tavi
4f8cfc8a41
you want it, you got it!
now compile it yourself.

Signed-off-by: Tavi <tavi@divested.dev>
2024-04-09 16:25:54 -04:00
Tavi
f5d06ea9aa
Refresh defconfig paths
Signed-off-by: Tavi <tavi@divested.dev>
2024-04-09 13:31:34 -04:00
Tavi
ea83b47d59
apex signing updates
untested

Signed-off-by: Tavi <tavi@divested.dev>
2024-04-09 13:25:56 -04:00
Tavi
835fbb7d2c
Fixup
Signed-off-by: Tavi <tavi@divested.dev>
2024-04-08 15:12:49 -04:00
Tavi
9d6325e2a0
15.1: April ASB work
Signed-off-by: Tavi <tavi@divested.dev>
2024-04-08 13:36:38 -04:00
Tavi
20a47d5b25
16.0: April ASB work
Signed-off-by: Tavi <tavi@divested.dev>
2024-04-08 12:24:08 -04:00
Tavi
b6f3f2e055
17.1: April ASB work
Signed-off-by: Tavi <tavi@divested.dev>
2024-04-08 09:53:03 -04:00
Tavi
113cbef36e
Fixup a patch thanks to @Skyblueborb
See https://review.lineageos.org/c/LineageOS/android_vendor_qcom_opensource_system_bt/+/385592/1..2

Signed-off-by: Tavi <tavi@divested.dev>
2024-04-08 09:35:22 -04:00
Tavi
e5f019d63d
18.1: April ASB work
Signed-off-by: Tavi <tavi@divested.dev>
2024-04-07 18:26:07 -04:00
Tavi
898ddf41a9
19.1: ASB Picks
Signed-off-by: Tavi <tavi@divested.dev>
2024-04-07 16:56:12 -04:00
Tavi
5cad35c028
Fixup
Signed-off-by: Tavi <tavi@divested.dev>
2024-04-06 19:59:27 -04:00
Tavi
2c9a3903e5
14.1: ASB Picks
Signed-off-by: Tavi <tavi@divested.dev>
2024-04-06 15:43:21 -04:00
Tavi
b6c2959272
Fixup lemonade/lemonadep
Signed-off-by: Tavi <tavi@divested.dev>
2024-04-05 22:58:48 -04:00
Tavi
97ce53667f
Churn
Signed-off-by: Tavi <tavi@divested.dev>
2024-04-04 14:42:59 -04:00
Tavi
450ad03159
Update CVE patchers
maybe some breakage

Signed-off-by: Tavi <tavi@divested.dev>
2024-04-04 13:55:38 -04:00
Tavi
768f46c3bd
Update CVE patchers
Signed-off-by: Tavi <tavi@divested.dev>
2024-04-02 08:54:59 -04:00
Tavi
86f61c05e9
Update CVE patchers
no change

Signed-off-by: Tavi <tavi@divested.dev>
2024-03-31 09:56:56 -04:00
Tavi
2a78a4cfc0
Update CVE patchers
for realz

Signed-off-by: Tavi <tavi@divested.dev>
2024-03-27 22:09:10 -04:00
Tavi
2d863ce612
Update CVE patchers
Signed-off-by: Tavi <tavi@divested.dev>
2024-03-27 21:26:18 -04:00
ContentedGoat
dab5318981 Merge pull request 'New device request added' (#5) from DwainZwerg/divestos-build:master into master
Reviewed-on: https://codeberg.org/divested-mobile/divestos-build/pulls/5
2024-03-22 18:56:33 +00:00
Tavi
dc9ed7c46c
Update CVE patchers
Signed-off-by: Tavi <tavi@divested.dev>
2024-03-21 14:54:23 -04:00
Tavi
4f4d760687
Churn
Signed-off-by: Tavi <tavi@divested.dev>
2024-03-21 13:56:43 -04:00
DwainZwerg
fc2238e726 name: otter 2024-03-18 19:37:14 +00:00
DwainZwerg
0e6f6d9171 Updating the status 2024-03-18 15:31:56 +00:00
DwainZwerg
1c88fbccb0 New device request added 2024-03-18 15:26:53 +00:00
Tavi
26d99a04f0
15.1: March ASB work
Signed-off-by: Tavi <tavi@divested.dev>
2024-03-14 23:35:21 -04:00
Tavi
6b0362d46f
20.0: Fix invisible camera buttons
Signed-off-by: Tavi <tavi@divested.dev>
2024-03-14 23:12:45 -04:00
Tavi
1e8e187ede
17.1: March ASB work
+ a bonus February patch for 15.1

Signed-off-by: Tavi <tavi@divested.dev>
2024-03-14 21:15:15 -04:00
Tavi
fa6d1f7f90
17.1: Reconcile picks
Signed-off-by: Tavi <tavi@divested.dev>
2024-03-14 20:00:59 -04:00
Tavi
9d1e208470
Commit to sign
Signed-off-by: Tavi <tavi@divested.dev>
2024-03-14 16:43:38 -04:00
Tavi
dee7abe09d Update CVE patchers
Signed-off-by: Tavi <tavi@divested.dev>
2024-03-14 14:58:24 -04:00
Tavi
3b2fde1dd6
16: ASB picks
Signed-off-by: Tavi <tavi@divested.dev>
2024-03-13 21:19:02 -04:00
Tavi
8157086726
Churn
Signed-off-by: Tavi <tavi@divested.dev>
2024-03-11 14:19:21 -04:00
Tavi
54469e0693
Fixup
Signed-off-by: Tavi <tavi@divested.dev>
2024-03-11 07:22:03 -04:00
Tavi
cdfbce9dfd
Fixups
Signed-off-by: Tavi <tavi@divested.dev>
2024-03-10 12:10:49 -04:00
Tavi
2aecd058d3
18: ASB Picks
Signed-off-by: Tavi <tavi@divested.dev>
2024-03-09 20:54:44 -05:00