- tree = SuiteBlock.get("Tree", "dists/%s" % (longsuite))
-
- if AptCnf.has_key("tree::%s" % (tree)):
- sections = AptCnf["tree::%s::Sections" % (tree)].split()
- elif AptCnf.has_key("bindirectory::%s" % (tree)):
- sections = AptCnf["bindirectory::%s::Sections" % (tree)].split()
- else:
- aptcnf_filename = os.path.basename(utils.which_apt_conf_file())
- print "ALERT: suite %s not in %s, nor untouchable!" % (suite, aptcnf_filename)
- continue
+ tree = os.path.join(suiteobj.archive.path, 'dists', longsuite)
+
+ # See if there are Translations which might need a new pdiff
+ cwd = os.getcwd()
+ for component in components:
+ #print "DEBUG: Working on %s" % (component)
+ workpath=os.path.join(tree, component, "i18n")
+ if os.path.isdir(workpath):
+ os.chdir(workpath)
+ for dirpath, dirnames, filenames in os.walk(".", followlinks=True, topdown=True):
+ for entry in filenames:
+ if not re_includeinpdiff.match(entry):
+ #print "EXCLUDING %s" % (entry)
+ continue
+ (fname, fext) = os.path.splitext(entry)
+ processfile=os.path.join(workpath, fname)
+ #print "Working: %s" % (processfile)
+ storename="%s/%s_%s_%s" % (Options["TempDir"], suite, component, fname)
+ #print "Storefile: %s" % (storename)
+ genchanges(Options, processfile + ".diff", storename, processfile, maxdiffs)
+ os.chdir(cwd)