From 6dc5392a8a916295103d745fc52661da269d87b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Wed, 19 Oct 2005 13:54:19 +0000 Subject: [PATCH] * update zip and unzip to spec * update beta-light script * remove redundant upgrade-all command, try "pisi up" :) * typo / help improvements --- pisi/api.py | 6 +++++- pisi/cli/commands.py | 38 +++++++------------------------------- pisi/operations.py | 4 ++++ pisi/specfile.py | 2 +- tests/beta-light.sh | 28 ++++++++++++++-------------- tests/unzip/pspec.xml | 13 ++++++------- tests/zip/pspec.xml | 18 ++++++++---------- 7 files changed, 45 insertions(+), 64 deletions(-) diff --git a/pisi/api.py b/pisi/api.py index fa286db8..f7de3572 100644 --- a/pisi/api.py +++ b/pisi/api.py @@ -281,12 +281,16 @@ def package_graph(A, ignore_installed = False): def upgrade(A): upgrade_pkg_names(A) -def upgrade_pkg_names(A): +def upgrade_pkg_names(A = []): """Re-installs packages from the repository, trying to perform a maximum number of upgrades.""" ignore_build = ctx.config.options and ctx.config.options.ignore_build_no + if not A: + # if A is empty, then upgrade all packages + A = ctx.installdb.list_installed() + # filter packages that are not upgradable A_0 = A = set(A) Ap = [] diff --git a/pisi/cli/commands.py b/pisi/cli/commands.py index dc32db5b..fbc9a386 100644 --- a/pisi/cli/commands.py +++ b/pisi/cli/commands.py @@ -377,7 +377,11 @@ specified a package name, it should exist in a specified repository. class Upgrade(PackageOp): """Upgrade PISI packages -Usage: Upgrade ... +Usage: Upgrade [ ... ] + +: package name + +Upgrades the entire system if no package names are given You may use only package names to specify packages because the package upgrade operation is defined only with respect @@ -430,34 +434,6 @@ Remove package(s) from your system. Just give the package names to remove. self.finalize() -class UpgradeAll(PackageOp): - """Upgrade system - -Usage: Upgrade - -Upgrade the entire system. -""" - __metaclass__ = autocommand - - def __init__(self): - super(UpgradeAll, self).__init__() - - name = ("upgrade-all", None) - - def options(self): - super(UpgradeAll, self).options() - buildno_opts(self) - - def run(self): - if self.args: - self.help() - return - - self.init() - pisi.api.upgrade(ctx.installdb.list_installed()) - self.finalize() - - class ConfigurePending(PackageOp): """configure pending packages """ @@ -604,11 +580,11 @@ Usage: list-installed class UpdateRepo(Command): """Update repository databases -Usage: update-repo ... +Usage: update-repo [ ... ] : repository name Synchronizes the PiSi databases with the current repository. -If no repositories are given, all repositories are updated. +If no repository is given, all repositories are updated. """ __metaclass__ = autocommand diff --git a/pisi/operations.py b/pisi/operations.py index 36fa933f..dd707765 100644 --- a/pisi/operations.py +++ b/pisi/operations.py @@ -117,6 +117,10 @@ def install_single_name(name, upgrade = False): else: ctx.ui.error(_("Package %s not found in any active repository.") % pkg) +# high level operations + + + # deneme, don't remove ulan class AtomicOperation(object): def __init__(self, package, ignore_dep = False): diff --git a/pisi/specfile.py b/pisi/specfile.py index 5783ca6f..c598211a 100644 --- a/pisi/specfile.py +++ b/pisi/specfile.py @@ -163,7 +163,7 @@ class UpdateInfo: def has_errors(self): err = Checks() if not self.release: - err.add(_("Update must have a Release attribute")) + err.add(_("Update must have a release attribute")) err.has_tag(self.date, "Update", "Date") #err.has_tag(self.version, "Update", "Version") return err.list diff --git a/tests/beta-light.sh b/tests/beta-light.sh index 962a52fb..72aa14dd 100755 --- a/tests/beta-light.sh +++ b/tests/beta-light.sh @@ -3,18 +3,18 @@ pwd PATH=$PATH:. set -x -pisi-cli --ignore-comar remove unzip +pisi-cli -B -Dtmp remove unzip set -e -pisi-cli --ignore-build-no build tests/zip/pspec.xml tests/unzip/pspec.xml -pisi-cli index . -pisi-cli add-repo repo1 pisi-index.xml -pisi-cli list-repo -pisi-cli update-repo repo1 -pisi-cli list-available -pisi-cli --ignore-comar install zip -pisi-cli list-installed -pisi-cli --ignore-comar remove unzip -pisi-cli info zip*.pisi -pisi-cli --ignore-comar install zip*.pisi -pisi-cli list-pending -pisi-cli configure-pending +pisi-cli -Dtmp -E --ignore-build-no build tests/zip/pspec.xml tests/unzip/pspec.xml +pisi-cli -Dtmp index . +pisi-cli -Dtmp add-repo repo1 pisi-index.xml +pisi-cli -Dtmp list-repo +pisi-cli -Dtmp update-repo repo1 +pisi-cli -Dtmp list-available +pisi-cli -Dtmp --ignore-comarinstall zip +pisi-cli -Dtmp list-installed +pisi-cli -Dtmp --ignore-comar remove unzip +pisi-cli -Dtmp info zip*.pisi +pisi-cli -Dtmp --ignore-comar install zip*.pisi +pisi-cli -Dtmp list-pending +pisi-cli -Dtmp configure-pending diff --git a/tests/unzip/pspec.xml b/tests/unzip/pspec.xml index 8ff86f0f..ed4188a0 100644 --- a/tests/unzip/pspec.xml +++ b/tests/unzip/pspec.xml @@ -24,13 +24,6 @@ sed patch - - - 2005-07-15 - 5.50 - 1 - - @@ -44,6 +37,12 @@ /usr/share/man + + + 2005-07-15 + 5.50 + + diff --git a/tests/zip/pspec.xml b/tests/zip/pspec.xml index e64035a5..3ec0bc40 100644 --- a/tests/zip/pspec.xml +++ b/tests/zip/pspec.xml @@ -7,8 +7,8 @@ zip ftp://ftp.freesoftware.com/pub/infozip/Zip.html - PACKAGER - PACKAGER_EMAIL + zibidi + himini@gmail.com Info-ZIP category @@ -22,16 +22,8 @@ zcrypt.patch - unzip patch - - - 2005-07-15 - 2.3 - 1 - - @@ -45,6 +37,12 @@ /usr/share/man + + + 2005-07-15 + 2.3 + +