#5954 Update `update-critpath` script to use pkgdb-cli
Closed: Fixed None Opened 9 years ago by cydrobolt.

Attached is a patch for an update-critpath update. This new update-critpath uses the packagedb-cli as a dependency. It can be found at http://github.com/fedora-infra/packagedb-cli

This program has been tested locally, but not in production/stg. The use instructions of the new update-critpath is similar to the original update-critpath, although it is a little bit different.

update-critpath must be placed within packagedb-cli, or packagedb-cli files must be in the same folder.

USAGE: python update-critpath critpath <branch> <critpath.txt> <status (True/False)>


The SOP will need to be updated in order to show the new update-critpath usage. Fixes ticket #5928

{{{
48 BOLD = ""
49 RED = ""
50 RESET = ""
}}}

You could just drop these since they are not used anywhere.

Also, I think we should rework the argument parsing/handling
{{{
python update-critpath critpath f20 critpath.txt True
}}}

Having the first argument of the script be {{{critpath}}} while the script is named {{{update-critpath}}} seems redundant.
In action, since there is only one action (and will ever be only one), there is no need to have {{{action}}} at all.

Sounds good. I'll update the patch soon.

Fixed some things that pingou pointed out, uploaded a squashed (rebased) commit.

Can still be removed:

{{{
parser.add_argument('--nocolor', action='store_true',
help="Removes color from output")
}}}

{{{
94 parser.add_argument('--version', action='version',
95 version='pkgdb-cli %s' % (version))
}}}

Lines 52 and 79 needs to be adjusted
{{{
52 LOG = logging.getLogger("pkgdb-cli")
79 parser = argparse.ArgumentParser(prog="pkgdb-cli")
}}}

The rest looks good :)

Using the patch from cydrobolt as a basis I finished the script and it is currently working.

So this ticket is fixed :)

Metadata Update from @cydrobolt:
- Issue set to the milestone: Fedora 21 Alpha

7 years ago

Login to comment on this ticket.

Metadata