<CONTEXT>if(nextPkg != null) {final byte[] dir = context.repo.pkgDict().get(nextPkg);if(eq(Package.getName(nextPkg), token(pkg)) || eq(dir, token(pkg))) {</BUG>final byte[] primPkg = getPrimary(nextPkg, ii);if(primPkg == null) {<extra_id_0>final byte[] primPkg = getPrimary(nextPkg, ii);if(primPkg == null) {<BUG>cleanRepo(nextPkg, dir, ii);deletePkg(new File(context.prop.get(Prop.REPOPATH), string(dir)),ii);} else {</BUG>PKGDEP.thrw(ii, string(primPkg), pkg);</CONTEXT>
final byte[] dir = ctx.repo.pkgDict().get(nextPkg);if(eq(Package.getName(nextPkg), token(pkg)) || eq(dir, token(pkg))) {final File f = new File(ctx.prop.get(Prop.REPOPATH), string(dir));final File desc = new File(f, DESCRIPTOR);ctx.repo.remove(new PkgParser(ctx, ii).parse(new IOFile(desc)));deleteFromDisc(f, ii);} else {