Closed cangas-oz closed 8 months ago
The Clean process if pretty simple - it looks at the top level mirror directory on disk, and works its way down, and compares against files that need to be kept. In other words, the files marked for deletion must exist on the disk. Therefore, based on your error, it's possible that a file is being marked for deletion multiple times, so the second time it attempts to be deleted, the program falls over.
This is a simple enough fix. I'll release a patch update shortly.
Version 0.4.2
has now been released which should address this issue, as well as cut down the time taken for an update.
To update perform the following:
python3.9 -m pip uninstall refrapt
python3.9 -m pip install refrapt
refrapt --version
The output should show that you have version 0.4.2 installed.
If this fixes your problem, please close this Issue.
Describe the bug error message on cleaning: [2022-06-01 00:52:06] INFO: 7.94 GB in 3509 files and directories will be freed...
sys.exit(main())
File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in call
return self.main(args, kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
return __callback(args, kwargs)
File "/home/radio/.local/lib/python3.10/site-packages/refrapt/refrapt.py", line 120, in main
PerformMirroring()
File "/home/radio/.local/lib/python3.10/site-packages/refrapt/refrapt.py", line 278, in PerformMirroring
PostMirrorClean()
File "/home/radio/.local/lib/python3.10/site-packages/refrapt/refrapt.py", line 438, in PostMirrorClean
Clean(cleanRepositories, requiredFiles)
File "/home/radio/.local/lib/python3.10/site-packages/refrapt/refrapt.py", line 389, in Clean
os.remove(item)
FileNotFoundError: [Errno 2] No such file or directory: 'mx.archive.ubuntu.com/ubuntu/pool/main/c/cups/cups-daemon_2.3.1-9ubuntu1.1_i386.deb'
falling over because a package is missing.
Configuration File and Logs**
Provide the configuration file that you are using, and any logs available in the ~/refrapt/var directory. These will help to diagnose the issue.
Traceback (most recent call last): File "/home/radio/.local/bin/refrapt", line 8, in
System Information: