[pacman-dev] [PATCH] makepkg: add check to ensure we have non-URL files in build dir
Pacman 3.0 printed the following message if a file could not be found: ERROR: xxx was not found in the build directory and is not a proper URL. We lost this logic in 3.1 when moving to the DLAGENT type stuff, so a not-found file got passed all the way to the download logic where it failed with a odd error message. Bring back some logic to ensure only files with URLs get past a certain point, and fail if the file is not available. Fixes FS#9208. Signed-off-by: Dan McGee <dan@archlinux.org> --- Decision time guys- this patch would 'break' the string freeze, but I can't think of many other ways to do what it does without (re)introducing the below error message. This patch also needs some testing with real building to ensure it doesn't break anything that worked before. In my 10 minutes of testing it seemed fine in most cases. So should we include this for 3.1? Even if the message is not translated, I think it would be better to fail correctly than fail wrongly as before. -Dan scripts/makepkg.sh.in | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 219e2d1..ad95356 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -464,6 +464,12 @@ download_sources() { continue fi + # if we get here, check to make sure it was a URL, else fail + if [ "$file" = "$netfile" ]; then + error "$(gettext "%s was not found in the build directory and is not a URL.")" "$netfile" + exit 1 # $E_MISSING_FILE + fi + # find the client we should use for this URL local dlclient=$(get_downloadclient $netfile) || exit $? -- 1.5.4.rc3
On Jan 15, 2008 11:15 PM, Dan McGee <dan@archlinux.org> wrote:
Decision time guys- this patch would 'break' the string freeze, but I can't think of many other ways to do what it does without (re)introducing the below error message.
Personal opinion? It's not a HUGE deal. The error is simply cryptic at this point. I'd push it into 3.1.2 later on
Aaron Griffin wrote:
On Jan 15, 2008 11:15 PM, Dan McGee<dan@archlinux.org> wrote:
Decision time guys- this patch would 'break' the string freeze, but I can't think of many other ways to do what it does without (re)introducing the below error message.
Personal opinion? It's not a HUGE deal. The error is simply cryptic at this point. I'd push it into 3.1.2 later on
I agree. If we are going to break the string freeze, there are others things that would need to be fixed. The two mentioned there : http://archlinux.org/pipermail/pacman-dev/2008-January/010885.html And we also talked about reformulating the -Sc message a bit. And I think we should get 3.1.1 released as fast as possible because of 9171. I specified at several places that the dependency / provision couldn't be solved until 3.1.1 released, and so a few packagers and many users need it. Finally, I think a 3.1.2 should be released soon after for the remaining strings and translations issues.
participants (3)
-
Aaron Griffin
-
Dan McGee
-
Xavier