From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH 0/1] pakfire: Better errorhandling on downloads Date: Tue, 01 Mar 2022 13:27:46 +0000 Message-ID: In-Reply-To: <20220223202130.6104-1-robin.roevens@disroot.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3637882770312619921==" List-Id: --===============3637882770312619921== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello Robin, This is very valuable work. I will reply to some technical things in the patc= h email. > On 23 Feb 2022, at 20:21, Robin Roevens wrote: >=20 > Hi all >=20 > While tinkering with pakfire to add effective use of the new metadata, > remove more duplicate code and seperating some view and control for cleaner= =20 > usage in services.cgi et al; I had a few times where my VM lost > connection to internet. And there I found that pakfire started to fail > in ugly ways. Ugly errors, even tar errors failing to untar the file it > failed to download etc.=20 > This lack of errorhandling was also the cause of meta-files sometimes=20 > turning up empty. Also in some corner cases the list files could become=20 > corrupted or some package dependencies could be skipped during install. >=20 > So I added proper errorhandling around file downloads: functions > fetchfile, getmetafile and getmirrors now always return 0 (fail) or 1 (succ= ess). > Fetchfile actually already had return values but those where never > checked. > So now, where required, these errorcodes are checked and proper error > messages are displayed, or at least files are not overwritten with > possibly corrupt files, making functions or even pakfire stop before=20 > it tries to do things that depend on files that are not there due to earlier > uncatched failures. Yay! -Michael > Regards > Robin >=20 >=20 >=20 > --=20 > Dit bericht is gescanned op virussen en andere gevaarlijke > inhoud door MailScanner en lijkt schoon te zijn. >=20 --===============3637882770312619921==--