File: dput.py

package info (click to toggle)
osc-plugins-dput 20180227.1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 48 kB
  • sloc: python: 165; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 1,003 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/python

import sys

import osc.cmdln as cmdln

sys.path.insert(0, '/usr/share/osc-plugins-dput')
import osc_plugins_dput
sys.path.remove('/usr/share/osc-plugins-dput')

@cmdln.option('--maintained-in-git', action='store_true',
              help='add MAINTAINED_IN_GIT.txt')
def do_dput(self, subcmd, opts, proj_name, dsc_file):
    """
    ${cmd_name}: Automate the process of submiting a debian package to the OBS server.

    It expects a PROJECT_NAME and a .dsc, source .changes file, or
    source + binary .changes file. If used with a source + binary .changes
    file, the binaries will not be used.

    Usage:
        osc [global options] dput PROJECT_NAME PACKAGE.dsc
        osc [global options] dput PROJECT_NAME PACKAGE_source.changes
    """

    # in older versions of osc, this ends up in the class namespace (!)
    if hasattr(self, "osc_plugins_dput"):
        osc_plugins_dput = self.osc_plugins_dput

    osc_plugins_dput.do_dput(self, subcmd, opts, proj_name, dsc_file)