Skip to content

Commit

Permalink
Ignore %config flag where not supported
Browse files Browse the repository at this point in the history
%config is only allowed for regular files and links. While rpmbuild won't
produce package with other files with %config other tools might. Handle
these cases gracefully by ignoring the %config flag.

Resolves: rpm-software-management#2890
  • Loading branch information
ffesti committed Feb 13, 2024
1 parent 34cb5ee commit abcd60f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/rpmfi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1170,11 +1170,10 @@ int rpmfilesConfigConflict(rpmfiles fi, int ix)
if (!(flags & RPMFILE_CONFIG))
return 0;

/* Only links and regular files can be %config, this is kinda moot */
/* XXX: Why are we returning 1 here? */
/* Only links and regular files can be %config */
newWhat = rpmfiWhatis(rpmfilesFMode(fi, ix));
if (newWhat != LINK && newWhat != REG)
return 1;
return 0;

/* If it's not on disk, there's nothing to be saved */
fn = rpmfilesFN(fi, ix);
Expand Down

0 comments on commit abcd60f

Please sign in to comment.