[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: APT - method - message 400



On Thu, May 14, 2020 at 09:43:48AM +0200, Jędrzej Dudkiewicz wrote:
> Hello,
> 
> I'm implementing custom Method which has *very* high chance of failure
> during data retrieval - it is supposed to work on our devices which
> frequently lost network connection (no network for 80-90% of the time
> when device is running). I'm trying to figure out how my Method should
> proceed in case such failure occurs - should I simply send Message 400
> to apt? The following passage:
> 
>      400 URI Failure
>           Indicates a fatal URI failure. The URI is not retrievable from
>           this source. As with *201 URI Done* *200 URI Start* is not
>           required to preceed this message Fields: URI, Message
> 
> seems to suggest that this is permanent failure and apt won't retry
> this particular source + package pair. Is that correct? Or is this
> more of a transitional failure and I can simply send it and retry
> later?
> 
> I'm thinking of setting up a service that would automatically upgrade
> all available packages. If Message 400 is transitional  then it is all
> good - even if package can't be retrieved right away, it will be
> downloaded when connection can be made (they are scheduled and
> downloaded by yet another service), and packages will be installed
> during next activation, but if it is permanent and to make things
> worst information reg. inability to download particular file from
> particular source is stored permanently, then this certainly will not
> work.
> 
> And one more question, how should I proceed if Message 400 indicates
> permanent failure and retrieval won't be attempted from same source
> again?

Please avoid creating new methods, and use http.

In any case, the 400 error is for the specific run, so if you
create a new acquire object / update transaction in packagekit
/ rerun apt, it will not be around anymore, as it's not stored
to disk (or global memory of the process)

-- 
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer                              i speak de, en


Reply to: