[Pkg-privacy-commits] [Git][pkg-privacy-team/monkeysign][1.x] 2 commits: properly configure gbp

Ulrike Uhlig ulrike at debian.org
Mon May 28 10:29:33 BST 2018


Ulrike Uhlig pushed to branch 1.x at Privacy Maintainers / monkeysign


Commits:
7d692d38 by Antoine Beaupré at 2014-08-28T20:27:10-07:00
properly configure gbp

- - - - -
c6e9772d by Gabriel Filion at 2014-08-30T19:25:35-07:00
Implement --version option (Closes: #725113)

The version information is actually already available, so we just need
to add the proper option to display it.

- - - - -


3 changed files:

- + debian/gbp.conf
- monkeysign/cli.py
- monkeysign/ui.py


Changes:

=====================================
debian/gbp.conf
=====================================
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,2 @@
+[git-buildpackage]
+debian-branch = 1.x


=====================================
monkeysign/cli.py
=====================================
--- a/monkeysign/cli.py
+++ b/monkeysign/cli.py
@@ -40,7 +40,7 @@ passwords."""
     def parse_args(self, args):
         """override main parsing: we absolutely need an argument"""
         parser = MonkeysignUi.parse_args(self, args)
-        if self.pattern is None:
+        if self.pattern is None and not self.options.version:
             parser.print_usage()
             sys.exit(_('wrong number of arguments, use -h for full help'))
 


=====================================
monkeysign/ui.py
=====================================
--- a/monkeysign/ui.py
+++ b/monkeysign/ui.py
@@ -15,6 +15,7 @@
 #    You should have received a copy of the GNU General Public License
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+from monkeysign import __version__
 # gpg interface
 from monkeysign.gpg import Keyring, TempKeyring, GpgRuntimeError
 import monkeysign.translation
@@ -68,6 +69,8 @@ class MonkeysignUi(object):
     def parser(self):
         """parse the commandline arguments"""
         parser = optparse.OptionParser(description=self.__doc__, usage=self.usage, epilog=self.epilog, formatter=NowrapHelpFormatter())
+        parser.add_option('--version', dest='version', default=False, action='store_true',
+                          help=_('show version information and quit'))
         parser.add_option('-d', '--debug', dest='debug', default=False, action='store_true',
                           help=_('request debugging information from GPG engine (lots of garbage)'))
         parser.add_option('-v', '--verbose', dest='verbose', default=False, action='store_true',
@@ -149,6 +152,8 @@ class MonkeysignUi(object):
         # initialize the temporary keyring directory
         self.tmpkeyring = TempKeyring()
 
+        if self.options.version:
+            self.abort(monkeysign.__version__)
         if self.options.debug:
             self.tmpkeyring.context.debug = self.logfile
             self.keyring.context.debug = self.logfile



View it on GitLab: https://salsa.debian.org/pkg-privacy-team/monkeysign/compare/cbae2515aa75a0becd4f66ee934c837f730d3f4b...c6e9772dc0f0085e96840e614c45f1ff560aac57

-- 
View it on GitLab: https://salsa.debian.org/pkg-privacy-team/monkeysign/compare/cbae2515aa75a0becd4f66ee934c837f730d3f4b...c6e9772dc0f0085e96840e614c45f1ff560aac57
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-privacy-commits/attachments/20180528/67339926/attachment-0001.html>


More information about the Pkg-privacy-commits mailing list