Exemplo n.º 1
0
  print "Failed security check"

print "Building", release ,package
file_list = dpkg.get_files_list(package)
pck_files = list()
dsc_file = None
orig_file = None
for file in file_list:
  if file[4].find('.dsc') != -1: dsc_file = file[4]
  if file[4].find('orig.tar.gz') != -1: orig_file = file[4]
  pck_files.append(file[4])
if not dsc_file:
  print "ERROR: Package without a .dsc file"
  sys.exit(2)
if not orig_file:
  orig_file = dpkg.getOrigTarGzName(package)
  if not os.path.exists(prebuilddir+"/"+release+"/"+orig_file):
    print "ERROR: Package without a .orig.tar.gz file"
    sys.exit(2)
  else:
    pck_files.append(orig_file)

base_dir = os.path.dirname(package)
pck_files.append(os.path.basename(package))
for file in pck_files:
  print "Copying", base_dir+"/"+file,"to", build_dir
  shutil.copyfile(base_dir+"/"+file, build_dir+"/"+file)
os.chdir(build_dir)
pck_basename=dsc_file.replace('.dsc','')
log_name=pck_basename+datetime.datetime.now().strftime("_%Y_%M_%d_%m_%s_i386.log")
log_name_i386=log_name
Exemplo n.º 2
0
if not os.path.exists(package):
  print "File "+package+" not found"
  sys.exit(3)

#base_dir = os.path.dirname(package) or '.'
package_name = os.path.basename(package)
package_name_orig = package_name
package_name = package_name.replace(".dsc", "")

file_list = list()

for file in glob.glob(package_name+'_*.changes'):
  for file2 in dpkg.get_files_list(file):
    file_list.append(file2[4])
  file_list.append(file)
  file_list.append(dpkg.getOrigTarGzName(file))

file_list = uniq(file_list)
print "Debian source control",package_name_orig,"contains",len(file_list),"file(s)"

#print package_name+" - Moving "+`len(file_list)`+" file(s)"
for file in file_list:
  if not os.path.exists(file):
	print "Unable to find",file
        sys.exit(4)
  print file
print "Moving files to", ready_dir+release

for file in file_list:
	shutil.move(file, ready_dir+release+"/"+file)
Exemplo n.º 3
0
    print "Failed security check"

print "Building", release, package
file_list = dpkg.get_files_list(package)
pck_files = list()
dsc_file = None
orig_file = None
for file in file_list:
    if file[4].find('.dsc') != -1: dsc_file = file[4]
    if file[4].find('orig.tar.gz') != -1: orig_file = file[4]
    pck_files.append(file[4])
if not dsc_file:
    print "ERROR: Package without a .dsc file"
    sys.exit(2)
if not orig_file:
    orig_file = dpkg.getOrigTarGzName(package)
    if not os.path.exists(prebuilddir + "/" + release + "/" + orig_file):
        print "ERROR: Package without a .orig.tar.gz file"
        sys.exit(2)
    else:
        pck_files.append(orig_file)

base_dir = os.path.dirname(package)
pck_files.append(os.path.basename(package))
for file in pck_files:
    print "Copying", base_dir + "/" + file, "to", build_dir
    shutil.copyfile(base_dir + "/" + file, build_dir + "/" + file)
os.chdir(build_dir)
pck_basename = dsc_file.replace('.dsc', '')
log_name = pck_basename + datetime.datetime.now().strftime(
    "_%Y_%M_%d_%m_%s_i386.log")
Exemplo n.º 4
0
if not os.path.exists(package):
    print "File " + package + " not found"
    sys.exit(3)

#base_dir = os.path.dirname(package) or '.'
package_name = os.path.basename(package)
package_name_orig = package_name
package_name = package_name.replace(".dsc", "")

file_list = list()

for file in glob.glob(package_name + '_*.changes'):
    for file2 in dpkg.get_files_list(file):
        file_list.append(file2[4])
    file_list.append(file)
    file_list.append(dpkg.getOrigTarGzName(file))

file_list = uniq(file_list)
print "Debian source control", package_name_orig, "contains", len(
    file_list), "file(s)"

#print package_name+" - Moving "+`len(file_list)`+" file(s)"
for file in file_list:
    if not os.path.exists(file):
        print "Unable to find", file
        sys.exit(4)
    print file
print "Moving files to", ready_dir + release

for file in file_list:
    shutil.move(file, ready_dir + release + "/" + file)