From: Paul J R Date: Sat, 29 Jun 2013 05:36:37 +0000 (+1000) Subject: working on repo maintenance routines X-Git-Url: http://git.pjr.cc/?p=nodejs-repoproxy.git;a=commitdiff_plain;h=3e02ce60811b9dbd3b166fe38058f0a00ab00a2d working on repo maintenance routines --- diff --git a/lib/repo-apt.js b/lib/repo-apt.js index 814f260..f852086 100644 --- a/lib/repo-apt.js +++ b/lib/repo-apt.js @@ -4,6 +4,11 @@ var url = require("url"); var path = require("path"); var log = require("./log.js"); + + +/* + * For APT repos, we expire anything with .* /dist/ .* in thename + */ function maintain(name, repoinfo, files) { //log.debug("doing apt clean for ", repoinfo); diff --git a/lib/repo-yum.js b/lib/repo-yum.js index 38a8f87..a78be2e 100644 --- a/lib/repo-yum.js +++ b/lib/repo-yum.js @@ -86,13 +86,13 @@ function maintain(name, repoinfo, files) { // make sure we have a metadata file for our file - fs.stat(metafile, function(err, stats)) { + fs.stat(metafile, function(err, stats) { if(err) { log.debug("file (%s) has no metadata file - moving for cleanup"); cache.moveToCleanup(files[i]); cache.moveToCleanup(metafile); } - } + }); // check meta data fs.stat(files[i], function(err, stats) {