mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
pactest: build the filelist using a set()
This will prevent duplicates, which we had plenty of once I made a few tests that had a list of files greater than the normal two. The previous logic was not working quite right. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
a9cbd15260
commit
0d4dd09993
@ -38,16 +38,14 @@ def _mkfilelist(files):
|
||||
usr/local/bin/
|
||||
usr/local/bin/dummy
|
||||
"""
|
||||
i = []
|
||||
file_list = set()
|
||||
for f in files:
|
||||
dir = getfilename(f)
|
||||
i.append(dir)
|
||||
file_list.add(dir)
|
||||
while "/" in dir:
|
||||
[dir, tmp] = dir.rsplit("/", 1)
|
||||
if not dir + "/" in files:
|
||||
i.append(dir + "/")
|
||||
i.sort()
|
||||
return i
|
||||
file_list.add(dir + "/")
|
||||
return sorted(file_list)
|
||||
|
||||
def _mkbackuplist(backup):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user