Bug 33279 - apt-get update is not ensured before apt-get install
Summary: apt-get update is not ensured before apt-get install
Status: NEW
Alias: None
Product: Sisyphus
Classification: Development
Component: puppet3 (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Ivan Zakharyaschev
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-24 17:04 MSK by Ivan Zakharyaschev
Modified: 2017-03-24 17:06 MSK (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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