Bug 26323 - Update process aborts due to previously incorrectly loaded package.
Summary: Update process aborts due to previously incorrectly loaded package.
Status: RESOLVED INVALID
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 7
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-09 18:33 CET by Heiko Stark
Modified: 2020-03-10 10:37 CET (History)
2 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments

Description Heiko Stark 2020-03-09 18:33:29 CET
Description of problem:
Update process aborts due to previously incorrectly loaded package. Does not automatically reload that package.

Version-Release number of selected component (if applicable):
glibc                          2.29

How reproducible:
Disconnect internet connection during update process.

Steps to Reproduce:
# urpmi --auto-update 
Medium »Core Release« ist auf dem aktuellen Stand
Medium »Core Updates« ist auf dem aktuellen Stand
Medium »Core Backports« ist auf dem aktuellen Stand
Medium »Nonfree Release« ist auf dem aktuellen Stand
Medium »Nonfree Updates« ist auf dem aktuellen Stand
Medium »Nonfree Backports« ist auf dem aktuellen Stand
Medium »Tainted Release« ist auf dem aktuellen Stand
Medium »Tainted Updates« ist auf dem aktuellen Stand
Medium »Tainted Backports« ist auf dem aktuellen Stand
Medium »Core 32bit Release« ist auf dem aktuellen Stand
Medium »Core 32bit Updates« ist auf dem aktuellen Stand
Medium »Core 32bit Backports« ist auf dem aktuellen Stand
Medium »Nonfree 32bit Release« ist auf dem aktuellen Stand
Medium »Nonfree 32bit Updates« ist auf dem aktuellen Stand
Medium »Nonfree 32bit Backports« ist auf dem aktuellen Stand
Medium »Tainted 32bit Release« ist auf dem aktuellen Stand
Medium »Tainted 32bit Updates« ist auf dem aktuellen Stand
Medium »Tainted 32bit Backports« ist auf dem aktuellen Stand
Um die Abhängigkeiten zu erfüllen, werden die folgenden Pakete installiert:
  Paket                          Version      Release       Arch    
(Medium »Core Updates«)
  glibc                          2.29         20.mga7       x86_64  
  glibc-devel                    2.29         20.mga7       x86_64  
  glibc-static-devel             2.29         20.mga7       x86_64  
  glibc-utils                    2.29         20.mga7       x86_64  
35MB zusätzlicher Speicherplatz werden benötigt.
21MB an Paketen werden geholt.
Fortfahren mit der Installation der 4 Pakete? (J/n) 


glibc-devel-2.29-20.mga7.x86_64.rpm glibc-static-devel-2.29-20.mga7.x86_64.rpm glibc-utils-2.29-20.mga7.x86_64.rpm glibc-2.29-20.mga7.x86_64.rpm von /var/cache/urpmi/rpms wird installiert
Vorbereiten …                    #########################################################################################################################
Installation fehlgeschlagen:    package glibc-6:2.29-20.mga7.x86_64 does not verify: Payload SHA256 digest: BAD (Expected 65372ba4a6a99556c099fdb6033561108d3880d7f74d5afbd2aaea4e634add73 != 110858cd3df528ed8a788e1efb6481d5bb0a6624f8044ead5d8348f160492647)
Comment 1 Lewis Smith 2020-03-09 21:24:29 CET
I am unclear about what the alleged bug is supposed to be. The bug title looks like correct behaviour. If a package checksum fails, it is normal to clear the RPM cache:
 $ urpmi --clean
and re-commence the update. If one package continues to cause trouble, it can be excluded from the updates (UNticking it) using MCC-Manage Software-Update System.

> incorrectly loaded package. Does not automatically reload that package
If this is the real complaint, do you mean that if a package checksum fails, it should be downloaded again (& how many tries?). That looks like an enhancement request.

The example you give above does not indicate at what point Internet was disconnected - which packages had been fully downloaded (into /var/cache/urpmi/rpms/ ), which one interrupted (looks like glibc). So its checksum fails, and the entire update is aborted. A partial update of these intimately related packages would not have been correct.

Feel free to re-open this bug if I have misunderstood something; or as an enhancement request..

CC: (none) => lewyssmith
Status: NEW => RESOLVED
Resolution: (none) => INVALID

Comment 2 Heiko Stark 2020-03-10 08:25:15 CET
Whenever I start urpmi, I assume a clean cache. A cache is usually only a temporary buffer and should be hidden from the user (French: cache – hide-out). If this behaviour is not desired, at least for files with errors, they should be reloaded once in the cache.

Thanks also for the hint (urpmi --clean).

Heiko

Resolution: INVALID => (none)
Status: RESOLVED => REOPENED

Comment 3 Dave Hodgins 2020-03-10 10:22:28 CET
From "man urpmi" ...
       --clean
           Remove all packages from the cache in directory /var/cache/urpmi/rpms.

       --noclean
           Do not remove any package from the cache in directory /var/cache/urpmi/rpms.

From "man urpmi.cfg" (the config file is stored as /etc/urpmi/urpmi.cfg) ...
       pre-clean, post-clean, clean
           Control cache management for urpmi, default is only activated as post-clean.

So the default is to clean the cache only after it has successfully installed
the selected packages. The reason for that being chosen as the default is to
allow the use of urpmi with the --resume option, in the case of an interrupted
download.

If you want the option pre-clean to be the setting used on your system, then
edit /etc/urpmi/urpmi.cfg, and add the line to the global options so that the
start of the file is similar to ...
{
  pre-clean
}

Closing the bug again as this is a design choice, not a bug.

The system may have other global options already set, in which case just
add the pre-clean option.

I've seen what happens when the default is pre-clean, on windows systems where
it silently downloads a failed update, over and over again, costing people a
lot of money due to exceeding their data caps. For that reason, I'm strongly
against changing the default.

As this is the system administrators choice, closing this bug again.

Status: REOPENED => RESOLVED
Resolution: (none) => INVALID
CC: (none) => davidwhodgins

Comment 4 Heiko Stark 2020-03-10 10:37:48 CET
Sorry, I rarely read documentaries. Thanks for the hints! 
I just like fault-tolerant software (one reload is not so critical).

Heiko

Note You need to log in before you can comment on or make changes to this bug.