Skip to content

Commit 46982a6

Browse files
ruhan1jdcasey
authored andcommitted
Add skipVersionTest flag when doing Koji path mask repair (#1210)
1 parent 7a4b3fc commit 46982a6

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

addons/koji/common/src/main/java/org/commonjava/indy/koji/content/KojiPathPatternFormatter.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,17 @@ public class KojiPathPatternFormatter
4545
private final Logger logger = LoggerFactory.getLogger( getClass() );
4646

4747
public Set<String> getPatterns( ArtifactRef artifactRef, List<KojiArchiveInfo> archives )
48+
{
49+
return getPatterns( artifactRef, archives, false );
50+
}
51+
52+
public Set<String> getPatterns( ArtifactRef artifactRef, List<KojiArchiveInfo> archives, boolean skipVersionTest )
4853
{
4954
Set<String> patterns = new HashSet<>();
5055
for ( KojiArchiveInfo a : archives )
5156
{
5257
ArtifactRef ar = a.asArtifact();
53-
if ( !kojiUtils.isVersionSignatureAllowedWithVersion( a.getVersion() ) )
58+
if ( !skipVersionTest && !kojiUtils.isVersionSignatureAllowedWithVersion( a.getVersion() ) )
5459
{
5560
logger.warn(
5661
"Cannot use Koji archive for path_mask_patterns: {}. Version '{}' is not allowed from Koji.", a,

addons/koji/common/src/main/java/org/commonjava/indy/koji/data/KojiRepairManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public KojiRepairResult repairPathMask( KojiRepairRequest request, String user,
228228
}
229229

230230
// set pathMaskPatterns using build output paths
231-
Set<String> patterns = kojiPathFormatter.getPatterns( artifactRef, archives );
231+
Set<String> patterns = kojiPathFormatter.getPatterns( artifactRef, archives, true );
232232
logger.debug( "For repo: {}, resetting path_mask_patterns to:\n\n{}\n\n", store.getKey(),
233233
patterns );
234234

0 commit comments

Comments
 (0)