entropy server, community repos: add --deps option to repo command

This makes possibile to pull in all the dependencies of packages
selected through 'repo move/copy'.
This commit is contained in:
Fabio Erculiani
2009-05-07 14:16:35 +02:00
parent 6b71cb80c0
commit f7f480569b
3 changed files with 14 additions and 5 deletions

View File

@@ -292,7 +292,9 @@ myopts_extended = [
(3,'manual-deps <repo> [atoms]',1,_('handle packages manual dependencies')),
(3,'package-tag <repo> <tag-string> [atoms]',1,_('clone a package inside a repository assigning it an arbitrary tag')),
(3,'move <from> <to> [atoms]',1,_('move packages from a repository to another')),
(4,'--deps',2,_('pulls dependencies in')),
(3,'copy <from> <to> [atoms]',1,_('copy packages from a repository to another')),
(4,'--deps',2,_('pulls dependencies in')),
(3,'default <repo_id>',2,_('set the default repository')),
None,

View File

@@ -51,7 +51,7 @@ myopts = [
(2,'--seekstore',2,_('analyze the Entropy Store directory directly')),
(2,'--repackage <atoms>',1,_('repackage the specified atoms')),
(2,'--noask',3,_('do not ask anything except critical things')),
(2,'--atoms <atoms>',3,_('manage only the specified atoms')),
(2,'--atoms <atoms>',2,_('manage only the specified atoms')),
None,
(1,'inject <packages>',1,_('add binary packages to repository w/o affecting scopes (multipackages)')),
None,
@@ -88,17 +88,19 @@ myopts = [
(2,'enable <repo>',3,_('enable the specified repository')),
(2,'disable <repo>',3,_('disable the specified repository')),
(2,'status <repo>',3,_('show the current Server Interface status')),
(2,'manual-deps <repo> [atoms]',2,_('handle packages manual dependencies')),
(2,'manual-deps <repo> [atoms]',1,_('handle packages manual dependencies')),
(2,'package-tag <repo> <tag-string> [atoms]',1,_('clone a package assigning it an arbitrary tag')),
(2,'move <from> <to> [atoms]',1,_('move packages from a repository to another')),
(3,'--deps',3,_('pulls dependencies in')),
(2,'copy <from> <to> [atoms]',1,_('copy packages from a repository to another')),
(3,'--deps',3,_('pulls dependencies in')),
(2,'default <repo_id>',2,_('set the default repository')),
None,
(1,'spm',3,_('source package manager functions')),
(2,'compile',4,_('compilation function')),
(3,'categories',2,_('compile packages belonging to the provided categories')),
(4,'--list',2,_('just list packages')),
(3,'pkgset',2,_('compile packages in provided package set names')),
(3,'pkgset',3,_('compile packages in provided package set names')),
(4,'--list',2,_('just list packages')),
(4,'--rebuild',1,_('rebuild everything')),
(4,'--dbupdate',1,_('run database update if all went fine')),

View File

@@ -51,6 +51,7 @@ def repositories(options):
repoid = None
repoid_dest = None
pull_deps = False
if not options: cmd = ""
else: cmd = options[0]
myopts = []
@@ -62,6 +63,8 @@ def repositories(options):
repoid = opt
elif repoid_dest == None:
repoid_dest = opt
elif opt == "--deps":
pull_deps = True
else:
myopts.append(opt)
elif cmd == "default":
@@ -227,9 +230,11 @@ def repositories(options):
if not matches:
return 1
if cmd == "move":
rc = Entropy.move_packages(matches, repoid_dest, repoid)
rc = Entropy.move_packages(matches, repoid_dest, repoid,
pull_deps = pull_deps)
elif cmd == "copy":
rc = Entropy.move_packages(matches, repoid_dest, repoid, do_copy = True)
rc = Entropy.move_packages(matches, repoid_dest, repoid,
do_copy = True, pull_deps = pull_deps)
if rc:
return 0
return 1