extract_utils: extract(): fix src not being searched in "src:dst;args" spec
* Root cause of the issue is improper naming of variables. Turns out, there was no variable to even denote where the blob should have been searched for, at "src". * Previously there was one such variable, suggestively called "TARGET", that was desperately trying to serve as both, depending on who +2d hacks harder. * One such example is "c982836c extract_utils: Fix makefile generation issues". That patch deliberately trimmed the "src:" from a spec (therefore obviously breaking the search at src) but enabling the searching at dst, via the good-for-all TARGET variable. * This patch introduces the following variables: - SRC_FILE: absolute path corresponding to SPEC_SRC_FILE in the Android filesystem. - DST_FILE: absolute path corresponding to SPEC_DST_FILE in the Android filesystem. Somewhat analogous to the old TARGET variable, but actually contains the leading / as well (/system/bin/adsprpcd instead of system/bin/adsprpcd). * Use existing common get_file() function (which previously was impossible to use, because it was impossible to determine calling arguments properly) to reduce complexity of handling adb and disk image as blob sources. * Via the new SRC_FILE and DST_FILE variables, search for a blob in all possible locations (including paths stripped of "/system" which transforms an absolute path in the Android filesystem into a proper relative path to that file in a disk image). Change-Id: Ic40fb4dc93541d8b3f33fde586b773199cf4ded2 Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Loading
Please register or sign in to comment