From 8c4813edd80c08e03c70ada2cb46a3597e493aaf Mon Sep 17 00:00:00 2001 From: Parabola Date: Mon, 7 Feb 2011 16:54:47 -0800 Subject: 'Configuration out of pato' --- pato2.py | 40 ++-------------------------------------- 1 file changed, 2 insertions(+), 38 deletions(-) diff --git a/pato2.py b/pato2.py index 9cbd3cb..dd32403 100644 --- a/pato2.py +++ b/pato2.py @@ -24,48 +24,12 @@ """ +from repm.config import * import tarfile, commands from glob import glob from user import home from os.path import isdir, isfile, realpath -# ---------- Config Variables Start Here ---------- # - -time__ = commands.getoutput("date +%Y%m%d-%H:%M") - -# Mirror Parameters -mirror = "mirrors.eu.kernel.org" -mirrorpath = "::mirrors/archlinux" - -# Directories and files -## Optionals -path = home + "/parabolagnulinux.org" -free_path = path + "/free/" -docs = path + "/docs" -logdir = path + "/log" -## Must be defined -logname= logdir + "/" + time__ + "-repo-maintainer.log" -repodir= path + "/repo" -tmp = home + "/tmp" -archdb = tmp + "/db" - -# Repo, arch, and other folders to use for repo -repo_list = ("core", "extra", "community", "testing", "community-testing", "multilib") -dir_list = ("pool","sources") -arch_list = ("i686", "x86_64") -other = ("any",) - -# Output -output = True -verbose = True - -# Files -blacklist = docs + "/blacklist.txt" -whitelist = docs + "/whitelist.txt" -pending = docs + "/pending" -rsyncBlacklist = docs + "/rsyncBlacklist" - -# ---------- Config Variables End Here---------- # def printf(text,output_=output): """Guarda el texto en la variable log y puede imprimir en pantalla.""" @@ -172,7 +136,7 @@ def remove_from_blacklist(repo_,arch_,info_,blacklist_): def link(repo_,arch_,file_): """ Makes a link in the repo for the package """ - cmd_="ln -sf " + file_ + " " + repodir + "/" + repo_ + "/os/" + arch_ + cmd_="ln -f " + file_ + " " + repodir + "/" + repo_ + "/os/" + arch_ a=commands.getoutput(cmd_) if verbose: printf(cmd_ + a) -- cgit v1.1-4-g5e80