public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: setup's response to a "corrupt local copy"
Date: Sat, 16 Dec 2017 04:00:00 -0000	[thread overview]
Message-ID: <fe4fd62f-e84c-ed61-c39a-cc10a1b4ab0f@SystematicSw.ab.ca> (raw)
In-Reply-To: <b031c829-d3a0-f28e-9ce0-0052e7d3475a@cornell.edu>

On 2017-12-14 12:57, Ken Brown wrote:
> On 12/14/2017 2:46 PM, Andrey Repin wrote:
>>> This is a followup to the discussion started here:
>>>     https://cygwin.com/ml/cygwin/2017-12/msg00088.html
>>> When setup is preparing to download files and it finds a corrupt copy in
>>> the local cache, it issues a fatal error message telling the user to
>>> remove the corrupt file and retry.  Steven said that setup should
>>> silently delete the corrupt file, while I argued in favor of the current
>>> behavior, on the grounds that setup shouldn't be deleting user files if
>>> it doesn't know where they came from.
>> The point being, if this is a "Download" Setup mode, the files are NOT "User"
>> files, but a local setup cache. And all files therein SHOULD be valid package
>> archives.
>> There's of course situations, when setup.ini on server become corrupted or
>> otherwise out of sync. But being rare, they should not interfere too much.
>>> There is a middle ground: setup could query the user.  Additionally, as
>>> suggested by cyg Simple, there could be an option that directs setup to
>>> silently remove corrupt files.
>> Make it mode dependent.
>> If it's a "download[ and install]" mode, cleanup and redownload.
>> If redownloaded file still does not match the setup.ini hash or if it's an
>> "install from local cache" mode, leave file alone for investigation and notify
>> the user.
> You've misunderstood the context.  The error is only shown in download or
> download/install mode.  And, as I said, it happens when setup is *preparing* to
> download files and finds a corrupt copy already present in the local cache.  In
> that context, setup has no idea where the file came from.

Setup knows the file came from
	.../%encoded-mirror-url/arch/release/package/.../pvr....tar.xz
so it could warn the user of the validation failure, rename the file failing
validation if the cache is (one of) the currently selected mirror(s) and inform
the user of the rename, then add the package for redo of download/install from
(one of) the currently selected mirror(s), similar to a package prereq.
This would DTRT in most cases and not blow away the questionable cached file.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

      parent reply	other threads:[~2017-12-16  1:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-13 14:36 Ken Brown
2017-12-14  4:40 ` Hans-Bernhard Bröker
2017-12-14 20:13 ` Andrey Repin
2017-12-14 23:34   ` Ken Brown
2017-12-15 13:05     ` Steven Penny
2017-12-15 14:53       ` Vince Rice
2017-12-16  7:52         ` Steven Penny
2017-12-16 14:40           ` Frank Redeker
2017-12-16 15:33           ` Vince Rice
2017-12-16 20:47             ` Steven Penny
2017-12-16 20:47               ` Ken Brown
2017-12-15 15:20     ` Andrey Repin
2017-12-16  4:00     ` Brian Inglis [this message]

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=fe4fd62f-e84c-ed61-c39a-cc10a1b4ab0f@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin@cygwin.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).