From e71822f64bdddf72820cdbda93a3339946a2f9e3 Mon Sep 17 00:00:00 2001 From: Miroslav Šulc Date: Wed, 30 Oct 2019 20:22:19 +0100 Subject: added header to the cache file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miroslav Šulc --- src/main/java/org/gentoo/java/ebuilder/maven/MavenCache.java | 2 +- src/main/java/org/gentoo/java/ebuilder/portage/PortageParser.java | 3 ++- 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()); -- cgit v1.2.3-65-gdbad