|
@@ -7,29 +7,8 @@ from .repo import Repo
|
|
|
from . import server
|
|
|
|
|
|
def update(args, config):
|
|
|
- print(config.path)
|
|
|
- print('---')
|
|
|
- print()
|
|
|
- print(config)
|
|
|
- print()
|
|
|
- for repo in config.repos:
|
|
|
- print(repo.path)
|
|
|
- print('---')
|
|
|
- print()
|
|
|
- print(repo)
|
|
|
- print()
|
|
|
-
|
|
|
- for server in config.servers:
|
|
|
- print(server.path)
|
|
|
- print('---')
|
|
|
- print()
|
|
|
- print(server)
|
|
|
- print()
|
|
|
-
|
|
|
- repos = []
|
|
|
for repo in config.repos:
|
|
|
repo = Repo(repo)
|
|
|
- repos.append(repo)
|
|
|
print("Repo: {}".format(repo.name))
|
|
|
for package in repo.packages:
|
|
|
package.update()
|
|
@@ -49,7 +28,7 @@ def main(argv):
|
|
|
default='/etc/pacman-repo.d',
|
|
|
help="Configuration folder path"
|
|
|
)
|
|
|
- subparsers = parser.add_subparsers()
|
|
|
+ subparsers = parser.add_subparsers(required=True, dest='command', metavar='command')
|
|
|
|
|
|
update_parser = subparsers.add_parser('update', help='Update repository')
|
|
|
update_parser.add_argument(
|