From 100970b35ed77a8f617a7071aba2618e038923ba Mon Sep 17 00:00:00 2001 From: Joshua Haase Date: Mon, 7 Feb 2011 16:51:06 -0800 Subject: Use free repo on new location --- pato2.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pato2.py b/pato2.py index cf40809..9cbd3cb 100644 --- a/pato2.py +++ b/pato2.py @@ -40,6 +40,7 @@ mirrorpath = "::mirrors/archlinux" # Directories and files ## Optionals path = home + "/parabolagnulinux.org" +free_path = path + "/free/" docs = path + "/docs" logdir = path + "/log" ## Must be defined @@ -56,7 +57,7 @@ other = ("any",) # Output output = True -verbose = False +verbose = True # Files blacklist = docs + "/blacklist.txt" @@ -180,11 +181,11 @@ def add_free_repo(verbose_=verbose): for repo_ in repo_list: for arch_ in arch_list: lista_=list() - for file_ in glob(repodir + "/free/" + repo_ + "/os/" + arch_ + "/*"): + for file_ in glob(free_path + repo_ + "/os/" + arch_ + "/*"): lista_.append(file_) link(repo_,arch_,file_) for dir_ in other: - for file_ in glob(repodir + "/free/" + repo_ + "/os/" + dir_ + "/*"): + for file_ in glob(free_path + repo_ + "/os/" + dir_ + "/*"): lista_.append(file_) link(repo_,arch_,file_) if lista_: -- cgit v1.1-4-g5e80 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 From 317c0b412642b5268e8408f9d87e19261370cd32 Mon Sep 17 00:00:00 2001 From: Parabola Date: Mon, 7 Feb 2011 18:25:37 -0800 Subject: fixed errors --- config.py | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 config.py diff --git a/config.py b/config.py new file mode 100644 index 0000000..9889c3f --- /dev/null +++ b/config.py @@ -0,0 +1,41 @@ + +#!/usr/bin/python +# -*- coding: utf-8 -*- +from user import home +import commands + +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" +docs = path + "/docs" +logdir = path + "/log" + +## Must be defined +logname= logdir + "/" + time__ + "-repo-maintainer.log" +repodir= path + "/repo" +tmp = home + "/tmp" +archdb = tmp + "/db" +free_path= path + "/free/" + +# 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 = False + +# Files +blacklist = docs + "/blacklist.txt" +whitelist = docs + "/whitelist.txt" +pending = docs + "/pending" +rsyncBlacklist = docs + "/rsyncBlacklist" -- cgit v1.1-4-g5e80