Michał Górny  committed b19661e

Add --debug, to re-raise exceptions.

  • Participants
  • Parent commits 72b22b8

Comments (0)

Files changed (3)

File smartliverebuild/

 		help='Configuration file (default: /etc/portage/smart-live-rebuild.conf)')
 	opt.add_option('-C', '--no-color', action='store_false', dest='color',
 		help='Disable colorful output.')
-	opt.add_option('-d', '--diffstat', action='store_true', dest='diffstat',
-		help='Print a diffstat after the update (if VCS supports that)')
+	opt.add_option('-d', '--debug', action='store_true', dest='debug',
+		help='Enable debugging measures.')
 	opt.add_option('-D', '--allow-downgrade', action='store', type='downgrade', dest='allow_downgrade',
 		help="When to allow downgrading package (one of 'never', 'same-pv', 'always')")
 	opt.add_option('-E', '--no-erraneous-merge', action='store_false', dest='erraneous_merge',

File smartliverebuild/

 			'allow_downgrade': 'same-pv',
 			'color': 'True',
 			'config_file': '/etc/portage/smart-live-rebuild.conf',
-			'diffstat': 'False',
+			'debug': 'False',
 			'erraneous_merge': 'True',
 			'filter_packages': '',
 			'jobs': '1',

File smartliverebuild/

 						except NonLiveEbuild as e:
 							out.err('%s: %s' % (cpv, e))
 						except Exception as e:
+							if opts.debug:
+								raise
 							out.err('Error enumerating %s: [%s] %s' % (cpv, e.__class__.__name__, e))