forked from artipie/artipie
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: rpm weak dependencies (artipie#1335)
* feat: rpm weak dependencies
- Loading branch information
1 parent
b435492
commit 3849ca9
Showing
11 changed files
with
383 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
rpm-adapter/src/main/java/com/artipie/rpm/pkg/DependencySection.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
/* | ||
* The MIT License (MIT) Copyright (c) 2020-2023 artipie.com | ||
* https://github.com/artipie/artipie/blob/master/LICENSE.txt | ||
*/ | ||
package com.artipie.rpm.pkg; | ||
|
||
import org.redline_rpm.header.AbstractHeader; | ||
|
||
/** | ||
* Rpm package dependency section. | ||
* <a href="https://rpm-software-management.github.io/rpm/manual/tags.html">Tags</a>. | ||
* <a href="https://rpm-software-management.github.io/rpm/manual/dependencies.html">Deps</a>. | ||
* @since 1.11 | ||
*/ | ||
public final class DependencySection { | ||
|
||
/** | ||
* Xml-section name. | ||
*/ | ||
private final String name; | ||
|
||
/** | ||
* Tag for names. | ||
*/ | ||
private final AbstractHeader.Tag names; | ||
|
||
/** | ||
* Tag for versions. | ||
*/ | ||
private final AbstractHeader.Tag versions; | ||
|
||
/** | ||
* Tag for flags. | ||
*/ | ||
private final AbstractHeader.Tag flags; | ||
|
||
/** | ||
* Ctor. | ||
* @param name Xml-section name | ||
* @param names Tag for names | ||
* @param versions Tag for versions | ||
* @param flags Tag for flags | ||
* @checkstyle ParameterNumberCheck (10 lines) | ||
*/ | ||
public DependencySection( | ||
final String name, final AbstractHeader.Tag names, final AbstractHeader.Tag versions, | ||
final AbstractHeader.Tag flags | ||
) { | ||
this.name = name; | ||
this.names = names; | ||
this.versions = versions; | ||
this.flags = flags; | ||
} | ||
|
||
/** | ||
* Xml-section name. | ||
* @return String name for xml | ||
*/ | ||
public String xmlName() { | ||
return this.name; | ||
} | ||
|
||
/** | ||
* Tag for names. | ||
* @return Rpm tag to get deps names | ||
*/ | ||
public AbstractHeader.Tag tagForNames() { | ||
return this.names; | ||
} | ||
|
||
/** | ||
* Tag for versions. | ||
* @return Rpm tag to get deps versions | ||
*/ | ||
public AbstractHeader.Tag tagForVersions() { | ||
return this.versions; | ||
} | ||
|
||
/** | ||
* Tag for flags. | ||
* @return Rpm tag to get deps flags | ||
*/ | ||
public AbstractHeader.Tag tagForFlags() { | ||
return this.flags; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.