Chocolatey is a package management system for Windows. First, you download and install Chocolatey; it's available at no charge under the Apache 2.0 license. You tell it what software you want, then (usually) answer one or more questions. Chocolatey will then download and silently install the software for you.
I'm trying to better understand how Chocolatey knows what it has already installed. This is in order so that I can understand whether or not interrupting a "chocolatey install" operation can cause Chocolatey to become permanently confused, forever.
Using Chocolatey 0.9.9.8, when I try to install a package (7zip) twice in a row, the first time succeeds and the second time does nothing but print a warning message. The message says:
7zip v9.38 already installed.
Use --force to reinstall, specify a version to install, or try upgrade.
Chocolatey installed 0/1 package(s).
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
I looked into the Chocolatey source code in order to try to find the answer. It looks like the method call which checks whether or not a package is already installed is this one. But I couldn't find the source code for the FindPackage method.
How does Chocolatey know which packages it has already installed? Does it keep a central database somewhere on my machine which keeps track of what it has installed and what it hasn't?