misc updates
This commit is contained in:
parent
37f1833ffb
commit
238b7543c8
3 changed files with 7 additions and 11 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
repo/
|
||||
__pycache__/
|
||||
__pycache__/
|
||||
.venv/
|
|
@ -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
11
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()
|
||||
|
|
Loading…
Reference in a new issue