-import commands, os, pg, stat, string, sys, time
-import dak.lib.database, dak.lib.utils
+import commands, os, pg, stat, sys, time
filename = filename.replace('potato-proposed-updates', 'proposed-updates')
if os.path.isfile(filename) and not os.path.islink(filename) and not db_files.has_key(filename) and not excluded.has_key(filename):
waste += os.stat(filename)[stat.ST_SIZE]
filename = filename.replace('potato-proposed-updates', 'proposed-updates')
if os.path.isfile(filename) and not os.path.islink(filename) and not db_files.has_key(filename) and not excluded.has_key(filename):
waste += os.stat(filename)[stat.ST_SIZE]
- q = projectB.query("SELECT l.path, f.filename FROM files f, location l WHERE f.location = l.id")
+ q = projectB.query("SELECT l.path, f.filename, f.last_used FROM files f, location l WHERE f.location = l.id ORDER BY l.path, f.filename")
db_files.clear()
for i in ql:
filename = os.path.abspath(i[0] + i[1])
db_files[filename] = ""
if os.access(filename, os.R_OK) == 0:
db_files.clear()
for i in ql:
filename = os.path.abspath(i[0] + i[1])
db_files[filename] = ""
if os.access(filename, os.R_OK) == 0:
continue
component = component.lower()
list_filename = '%s%s_%s_source.list' % (Cnf["Dir::Lists"], suite, component)
continue
component = component.lower()
list_filename = '%s%s_%s_source.list' % (Cnf["Dir::Lists"], suite, component)
- dak.lib.utils.parse_changes(file, signing_rules=1)
- except dak.lib.utils.invalid_dsc_format_exc, line:
- dak.lib.utils.warn("syntax error in .dsc file '%s', line %s." % (file, line))
+ daklib.utils.parse_changes(file, signing_rules=1)
+ except daklib.utils.invalid_dsc_format_exc, line:
+ daklib.utils.warn("syntax error in .dsc file '%s', line %s." % (file, line))
q = projectB.query("""
SELECT DISTINCT b.package FROM binaries b, bin_associations ba
WHERE b.id = ba.bin AND ba.suite = %s AND NOT EXISTS
q = projectB.query("""
SELECT DISTINCT b.package FROM binaries b, bin_associations ba
WHERE b.id = ba.bin AND ba.suite = %s AND NOT EXISTS
- dak.lib.utils.warn("**WARNING** md5sum mismatch for '%s' ('%s' [current] vs. '%s' [db])." % (filename, md5sum, db_md5sum))
+ daklib.utils.warn("**WARNING** md5sum mismatch for '%s' ('%s' [current] vs. '%s' [db])." % (filename, md5sum, db_md5sum))
- dak.lib.utils.warn("**WARNING** size mismatch for '%s' ('%s' [current] vs. '%s' [db])." % (filename, size, db_size))
+ daklib.utils.warn("**WARNING** size mismatch for '%s' ('%s' [current] vs. '%s' [db])." % (filename, size, db_size))
for i in ql:
filename = os.path.abspath(i[0] + i[1])
if os.access(filename, os.R_OK):
for i in ql:
filename = os.path.abspath(i[0] + i[1])
if os.access(filename, os.R_OK):
current_file = filename
sys.stderr.write("Processing %s.\n" % (filename))
apt_inst.debExtract(file,Ent,"control.tar.gz")
current_file = filename
sys.stderr.write("Processing %s.\n" % (filename))
apt_inst.debExtract(file,Ent,"control.tar.gz")
- dak.lib.utils.fubar("error parsing .dsc file '%s'." % (filename))
- dsc_files = dak.lib.utils.build_file_list(dsc, is_a_dsc=1)
+ daklib.utils.fubar("error parsing .dsc file '%s'." % (filename))
+ dsc_files = daklib.utils.build_file_list(dsc, is_a_dsc=1)
filename = "%s/dists/%s/%s/source/Sources.gz" % (Cnf["Dir::Root"], suite, component)
print "Processing %s..." % (filename)
# apt_pkg.ParseTagFile needs a real file handle and can't handle a GzipFile instance...
filename = "%s/dists/%s/%s/source/Sources.gz" % (Cnf["Dir::Root"], suite, component)
print "Processing %s..." % (filename)
# apt_pkg.ParseTagFile needs a real file handle and can't handle a GzipFile instance...
(result, output) = commands.getstatusoutput("gunzip -c %s > %s" % (filename, temp_filename))
if (result != 0):
sys.stderr.write("Gunzip invocation failed!\n%s\n" % (output))
sys.exit(result)
(result, output) = commands.getstatusoutput("gunzip -c %s > %s" % (filename, temp_filename))
if (result != 0):
sys.stderr.write("Gunzip invocation failed!\n%s\n" % (output))
sys.exit(result)
pool_filename = "%s/%s/%s" % (Cnf["Dir::Pool"], pool_location, name)
if not os.path.exists(pool_filename):
print "E: %s missing (%s)." % (filename, pool_filename)
pool_filename = "%s/%s/%s" % (Cnf["Dir::Pool"], pool_location, name)
if not os.path.exists(pool_filename):
print "E: %s missing (%s)." % (filename, pool_filename)
print "Symlinking: %s -> %s" % (filename, src)
#os.symlink(src, filename)
sources.close()
print "Symlinking: %s -> %s" % (filename, src)
#os.symlink(src, filename)
sources.close()
% (Cnf["Dir::Root"], suite, component, architecture)
print "Processing %s..." % (filename)
# apt_pkg.ParseTagFile needs a real file handle and can't handle a GzipFile instance...
% (Cnf["Dir::Root"], suite, component, architecture)
print "Processing %s..." % (filename)
# apt_pkg.ParseTagFile needs a real file handle and can't handle a GzipFile instance...
(result, output) = commands.getstatusoutput("gunzip -c %s > %s" % (filename, temp_filename))
if (result != 0):
sys.stderr.write("Gunzip invocation failed!\n%s\n" % (output))
sys.exit(result)
(result, output) = commands.getstatusoutput("gunzip -c %s > %s" % (filename, temp_filename))
if (result != 0):
sys.stderr.write("Gunzip invocation failed!\n%s\n" % (output))
sys.exit(result)
Packages = apt_pkg.ParseTagFile(packages)
while Packages.Step():
filename = "%s/%s" % (Cnf["Dir::Root"], Packages.Section.Find('Filename'))
Packages = apt_pkg.ParseTagFile(packages)
while Packages.Step():
filename = "%s/%s" % (Cnf["Dir::Root"], Packages.Section.Find('Filename'))
for suite in [ "stable", "testing", "unstable" ]:
for component in Cnf.ValueList("Suite::%s::Components" % (suite)):
architectures = Cnf.ValueList("Suite::%s::Architectures" % (suite))
for suite in [ "stable", "testing", "unstable" ]:
for component in Cnf.ValueList("Suite::%s::Components" % (suite)):
architectures = Cnf.ValueList("Suite::%s::Architectures" % (suite))
filename = os.path.normpath(i[0] + i[1])
# file_id = i[2]
if os.access(filename, os.R_OK) == 0:
filename = os.path.normpath(i[0] + i[1])
# file_id = i[2]
if os.access(filename, os.R_OK) == 0:
# You probably don't want to use the rest of this...
# print "%s: is a symlink." % (filename)
# dest = os.readlink(filename)
# You probably don't want to use the rest of this...
# print "%s: is a symlink." % (filename)
# dest = os.readlink(filename)
# new_filename = dest.replace(location, "")
# q = projectB.query("UPDATE files SET filename = '%s', location = %s WHERE id = %s" % (new_filename, location_id, file_id))
# q = projectB.query("COMMIT WORK")
# new_filename = dest.replace(location, "")
# q = projectB.query("UPDATE files SET filename = '%s', location = %s WHERE id = %s" % (new_filename, location_id, file_id))
# q = projectB.query("COMMIT WORK")
for field_name in [ "build-depends", "build-depends-indep" ]:
field = dsc.get(field_name)
if field:
for field_name in [ "build-depends", "build-depends-indep" ]:
field = dsc.get(field_name)
if field:
def main ():
global Cnf, projectB, db_files, waste, excluded
def main ():
global Cnf, projectB, db_files, waste, excluded
Arguments = [('h',"help","Check-Archive::Options::Help")]
for i in [ "help" ]:
if not Cnf.has_key("Check-Archive::Options::%s" % (i)):
Arguments = [('h',"help","Check-Archive::Options::Help")]
for i in [ "help" ]:
if not Cnf.has_key("Check-Archive::Options::%s" % (i)):