Clayton Craft
a15a3ad781
filelist/modules: don't print "skipping..." when dir not found
...
I think this was still causing some confusion, since it *might* look
like a failure when in reality it's not. I think it's important that
mkinitfs prints when it is adding something, and doesn't print when it
is *not* adding something, so that it should be clear if something
expected is missing and when something unexpected is included... without
having to sort out which is which every time the output is read.
2023-03-19 23:06:09 -07:00
Clayton Craft
67f1839ddc
filelist/modules: fix order of struct items to reduce memory
...
Another one found by fieldalignment:
modules.go:18:14: struct with 32 pointer bytes could be 24
Probably not going to matter much... but let's just get rid of the
warning.
2023-03-12 20:39:01 -07:00
Clayton Craft
27e271b904
filelist/modules: print a message when including modules from deviceinfo
...
fixes https://gitlab.com/postmarketOS/postmarketos-mkinitfs/-/issues/24
2023-03-12 20:36:29 -07:00
Clayton Craft
1ac85b12fe
filelist/modules: print search dir before searching dir
...
This will allow printing status for deviceinfo modules earlier in the
function, in a way that makes more sense.
2023-03-12 20:36:24 -07:00
Clayton Craft
f7f42bc2d4
filelist/modules: handle errors from filepath.Walk
2023-03-12 20:18:51 -07:00
Clayton Craft
c62a1f9ddb
filelist/modules: remove outdated reference in error message
2023-03-12 20:05:55 -07:00
Clayton Craft
c9de619f98
filelist/hookscripts: use the correct path for scripts
2023-03-10 23:23:53 -08:00
Clayton Craft
a519769979
filelist/*: use "searching" instead of "including" in top-level msg
...
When this is printed, it's about to search the given path for stuff to
slurp up, but it hasn't actually included anything yet. Using
"Including" here was kinda confusing, so this changes it to use
"Searching for." Hopefully that's better!
2023-03-10 22:33:32 -08:00
Clayton Craft
8b67848d5c
filelist/modules: print search path for modules
...
By doing so, it adds more useful context to this:
- Including kernel modules
-- Unable to find dir, skipping...
- Including kernel modules
-- Unable to find dir, skipping...
2023-03-05 23:54:15 -08:00
Clayton Craft
4074eada55
modules: remove TODOs
...
The builtin one was moved to a new issue:
https://gitlab.com/postmarketOS/postmarketos-mkinitfs/-/issues/18
The "more extensions" one was not moved to a new issue, it should be
obvious if we do need to support more extensions.
2023-02-21 12:41:18 -08:00
Clayton Craft
06f86aadc9
misc.Exists: bubble up any unexpected errors
...
Fixes https://gitlab.com/postmarketOS/postmarketos-mkinitfs/-/issues/6
2023-02-21 12:41:18 -08:00
Clayton Craft
0179a0ca5c
misc: remove functions now in osutils, update references in project
2023-02-21 12:41:17 -08:00
Clayton Craft
b0e28b4215
filelist/hookdirs: add new FileLister implementation for creating dirs
2023-02-21 00:47:03 -08:00
Clayton Craft
c1d96f699c
filelist/hookscripts: don't fail if directory not found
2023-02-21 00:47:02 -08:00
Clayton Craft
25c3c03e24
filelist/osksdl: fix crash when osk-sdl isn't found
...
Should have returned an empty FileList in this case
2023-02-21 00:47:02 -08:00
Clayton Craft
07c8c711c7
filelist/hookfiles: don't error out if dir is not found
...
Just print a message that it wasn't found, instead of sending an error
that may stop the entire app.
2023-02-21 00:47:02 -08:00
Clayton Craft
e772fe0c87
filelist/hookfiles: support specifying src:dest in .files
2023-02-21 00:47:02 -08:00
Clayton Craft
6f05222018
filelist/modules: add support for directories in .modules files
...
This is kinda janky, passing both a list of modules and a directory path
is just because we support modules in deviceinfo and in directory file
lists... Maybe one day we can move away from having modules in the
deviceinfo...
2023-02-21 00:45:58 -08:00
Clayton Craft
22692e48d2
filelist/initramfs: add new type for slurping up file listers
2023-02-21 00:45:58 -08:00
Clayton Craft
6c2f7b972b
filelist/*: implement FileLister in existing types
2023-02-21 00:45:57 -08:00
Clayton Craft
e5002f5750
filelist/FileList: add Import method
2023-02-21 00:45:16 -08:00
Clayton Craft
662f559286
filelist: Add FileList type
...
This adds a new type, FileList, to manage another new type (File). File
contains the mapping of source --> dest for a file or directory.
2023-02-21 00:45:16 -08:00
Clayton Craft
a4be663e13
filelist/*.List(): print to stdout when starting to generate FileList
2023-02-21 00:45:16 -08:00
Clayton Craft
fb52066d8f
filelist/modules: remove postmarketos- from config dir name
2023-02-21 00:45:15 -08:00
Clayton Craft
b7f520cba4
filelist/modules: drop "required modules"
...
Breaking change. These should be provided in /*/modules/* lists
2023-02-21 00:45:15 -08:00
Clayton Craft
b25c9bd390
filelist/hookfiles: add new implementation
2023-02-21 00:45:13 -08:00
Clayton Craft
af3c47c784
filelist/hookscripts: add new implementation
2023-02-21 00:45:13 -08:00
Clayton Craft
1531d7e790
filelist/modules: add new implementation
2023-02-21 00:45:13 -08:00
Clayton Craft
e00e5faf6e
filelist/osksdl: just use fmt.Errorf to create an error
2023-02-21 00:45:12 -08:00
Clayton Craft
5e07b63084
filelist/osksdl: add new implementation
2023-02-21 00:45:12 -08:00
Clayton Craft
73fd85f68c
filelist: add FileLister interface
2023-02-18 11:22:25 -08:00