Open AndreiCherniaev opened 1 year ago
I think it makes sense in general. I don't think that the same file name in multiple directories should cause an error. Instead we should define a clear search order.
Currently there are two places where inputpath
is used:
INPUTPATH
environment variable
I think we can just set a colon separated list here. For existing users, there is just one entry so nothing changes.I'm not sure if I like the colon separated argument on the command-line. Maybe just allow specifying it multiple times? But I'm not sure if that can be implemented easily.
At this moment I can't use inputpath with not one, but a list of paths. Why? i suggest allow something like
/mnt/ramdisk/buildroot/board/pc$ genimage --config genimage-bios.cfg --inputpath /mnt/ramdisk/buildroot/output/images/:/mnt/ramdisk/buildroot/output/target/lib/grub/i386-pc/ --outputpath /mnt/ramdisk/buildroot/output/images/
At this moment I can use includepath with a list of options, but includepath is for .cfg files only, I can't set in genimage-bios.cfg
includepath use set_include_path() to parse a list, I thing something the same we should use for inputpath. Isn't it? And of cause if there are two files with one name genimage should produce error... (And we need at autotest for this situation)