Skip to content

Commit

Permalink
Use caching-rpm-lockfile-prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
staticf0x committed Nov 20, 2024
1 parent b7fbcb1 commit b6a178f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/modules/manager/rpm/artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export async function updateArtifacts({
logger.debug(`rpm.updateArtifacts(${packageFileName})`);
const extension = packageFileName.split('.').pop();
const lockFileName = `rpms.lock.${extension}`;
const outputName = 'rpms.lock.tmp.yaml';

logger.debug(`RPM lock file: ${lockFileName}`);

Expand All @@ -26,15 +27,15 @@ export async function updateArtifacts({
try {
await deleteLocalFile(lockFileName);

cmd.push(`rpm-lockfile-prototype ${packageFileName}`);
cmd.push(`caching-rpm-lockfile-prototype ${packageFileName} --outfile ${outputName}`);

const execOptions: ExecOptions = {
cwdFile: packageFileName,
};

await exec(cmd, execOptions);

const newLockFileContent = await readLocalFile(lockFileName, 'utf8');
const newLockFileContent = await readLocalFile(outputName, 'utf8');

if (existingLockFileContent === newLockFileContent) {
logger.debug(`${lockFileName} is unchanged`);
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/manager/rpm/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async function getUpdatedLockfile(): Promise<void> {
return;
}

cmd.push(`rpm-lockfile-prototype ${packageFileName} --outfile ${outputName}`);
cmd.push(`caching-rpm-lockfile-prototype ${packageFileName} --outfile ${outputName}`);

const execOptions: ExecOptions = {
cwdFile: packageFileName,
Expand Down

0 comments on commit b6a178f

Please sign in to comment.