FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 02-09-2012, 03:04 AM
Nagy Gabor
 
Default Remove a pm_errno = 0 line

In the download code a successful package-download could reset the previously
set pm_errno to 0, which is unwanted.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
---
lib/libalpm/dload.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index 9b57b97..8e754f1 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -388,7 +388,6 @@ static int curl_download_internal(struct dload_payload *payload,
/* shortcut to our handle within the payload */
alpm_handle_t *handle = payload->handle;
CURL *curl = get_libcurl_handle(handle);
- handle->pm_errno = 0;

payload->tempfile_openmode = "wb";
if(!payload->remote_name) {
--
1.7.9
 
Old 02-09-2012, 03:06 AM
Nagy Gabor
 
Default Remove a pm_errno = 0 line

> In the download code a successful package-download could reset the previously
> set pm_errno to 0, which is unwanted.
>
> Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>

This patch needs testing. Btw, I can see more pm_errno = 0 line in the
code, which is not a good practice...

NG
 
Old 02-09-2012, 03:19 AM
Dan McGee
 
Default Remove a pm_errno = 0 line

On Wed, Feb 8, 2012 at 11:06 PM, Nagy Gabor <ngaba@bibl.u-szeged.hu> wrote:
>> In the download code a successful package-download could reset the previously
>> set pm_errno to 0, which is unwanted.
>>
>> Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
>
> This patch needs testing. Btw, I can see more pm_errno = 0 line in the
> code, which is not a good practice...
We don't just do this for fun, it is necessary practice in several
cases. Please consider the following patch which you are reverting...

commit b008193c1255639f724e3f6c62e50e6f2619e3c2
Author: Dave Reisner <dreisner@archlinux.org>
Date: Tue Aug 16 20:10:22 2011 -0400

dload: zero out pm_errno in curl_download_internal

This reverts some hacky behavior from 5fc3ec and resets the handle's
pm_errno where it should be reset -- prior to each download. This
prevents a transaction with a download from being aborted when a package
is successfully grabbed from a secondary server.
 
Old 02-09-2012, 03:23 AM
Nagy Gabor
 
Default Remove a pm_errno = 0 line

> > In the download code a successful package-download could reset the previously
> > set pm_errno to 0, which is unwanted.
> >
> > Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
>
> This patch needs testing. Btw, I can see more pm_errno = 0 line in the
> code, which is not a good practice...
>
> NG
>

I revoke this patch. That pm_errno = 0 line is there for indicating the
successful download of the same file from an other mirror. As a side
effect, every successful download clears the "pm_errno history". This
is again a design limitation (this should be handled in sync.c). :-(
 
Old 02-09-2012, 03:24 AM
Nagy Gabor
 
Default Remove a pm_errno = 0 line

> On Wed, Feb 8, 2012 at 11:06 PM, Nagy Gabor <ngaba@bibl.u-szeged.hu> wrote:
> >> In the download code a successful package-download could reset the previously
> >> set pm_errno to 0, which is unwanted.
> >>
> >> Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
> >
> > This patch needs testing. Btw, I can see more pm_errno = 0 line in the
> > code, which is not a good practice...
> We don't just do this for fun, it is necessary practice in several
> cases. Please consider the following patch which you are reverting...

Yeah, I've just sent an other answer to this thread...
 

Thread Tools




All times are GMT. The time now is 01:41 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org