Permalink
Browse files

Downloading from the meatshop works now (temporary servers, though)

  • Loading branch information...
1 parent a632dd5 commit 942018f20948a3f4e5b02b37791f67fbd84a5dad @fredreichbier committed Jan 17, 2012
@@ -264,7 +264,7 @@ App: class {
checksums := null as Checksums
if(archiveFile != null)
checksums = createChecksums(archiveFile)
- nirvana submitUsefile(slug, "" /* TODO */, usefile, checksums)
+ nirvana submitUsefile(slug, "src" /* TODO */, usefile, checksums)
/* do we have an archive? if yes, submit it, too */
if(archiveFile != null)
mirrors submitPackage(slug, usefile get("Version"), usefile get("Variant"), archiveFile)
@@ -78,16 +78,16 @@ Config: class {
/* create defaults. */
defaults := FixedEntity new(null)
_mirrors: MirrorList = MirrorList new()
- _mirrors add("http://meatshop.ooc-lang.org/meat/")
+ _mirrors add("http://meatshop.reichbier.de/")
_exts: ExtList = ExtList new()
_exts add("tar.xz") .add("tar.gz") .add("tar.bz2")
- defaults addValue("Nirvana.APITemplate", "http://127.0.0.1:8000/api%s") \
- .addValue("Nirvana.UsefileTemplate", "http://127.0.0.1:8000%s") \
+ defaults addValue("Nirvana.APITemplate", "http://nirvana.reichbier.de/api%s") \
+ .addValue("Nirvana.UsefileTemplate", "http://nirvana.reichbier.de%s") \
.addValue("Nirvana.User", "") \
.addValue("Nirvana.Token", "") \
.addValue("Nirvana.DefaultVariant", "src") \
.addValue("Meatshop.Mirrors", _mirrors) \
- .addValue("Meatshop.SuperMirror", "http://meatshop.ooc-lang.org") \
+ .addValue("Meatshop.SuperMirror", "http://meatshop.reichbier.de") \
.addValue("Meatshop.RelativeFilenameScheme", "/{{ package }}/{{ version }}/{{ variant }}/{{ package }}-{{ version }}-{{ variant }}.{{ type }}") \
.addValue("Meatshop.SuperMirrorSubmit", "%s/submit") \
.addValue("Meatshop.FileTypes", _exts) \
@@ -35,7 +35,7 @@ GPG: class {
verify: func (signature: String, file: File) -> Bool {
args := commonArgs clone()
- args add("--verify") .add(file path) .add("-")
+ args add("--verify") .add(file getPath()) .add("-")
proc := Process new(args)
proc setStdin(Pipe new())
proc executeNoWait()
@@ -71,7 +71,6 @@ Mirrors: class {
init: func (=app) {}
download: func (package, ver, variant: String) -> String { // TODO TODO TODO TODO TODO
- /*
mirrorList := app config get("Meatshop.Mirrors", MirrorList)
scheme := app config get("Meatshop.RelativeFilenameScheme", String)
map := HashMap<String, String> new()
@@ -97,8 +96,7 @@ Mirrors: class {
}
}
Exception new(This, "Couldn't download %s=%s/%s from the meatshop." format(package, ver, variant)) throw()
- null*/
- ""
+ null
}
/** submit the package to the super mirror. */
@@ -124,6 +122,7 @@ Mirrors: class {
.put("ext", ext) \
.put("user", user) \
.put("token", token)
+ for(k: String in post getKeys()) { "%s => %s" printfln(k, post[k]) }
formData := FormData new(post)
formData addFieldFile("archive", archiveFile path)
/* finally, do the request. */
@@ -21,7 +21,7 @@ Net: class {
downloadString: static func (url: String) -> String {
request := HTTPRequest new(url)
_performRequest(request)
- request getString()
+ request getString()
}
_performRequest: static func (request: HTTPRequest) {

0 comments on commit 942018f

Please sign in to comment.