use generic removal method

This commit is contained in:
2021-10-14 04:08:21 +03:00
parent be09c04e78
commit a83f1d5aa5
2 changed files with 3 additions and 15 deletions

View File

@ -68,8 +68,7 @@ class Patch(Handler):
package = Package.load(sources_dir, application.repository.pacman, application.repository.aur_url)
patch_dir = application.repository.paths.patches_for(package.base)
if patch_dir.is_dir():
shutil.rmtree(patch_dir) # remove old patches
Patch.patch_set_remove(application, package.base) # remove old patches
patch_dir.mkdir(mode=0o755, parents=True)
Sources.patch_create(sources_dir, patch_dir / "00-main.patch", *track)