misc updates

This commit is contained in:
askiiart 2024-11-11 19:45:09 -06:00
parent 37f1833ffb
commit 238b7543c8
Signed by untrusted user who does not match committer: askiiart
GPG key ID: EA85979611654C30
3 changed files with 7 additions and 11 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
repo/
__pycache__/
.venv/

View file

@ -6,7 +6,7 @@ A script to clean up pacman repos. This is primarily used for removing old versi
## Usage
First off, this depends on `natsort`, which you can install with `pip install natsort`.
First off, this depends on `natsort` and `click`, which you can install with `pip`.
```text
list-new-packages
@ -44,6 +44,8 @@ Arguments:
- `--dry-run`: Do a dry run
- `--only-delete`: Only delete files, don't modify the repo files from them (default: false)
- Without this argument, parcut will try to remove and add the relevant packages using `repo-add` and `repo-remove`, meaning it optionally depends on those programs.
- <small>These are needed to run the repo anyways, so you *should* have them installed already.</small>
- `--delete-debug`: Delete debug symbol packages (default: true)
## Notes and credits

11
test.py
View file

@ -82,15 +82,8 @@ class Tests(unittest.TestCase):
def test_package_list(self):
create_test_data()
result = repo_cleanup.HelperFunctions.get_package_list(repo_path)
expected = [
'test-r87.e176baf-1-x86_64.pkg.tar.zst',
'test-debug-r100.ab937ef-1-x86_64.pkg.tar.zst',
'test-r100.ab937ef-1-x86_64.pkg.tar.zst',
'example-program-10.2.1-2-x86_64.pkg.tar.zst',
'example-program-8.4.3-5-x86_64.pkg.tar.zst',
'test-debug-r87.e176baf-1-x86_64.pkg.tar.zst',
'example-program-debug-10.2.1-2-x86_64.pkg.tar.zst'
]
expected = ['example-program-8.4.3-5-x86_64.pkg.tar.zst', 'example-program-10.2.1-2-x86_64.pkg.tar.zst', 'example-program-debug-10.2.1-2-x86_64.pkg.tar.zst', 'test-debug-r87.e176baf-1-x86_64.pkg.tar.zst', 'test-debug-r100.ab937ef-1-x86_64.pkg.tar.zst', 'test-r87.e176baf-1-x86_64.pkg.tar.zst', 'test-r100.ab937ef-1-x86_64.pkg.tar.zst']
self.assertEqual(result, expected)
create_test_data()