Mercurial > treepkg
diff bin/treepkgbuilder.py @ 296:ce7be2fb93ee
Make it easy to install extra binaries into subdirectories of extra-pkg.
This makes it easier to manage the extra-pkg directory when it contains
manually added packages and automatically added packages from one of the
package tracks by putting the automatically added packages into
extra-pkg/auto and manually added packages into extra-pkg/manual.
To this end, add parameter subdir to PBuilder.add_binaries_to_extra_pkg
method with default value "auto". Adapt the test case accordingly.
Also add the command line argument --subdir to bin/treepkgbuilder.py
add-binaries command, this time with default value "manual".
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Wed, 18 Nov 2009 18:11:22 +0000 |
parents | 1fcdffbeb9de |
children | f06f707d9fda |
line wrap: on
line diff
--- a/bin/treepkgbuilder.py Tue Oct 06 13:34:49 2009 +0000 +++ b/bin/treepkgbuilder.py Wed Nov 18 18:11:22 2009 +0000 @@ -85,9 +85,20 @@ names = ("add-binaries",) + def create_parser(self): + parser = super(AddBinariesCommand, self).create_parser() + parser.set_defaults(subdir="manual") + parser.add_option("--subdir", + help=("The subdirectory of extra-pkg into which" + " the packages are to be copied" + " (default 'manual').")) + return parser + + def run(self): builder = self.get_builder() - builder.add_binaries_to_extra_pkg(self.rest) + builder.add_binaries_to_extra_pkg(self.rest, + subdirectory=self.opts.subdir) class UpdateCommand(Command):