public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Robin Roevens <robin.roevens@disroot.org>
To: development@lists.ipfire.org
Subject: [PATCH 0/1] pakfire: Better errorhandling on downloads
Date: Wed, 23 Feb 2022 21:21:29 +0100	[thread overview]
Message-ID: <20220223202130.6104-1-robin.roevens@disroot.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1294 bytes --]

Hi all

While tinkering with pakfire to add effective use of the new metadata,
remove more duplicate code and seperating some view and control for cleaner 
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. 
This lack of errorhandling was also the cause of meta-files sometimes 
turning up empty. Also in some corner cases the list files could become 
corrupted or some package dependencies could be skipped during install.

So I added proper errorhandling around file downloads: functions
fetchfile, getmetafile and getmirrors now always return 0 (fail) or 1 (success).
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 
it tries to do things that depend on files that are not there due to earlier
uncatched failures.

Regards
Robin



-- 
Dit bericht is gescanned op virussen en andere gevaarlijke
inhoud door MailScanner en lijkt schoon te zijn.


             reply	other threads:[~2022-02-23 20:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23 20:21 Robin Roevens [this message]
2022-02-23 20:21 ` [PATCH] " Robin Roevens
2022-03-01 13:31   ` Michael Tremer
2022-03-03 21:20     ` Robin Roevens
2022-03-04 11:18       ` Michael Tremer
2022-03-04 15:08         ` Adolf Belka
2022-03-07 13:33           ` Robin Roevens
2022-03-07 14:11             ` Adolf Belka
2022-06-23 21:20   ` Robin Roevens
2022-06-25 10:11     ` Peter Müller
2022-03-01 13:27 ` [PATCH 0/1] " Michael Tremer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220223202130.6104-1-robin.roevens@disroot.org \
    --to=robin.roevens@disroot.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox