Lines 83-96
def maybe_thicken_manifest(pkg_dir):
Link Here
|
83 |
manifest_entries = [] |
83 |
manifest_entries = [] |
84 |
for root in pkg_dir, os.path.join(pkg_dir, 'files'): |
84 |
for root in pkg_dir, os.path.join(pkg_dir, 'files'): |
85 |
for filename in dir_contents[root]: |
85 |
for filename in dir_contents[root]: |
86 |
if filename == 'Manifest': |
86 |
if filename == 'Manifest' and root == pkg_dir: |
87 |
continue |
87 |
continue |
88 |
|
88 |
|
89 |
file_mtime = math.floor(os.stat(os.path.join(root, filename)).st_mtime) |
89 |
file_mtime = math.floor(os.stat(os.path.join(root, filename)).st_mtime) |
90 |
if file_mtime > newest_mtime: |
90 |
if file_mtime > newest_mtime: |
91 |
newest_mtime = file_mtime |
91 |
newest_mtime = file_mtime |
92 |
|
92 |
|
93 |
if os.path.split(root)[1] == 'files': |
93 |
if root != pkg_dir: |
94 |
manifest_entries.append('AUX ' + filename) |
94 |
manifest_entries.append('AUX ' + filename) |
95 |
elif filename.endswith('.ebuild'): |
95 |
elif filename.endswith('.ebuild'): |
96 |
manifest_entries.append('EBUILD ' + filename) |
96 |
manifest_entries.append('EBUILD ' + filename) |
Lines 164-181
location = %s
Link Here
|
164 |
subdirectories.remove(dirname) |
164 |
subdirectories.remove(dirname) |
165 |
|
165 |
|
166 |
if (not subdirectories or subdirectories == ['files']) and 'metadata.xml' in files: |
166 |
if (not subdirectories or subdirectories == ['files']) and 'metadata.xml' in files: |
|
|
167 |
if os.path.sep not in os.path.split(root)[0]: |
168 |
# EDGE CASE: category with single package called "files" |
169 |
continue |
167 |
pkg_dirs.append(root[2:]) |
170 |
pkg_dirs.append(root[2:]) |
168 |
dir_contents[root[2:]] = files |
171 |
dir_contents[root[2:]] = files |
169 |
elif os.path.split(root)[1] == 'files' and 'metadata.xml' not in files: |
172 |
if 'files' in subdirectories: |
170 |
dir_contents[root[2:]] = files |
173 |
subdirectories.remove('files') |
171 |
for dirname in subdirectories[:]: |
174 |
filesdir = os.path.join(root, 'files') |
172 |
subdirectories.remove(dirname) |
175 |
dir_contents[filesdir[2:]] = [] |
173 |
os.chdir(root) |
176 |
os.chdir(filesdir) |
174 |
for root2, subdirectories2, files2 in os.walk('.'): |
177 |
for root2, subdirectories2, files2 in os.walk('.'): |
175 |
if root2 != '.': |
|
|
176 |
for filename in files2: |
178 |
for filename in files2: |
177 |
dir_contents[root[2:]].append(os.path.join(root2[2:], filename)) |
179 |
dir_contents[filesdir[2:]].append(os.path.join(root2[2:], filename)) |
178 |
os.chdir(args.location) |
180 |
os.chdir(args.location) |
179 |
|
181 |
|
180 |
pkg_dirs.sort() |
182 |
pkg_dirs.sort() |
181 |
pool = multiprocessing.Pool(args.jobs, worker_init) |
183 |
pool = multiprocessing.Pool(args.jobs, worker_init) |