From 4ca86eb750398bc09c65aceeca543d3efebc2fd9 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Mon, 17 Oct 2011 10:40:44 +0200 Subject: [PATCH] [eit.commands.cp] if empty packages list is passed, consider all the packages --- server/eit/commands/cp.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/server/eit/commands/cp.py b/server/eit/commands/cp.py index 453e335b4..e7f1995ad 100644 --- a/server/eit/commands/cp.py +++ b/server/eit/commands/cp.py @@ -98,16 +98,20 @@ class EitCp(EitCommand): match_repo = [self._source], multi_match = True) if not p_matches: entropy_server.output( - red("%s: " % (_("Cannot match"),) ) + bold(package) + \ - red(" %s " % (_("in"),) ) + bold(self._source) + \ - red(" %s" % (_("repository"),)), - header=brown(" * "), - level="warning", - importance=1) + "%s: %s" % ( + purple(_("Not matched")), teal(package)), + level="warning", importance=1) else: package_ids += [pkg_id for pkg_id, r_id in p_matches if \ (pkg_id not in package_ids)] + if (not self._packages) and (not package_ids): + entropy_server.output( + purple(_("Considering all the packages")), + importance=1, level="warning") + repo = entropy_server.open_repository(self._source) + package_ids = repo.listAllPackageIds() + if not package_ids: return 1