#
# wirklich. wirklich. wirklich.
#
-#
# mehr kommentare waeren auch gut. wirklich gut.
# import standards
-import atexit
import datetime
-import errno
import fileinput
import fnmatch
import git
import subprocess
import sys
import time
-import urllib
from ConfigParser import SafeConfigParser
-from ftplib import FTP
-from glob import glob
from multiprocessing import cpu_count
# import local modules
from cidb import *
from common_code import *
from db_add import *
+from lib import dput
from lib import git_buildpackage
from lib import git_helper
)
DPUT_OPTIONS_DEFAULT = {
- 'fqdn': 'alexandria.pb.local',
- 'method': 'scp',
- 'login': 'reprepro',
- 'incoming': '/srv/profitbricks-repository/incoming/profitbricks',
- 'allow_unsigned_uploads': 1,
- 'post_upload_command': 'ssh reprepro@alexandria.pb.local /srv/profitbricks-repository/bin/pb_processincoming',
- }
+ # FIXME: i went to lib/dput.py
DPUT_OPTIONS_DEV = {
'fqdn': 'alexandria.pb.local',
'method': 'scp',
def dput_package_upload(changes_path):
- try:
- cmd = [BIN_DPUT,
- '-c',
- '%s' %(DPUT_CF),
- '--no-upload-log',
- 'profitbricks',
- '%s' %(changes_path),
- ]
-
- logger.debug( 'Trying to execute: "%s"' %(cmd))
- cmd_obj = subprocess.Popen(
- cmd,
- shell=False,
- stdout=sys.stdout,
- stderr=subprocess.STDOUT,
- close_fds=True,
- cwd=os.path.dirname(DPUT_CF)
- )
- result = cmd_obj.wait()
- logger.debug('Exit status: %d' %( result ))
-
- if not result:
- raise Exception(message)
-
- except Exception, error:
- logger.exception('%s' %(error))
-
- return True
+ # FIXME: i went to lib/dput.py
def create_dput_cfg():
- fh = open(DPUT_CF, 'w')
- config = SafeConfigParser()
- config.add_section('profitbricks')
- for option, value in DPUT_OPTIONS.iteritems():
- config.set('profitbricks', '%s' %(option), '%s' %(value))
- config.write(fh)
- fh.close()
- return True
-
+ # FIXME: i went to lib/dput.py
def getopts():
usage = '%prog [options]'