Bug 33279

Summary: apt-get update is not ensured before apt-get install
Product: Sisyphus Reporter: Ivan Zakharyaschev <imz>
Component: puppet3Assignee: Ivan Zakharyaschev <imz>
Status: NEW --- QA Contact: qa-sisyphus
Severity: normal    
Priority: P3 CC: nbr
Version: unstable   
Hardware: all   
OS: Linux   

Description Ivan Zakharyaschev 2017-03-24 17:04:26 MSK
puppet3-3.8.7-alt2

I've noticed a situation like this (in a test run by nbr@).

"apt-get install" was attempted, although the package lists were outdated. "apt-get update" was needed beforehand. Perhaps, this problem has a general solution in the Puppet code: to ensure "apt-get update" is run often enough (well, Sisyphus is published only once a day, so not quite often).

Debug: Executing '/usr/bin/apt-cache showpkg tzdata'
Debug: /Stage[main]/Apipkg::Common/Package[tzdata]/ensure: tzdata 
"2016j-alt1" is installed, latest is "2017a-alt1"
Debug: Executing '/usr/bin/apt-get -q -y install tzdata'
Error: Could not update: Execution of '/usr/bin/apt-get -q -y install 
tzdata' returned 100: Reading Package Lists...
Building Dependency Tree...
The following packages will be upgraded
  tzdata
1 upgraded, 0 newly installed, 0 removed and 181 not upgraded.
Need to get 352kB of archives.
After unpacking 7613B of additional disk space will be used.
Err http://ftp.altlinux.org Sisyphus/noarch/classic tzdata 2017a-alt1
  404 Not Found
Failed to fetch http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus/noarch/RPMS.classic/tzdata-2017a-alt1.noarch.rpm 404 Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Error: /Stage[main]/Apipkg::Common/Package[tzdata]/ensure: change from 
2016j-alt1 to 2017a-alt1 failed: Could not update: Execution of '/usr/bin/apt-get -q -y install tzdata' returned 100: Reading Package Lists...
Building Dependency Tree...
The following packages will be upgraded
  tzdata
1 upgraded, 0 newly installed, 0 removed and 181 not upgraded.
Need to get 352kB of archives.
After unpacking 7613B of additional disk space will be used.
Err http://ftp.altlinux.org Sisyphus/noarch/classic tzdata 2017a-alt1
  404 Not Found
Failed to fetch http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus/noarch/RPMS.classic/tzdata-2017a-alt1.noarch.rpm 404 Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Comment 1 Ivan Zakharyaschev 2017-03-24 17:06:30 MSK
One of the first related discussions I found when doing a search:

http://stackoverflow.com/q/10845864/94687
Puppet trick - run apt-get update before installing other packages