Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run 'apt-cache gencaches' after adding key? #192

Closed
lamont-granquist opened this issue Mar 4, 2016 · 0 comments
Closed

Run 'apt-cache gencaches' after adding key? #192

lamont-granquist opened this issue Mar 4, 2016 · 0 comments

Comments

@lamont-granquist
Copy link
Contributor

setup is that i had /etc/apt/soures.list.d/mono.list created, and added a key to it.

the first run it actually adds the new key via apt-key adv but explodes with "package cannot be authenticated!" error:

         * apt_repository[mono] action add
           * execute[install-key 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF] action run
             - execute apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
           * ruby_block[validate-key 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF] action run (skipped due to not_if)
           * file[/var/lib/apt/periodic/update-success-stamp] action nothing (skipped due to action :nothing)
           * execute[apt-cache gencaches] action nothing (skipped due to action :nothing)
           * execute[apt-get update] action nothing (skipped due to action :nothing)
           * file[/etc/apt/sources.list.d/mono.list] action create (up to date)

         * apt_update[grrr] action periodic (up to date)
         * apt_package[git, inotify-tools, librsvg2-bin, libxml2-dev, libxslt1-dev, lua5.1, liblua5.1-0-dev, luarocks, mono-complete, mono-devel, pkg-config, python, python-dev, python-pip, python-virtualenv, texlive-fonts-recommended, texlive-latex-base, texlive-latex-extra, texlive-latex-recommended, librsvg2-bin, unzip, wget, zip, zsh, zlib1g-dev] action upgrade

           ================================================================================
           Error executing action `upgrade` on resource 'apt_package[git, inotify-tools, librsvg2-bin, libxml2-dev, libxslt1-dev, lua5.1, liblua5.1-0-dev, luarocks, mono-complete, mono-devel, pkg-config, python, python-dev, python-pip, python-virtualenv, texlive-fonts-recommended, texlive-latex-base, texlive-latex-extra, texlive-latex-recommended, librsvg2-bin, unzip, wget, zip, zsh, zlib1g-dev]'
           ================================================================================

           Mixlib::ShellOut::ShellCommandFailed
           ------------------------------------
           Expected process to exit with [0], but received '100'
           ---- Begin output of apt-get -q -y install mono-complete=4.2.2.30-0xamarin2 mono-devel=4.2.2.30-0xamarin2 ----
[....]
           WARNING: The following packages cannot be authenticated!
             mono-complete libmono-c5-1.1-cil libmono-cairo4.0-cil
[...]

then i nuked the mono.list file thinking "shitty code, doesn't add the key if the sources file exists" (which i could have seen was the incorrect conclusion to jump to if i'd read the output closer, but its still before noon for me). but then it works:

         * apt_repository[mono] action add
           * execute[install-key 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF] action run (skipped due to not_if)
           * ruby_block[validate-key 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF] action run (skipped due to not_if)
           * file[/var/lib/apt/periodic/update-success-stamp] action nothing (skipped due to action :nothing)
           * execute[apt-cache gencaches] action nothing (skipped due to action :nothing)
           * execute[apt-get update] action nothing (skipped due to action :nothing)
           * file[/etc/apt/sources.list.d/mono.list] action create
             - create new file /etc/apt/sources.list.d/mono.list
             - update content in file /etc/apt/sources.list.d/mono.list from none to efc271
             (diff output suppressed by config)
             - change mode from '' to '0644'
             - change owner from '' to 'root'
             - change group from '' to 'root'
           * file[/var/lib/apt/periodic/update-success-stamp] action delete
             - delete file /var/lib/apt/periodic/update-success-stamp
           * execute[apt-get update] action run
             - execute apt-get update -o Dir::Etc::sourcelist='sources.list.d/mono.list' -o Dir::Etc::sourceparts='-' -o APT::Get::List-Cleanup='0'
           * execute[apt-cache gencaches] action run
             - execute apt-cache gencaches

         * apt_update[grrr] action periodic (up to date)
         * apt_package[git, inotify-tools, librsvg2-bin, libxml2-dev, libxslt1-dev, lua5.1, liblua5.1-0-dev, luarocks, mono-complete, mono-devel, pkg-config, python, python-dev, python-pip, python-virtualenv, texlive-fonts-recommended, texlive-latex-base, texlive-latex-extra, texlive-latex-recommended, librsvg2-bin, unzip, wget, zip, zsh, zlib1g-dev] action upgrade
           - upgrade package mono-complete from 3.2.8+dfsg-4ubuntu1.1 to 4.2.2.30-0xamarin2
           - upgrade package mono-devel from 3.2.8+dfsg-4ubuntu1.1 to 4.2.2.30-0xamarin2

it skips adding the keys, the mono.list didn't change, i just nuked it before running it again. i'm speculating that apt-cache gencaches need to be run or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants