fixed bug in package parser (wrong length of .PKGINFO file was used)
This commit is contained in:
109
jpacrepo.iml
109
jpacrepo.iml
@@ -1,109 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module external.linked.project.id="jpacrepo" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="org.jpacrepo" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
|
|
||||||
<component name="NewModuleRootManager" inherit-compiler-output="false">
|
|
||||||
<output url="file://$MODULE_DIR$/build/classes/main" />
|
|
||||||
<output-test url="file://$MODULE_DIR$/build/classes/test" />
|
|
||||||
<exclude-output />
|
|
||||||
<content url="file://$MODULE_DIR$">
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build" />
|
|
||||||
</content>
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
<orderEntry type="module-library" scope="TEST">
|
|
||||||
<library name="Gradle: jboss-client">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar:///opt/wildfly/bin/client/jboss-client.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC />
|
|
||||||
<SOURCES />
|
|
||||||
</library>
|
|
||||||
</orderEntry>
|
|
||||||
<orderEntry type="library" name="Gradle: org.apache.commons:commons-compress:1.9" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: org.tukaani:xz:1.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: javax:javaee-api:7.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: commons-io:commons-io:2.4" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: commons-codec:commons-codec:1.10" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: org.projectlombok:lombok:1.16.4" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: commons-fileupload:commons-fileupload:1.3.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: org.ops4j.orient:orient-ra-api:0.3.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.sun.mail:javax.mail:1.5.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.orientechnologies:orientdb-object:2.0.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.orientechnologies:orientdb-graphdb:2.0.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: javax.activation:activation:1.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.orientechnologies:orientdb-core:2.0.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.orientechnologies:orientdb-server:2.0.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.orientechnologies:orientdb-tools:2.0.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.tinkerpop.blueprints:blueprints-core:2.6.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.tinkerpop.gremlin:gremlin-java:2.6.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.tinkerpop.gremlin:gremlin-groovy:2.6.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: org.xerial.snappy:snappy-java:1.1.0.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: net.java.dev.jna:jna:4.0.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: net.java.dev.jna:jna-platform:4.0.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.orientechnologies:orientdb-client:2.0.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: javax.mail:mail:1.4" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: org.codehaus.jettison:jettison:1.3.3" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.fasterxml.jackson.core:jackson-databind:2.2.3" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.carrotsearch:hppc:0.6.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: commons-configuration:commons-configuration:1.6" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: commons-logging:commons-logging:1.1.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.tinkerpop:pipes:2.6.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: org.apache.ivy:ivy:2.3.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: org.codehaus.groovy:groovy:1.8.9" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: org.apache.ant:ant:1.8.3" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: org.fusesource.jansi:jansi:1.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: jline:jline:0.9.94" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.orientechnologies:orientdb-enterprise:2.0.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.0.Final" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: org.javassist:javassist:3.16.1-GA" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: stax:stax-api:1.0.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.fasterxml.jackson.core:jackson-annotations:2.2.3" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.fasterxml.jackson.core:jackson-core:2.2.3" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: commons-collections:commons-collections:3.2.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: commons-lang:commons-lang:2.4" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: commons-digester:commons-digester:1.8" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: commons-beanutils:commons-beanutils-core:1.8.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: antlr:antlr:2.7.7" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: asm:asm:3.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: asm:asm-commons:3.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: asm:asm-util:3.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: asm:asm-analysis:3.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: asm:asm-tree:3.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: org.apache.ant:ant-launcher:1.8.3" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: commons-beanutils:commons-beanutils:1.7.0" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: junit:junit:4.11" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: com.thoughtworks.xstream:xstream:1.4.8" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: org.jboss.resteasy:resteasy-jaxrs:3.0.11.Final" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: org.jboss.resteasy:resteasy-client:3.0.11.Final" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: org.jboss.resteasy:resteasy-jackson-provider:3.0.11.Final" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: org.jboss.resteasy:resteasy-jaxb-provider:3.0.11.Final" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: org.hamcrest:hamcrest-core:1.3" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: xmlpull:xmlpull:1.1.3.1" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: xpp3:xpp3_min:1.1.4c" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: org.jboss.resteasy:jaxrs-api:3.0.11.Final" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: org.jboss.spec.javax.annotation:jboss-annotations-api_1.1_spec:1.0.1.Final" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: org.apache.httpcomponents:httpclient:4.2.6" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: net.jcip:jcip-annotations:1.0" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: org.codehaus.jackson:jackson-core-asl:1.9.12" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: org.codehaus.jackson:jackson-mapper-asl:1.9.12" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: org.codehaus.jackson:jackson-jaxrs:1.9.12" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: org.codehaus.jackson:jackson-xc:1.9.12" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: com.sun.xml.bind:jaxb-impl:2.2.7" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: org.apache.httpcomponents:httpcore:4.2.5" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: com.sun.xml.bind:jaxb-core:2.2.7" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: com.sun.xml.fastinfoset:FastInfoset:1.2.12" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: javax.xml.bind:jaxb-api:2.2.7" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: com.sun.istack:istack-commons-runtime:2.16" level="project" />
|
|
||||||
<orderEntry type="library" scope="TEST" name="Gradle: javax.xml.bind:jsr173_api:1.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: eu.webtoolkit:jwt:3.3.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: org.apache.commons:commons-io:1.3.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: org.slf4j:slf4j-simple:1.6.4" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: org.slf4j:slf4j-api:1.6.4" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: java3d:vecmath:1.5.2" level="project" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
@@ -110,7 +110,7 @@ public class JPacRepoApp extends WApplication
|
|||||||
previousItem.clicked().addListener(this, () ->
|
previousItem.clicked().addListener(this, () ->
|
||||||
{
|
{
|
||||||
int newIndex = pageMenu.getCurrentIndex() - 1;
|
int newIndex = pageMenu.getCurrentIndex() - 1;
|
||||||
if(newIndex>=0)
|
if (newIndex >= 0)
|
||||||
{
|
{
|
||||||
pageMenu.select(newIndex);
|
pageMenu.select(newIndex);
|
||||||
pageMenu.itemAt(newIndex).clicked().trigger(new WMouseEvent());
|
pageMenu.itemAt(newIndex).clicked().trigger(new WMouseEvent());
|
||||||
@@ -120,7 +120,7 @@ public class JPacRepoApp extends WApplication
|
|||||||
nextItem.clicked().addListener(this, () ->
|
nextItem.clicked().addListener(this, () ->
|
||||||
{
|
{
|
||||||
int newIndex = pageMenu.getCurrentIndex() + 1;
|
int newIndex = pageMenu.getCurrentIndex() + 1;
|
||||||
if(newIndex<pageMenu.getCount())
|
if (newIndex < pageMenu.getCount())
|
||||||
{
|
{
|
||||||
pageMenu.select(newIndex);
|
pageMenu.select(newIndex);
|
||||||
pageMenu.itemAt(newIndex).clicked().trigger(new WMouseEvent());
|
pageMenu.itemAt(newIndex).clicked().trigger(new WMouseEvent());
|
||||||
@@ -156,7 +156,7 @@ public class JPacRepoApp extends WApplication
|
|||||||
|
|
||||||
packageNameEdit.blurred().addListener(this, () ->
|
packageNameEdit.blurred().addListener(this, () ->
|
||||||
{
|
{
|
||||||
if(!packageNameEdit.getDisplayText().equals(lastName))
|
if (!packageNameEdit.getDisplayText().equals(lastName))
|
||||||
{
|
{
|
||||||
lastName = packageNameEdit.getDisplayText();
|
lastName = packageNameEdit.getDisplayText();
|
||||||
Map<String, String> predicateMap = new HashMap<>();
|
Map<String, String> predicateMap = new HashMap<>();
|
||||||
@@ -207,7 +207,7 @@ public class JPacRepoApp extends WApplication
|
|||||||
.generateReplacerJS(contactOptions), parent);
|
.generateReplacerJS(contactOptions), parent);
|
||||||
popup.forEdit(linkedFormWidget, EnumSet.of(WSuggestionPopup.PopupTrigger.Editing, WSuggestionPopup.PopupTrigger.DropDownIcon));
|
popup.forEdit(linkedFormWidget, EnumSet.of(WSuggestionPopup.PopupTrigger.Editing, WSuggestionPopup.PopupTrigger.DropDownIcon));
|
||||||
List<WString> wstrings = new ArrayList<>();
|
List<WString> wstrings = new ArrayList<>();
|
||||||
for(String suggestion :suggestions)
|
for (String suggestion : suggestions)
|
||||||
{
|
{
|
||||||
wstrings.add(new WString(suggestion));
|
wstrings.add(new WString(suggestion));
|
||||||
// popup.addSuggestion(suggestion);
|
// popup.addSuggestion(suggestion);
|
||||||
|
@@ -36,30 +36,30 @@ public class Parser
|
|||||||
if(ae.getName().equals(".PKGINFO"))
|
if(ae.getName().equals(".PKGINFO"))
|
||||||
{
|
{
|
||||||
Map<String, List<String>> propMap = new HashMap<>();
|
Map<String, List<String>> propMap = new HashMap<>();
|
||||||
byte[] buffer = new byte[tais.getRecordSize()];
|
byte[] buffer = new byte[(int)tais.getCurrentEntry().getSize()];
|
||||||
tais.read(buffer);
|
tais.read(buffer);
|
||||||
String info = new String(buffer, Charset.forName("UTF8"));
|
String info = new String(buffer, Charset.forName("UTF8"));
|
||||||
for(String line : info.split("\n"))
|
for(String line : info.split("\n"))
|
||||||
{
|
{
|
||||||
if(line.startsWith("#"))
|
if(line.startsWith("#") || line.trim().length() == 0)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
String[] pair = line.split(" = ");
|
int equals = line.indexOf("=");
|
||||||
if(pair.length > 2)
|
if(equals < 0)
|
||||||
{
|
{
|
||||||
throw new RuntimeException("Error parsing .PKGINFO file");
|
throw new RuntimeException("Error parsing .PKGINFO file");
|
||||||
}
|
}
|
||||||
else if(pair.length == 2)
|
else
|
||||||
{
|
{
|
||||||
String key = pair[0].trim();
|
String key = line.substring(0, equals).trim();
|
||||||
if(propMap.get(key) == null)
|
if(propMap.get(key) == null)
|
||||||
{
|
{
|
||||||
propMap.put(key, new ArrayList<>());
|
propMap.put(key, new ArrayList<>());
|
||||||
}
|
}
|
||||||
propMap.get(key).add(pair[1].trim());
|
propMap.get(key).add(line.substring(equals+1, line.length()).trim());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -36,7 +36,7 @@ public class ParseTest
|
|||||||
@Test
|
@Test
|
||||||
public void parseTest() throws Exception
|
public void parseTest() throws Exception
|
||||||
{
|
{
|
||||||
String[] files = new String[]{"/var/cache/pacman/pkg/mesa-10.4.5-1-x86_64.pkg.tar.xz", "/var/cache/pacman/pkg/mesa-10.5.3-1-x86_64.pkg.tar.xz"};
|
String[] files = new String[]{"/home/walter/Scaricati/oh-my-zsh-git-3912.d310fac-1-any.pkg.tar.xz"};
|
||||||
|
|
||||||
for (String file : files)
|
for (String file : files)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user