commit:     810cf6978686c58da614bff4ba87b31355c82107
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Tue Oct  4 07:59:04 2022 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Tue Oct  4 07:59:04 2022 +0000
URL:        
https://gitweb.gentoo.org/proj/pkgcore/pkgdev.git/commit/?id=810cf697

commit: add `--distdir` for manifest operations

Resolves: https://github.com/pkgcore/pkgdev/issues/99
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 src/pkgdev/scripts/pkgdev_commit.py | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/pkgdev/scripts/pkgdev_commit.py 
b/src/pkgdev/scripts/pkgdev_commit.py
index dded6d4..20fd471 100644
--- a/src/pkgdev/scripts/pkgdev_commit.py
+++ b/src/pkgdev/scripts/pkgdev_commit.py
@@ -129,10 +129,16 @@ commit_opts.add_argument(
         Add a Signed-off-by trailer by the committer at the end of the commit
         log message.
 
-        For commiting to the Gentoo repository, under GLEP-76, the commiter
+        For committing to the Gentoo repository, under GLEP-76, the committer
         shall certify agreement to the Certificate of Origin by adding
         Signed-off-by line containing the committer's legal name.
     """)
+commit_opts.add_argument(
+    '-d', '--distdir', type=arghparse.create_dir, help='target download 
directory',
+    docs="""
+        Use a specified target directory for downloads instead of the
+        configured DISTDIR.
+    """)
 
 msg_actions = commit_opts.add_mutually_exclusive_group()
 msg_actions.add_argument(
@@ -761,7 +767,8 @@ def update_manifests(options, out, err, changes):
             # manifest all staged or committed packages
             failed = repo.operations.manifest(
                 options.domain, packages.OrRestriction(*pkgs),
-                observer=observer_mod.formatter_output(out))
+                observer=observer_mod.formatter_output(out),
+                distdir=options.distdir)
             if any(failed):
                 return 1
 

Reply via email to