From 238b7543c8e3a68faa71b63991674c6d0519130f Mon Sep 17 00:00:00 2001 From: askiiart Date: Mon, 11 Nov 2024 19:45:09 -0600 Subject: [PATCH] misc updates --- .gitignore | 3 ++- README.md | 4 +++- test.py | 11 ++--------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 0a34ebb..61b0d55 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ repo/ -__pycache__/ \ No newline at end of file +__pycache__/ +.venv/ \ No newline at end of file diff --git a/README.md b/README.md index 899be80..7907454 100644 --- a/README.md +++ b/README.md @@ -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. + - These are needed to run the repo anyways, so you *should* have them installed already. - `--delete-debug`: Delete debug symbol packages (default: true) ## Notes and credits diff --git a/test.py b/test.py index 625ee78..724b848 100644 --- a/test.py +++ b/test.py @@ -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()