Document when --enablerepo is necessary
@@ -102,6 +102,8 @@ public class Yum {
if (!alreadyLocked) {
CommandLine commandLine = terminal.newCommandLine(context).add("yum", "versionlock", "add");
+ // If the targetVersionLockName refers to a package in a by-default-disabled repo,
+ // we must enable the repo unless targetVersionLockName is already installed.
for (String repo : repos) commandLine.add("--enablerepo=" + repo);
commandLine.add(targetVersionLockName).execute();
modified = true;
