aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2019-10-30 20:22:19 +0100
committerMiroslav Šulc <fordfrog@gentoo.org>2019-10-30 20:22:30 +0100
commite71822f64bdddf72820cdbda93a3339946a2f9e3 (patch)
tree71a48787be46abdaa8627b5ed65670f856dfa5e2
parentreformatted and improved style (diff)
downloadjava-ebuilder-e71822f64bdddf72820cdbda93a3339946a2f9e3.tar.gz
java-ebuilder-e71822f64bdddf72820cdbda93a3339946a2f9e3.tar.bz2
java-ebuilder-e71822f64bdddf72820cdbda93a3339946a2f9e3.zip
added header to the cache file
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
-rw-r--r--src/main/java/org/gentoo/java/ebuilder/maven/MavenCache.java2
-rw-r--r--src/main/java/org/gentoo/java/ebuilder/portage/PortageParser.java3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/gentoo/java/ebuilder/maven/MavenCache.java b/src/main/java/org/gentoo/java/ebuilder/maven/MavenCache.java
index 9d91528..4772e61 100644
--- a/src/main/java/org/gentoo/java/ebuilder/maven/MavenCache.java
+++ b/src/main/java/org/gentoo/java/ebuilder/maven/MavenCache.java
@@ -112,7 +112,7 @@ public class MavenCache {
line = reader.readLine();
while (line != null) {
- if (!line.isEmpty()) {
+ if (!line.isEmpty() && line.charAt(0) != '#') {
addCacheItem(new CacheItem(line));
}
diff --git a/src/main/java/org/gentoo/java/ebuilder/portage/PortageParser.java b/src/main/java/org/gentoo/java/ebuilder/portage/PortageParser.java
index 095e001..12422c2 100644
--- a/src/main/java/org/gentoo/java/ebuilder/portage/PortageParser.java
+++ b/src/main/java/org/gentoo/java/ebuilder/portage/PortageParser.java
@@ -386,7 +386,8 @@ public class PortageParser {
StandardOpenOption.TRUNCATE_EXISTING),
Charset.forName("UTF-8"))) {
writer.write(CACHE_VERSION);
- writer.write('\n');
+ writer.write("\n#category:pkg:version:slot:useFlag:groupId:"
+ + "artifactId:mavenVersion\n");
for (final CacheItem cacheItem : cacheItems) {
writer.write(cacheItem.getCategory());