s/PISI/PiSi/g

This commit is contained in:
S.Çağlar Onur
2006-09-11 15:49:08 +00:00
parent 1dc71b5f2c
commit 0bde4059bc
17 changed files with 42 additions and 42 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ __filesdbversion__ = "1.0.5" # yes, this is the real bottleneck
__all__ = [ 'api', 'config', 'packagedb', 'installdb', 'search' ] __all__ = [ 'api', 'config', 'packagedb', 'installdb', 'search' ]
class Exception(Exception): class Exception(Exception):
"""Class of exceptions that must be caught and handled within PISI""" """Class of exceptions that must be caught and handled within PiSi"""
def __str__(self): def __str__(self):
s = u'' s = u''
for x in self.args: for x in self.args:
+1 -1
View File
@@ -18,7 +18,7 @@ import gettext
__trans = gettext.translation('pisi', fallback=True) __trans = gettext.translation('pisi', fallback=True)
_ = __trans.ugettext _ = __trans.ugettext
# PISI Modules # PiSi Modules
import pisi.actionsapi import pisi.actionsapi
import pisi.context as ctx import pisi.context as ctx
+5 -5
View File
@@ -9,7 +9,7 @@
# #
# Please read the COPYING file. # Please read the COPYING file.
"""Top level PISI interfaces. a facade to the entire PISI system""" """Top level PiSi interfaces. a facade to the entire PiSi system"""
import os import os
import sys import sys
@@ -111,7 +111,7 @@ def init(database = True, write = True,
ctx.componentdb = None ctx.componentdb = None
ctx.packagedb = None ctx.packagedb = None
ctx.sourcedb = None ctx.sourcedb = None
ctx.ui.debug('PISI API initialized') ctx.ui.debug('PiSi API initialized')
ctx.initialized = True ctx.initialized = True
def finalize(): def finalize():
@@ -142,7 +142,7 @@ def finalize():
if ctx.build_leftover and os.path.exists(ctx.build_leftover): if ctx.build_leftover and os.path.exists(ctx.build_leftover):
os.unlink(ctx.build_leftover) os.unlink(ctx.build_leftover)
ctx.ui.debug('PISI API finalized') ctx.ui.debug('PiSi API finalized')
ctx.ui.close() ctx.ui.close()
ctx.initialized = False ctx.initialized = False
@@ -323,14 +323,14 @@ def check(package):
def index(dirs=None, output='pisi-index.xml', skip_sources=False, skip_signing=False, def index(dirs=None, output='pisi-index.xml', skip_sources=False, skip_signing=False,
non_recursive=False): non_recursive=False):
"""accumulate PISI XML files in a directory""" """accumulate PiSi XML files in a directory"""
index = Index() index = Index()
index.distribution = None index.distribution = None
if not dirs: if not dirs:
dirs = ['.'] dirs = ['.']
for repo_dir in dirs: for repo_dir in dirs:
repo_dir = str(repo_dir) repo_dir = str(repo_dir)
ctx.ui.info(_('* Building index of PISI files under %s') % repo_dir) ctx.ui.info(_('* Building index of PiSi files under %s') % repo_dir)
index.index(repo_dir, skip_sources, non_recursive) index.index(repo_dir, skip_sources, non_recursive)
if skip_signing: if skip_signing:
+1 -1
View File
@@ -249,7 +249,7 @@ class MyZipFile(zipfile.ZipFile):
class ArchiveZip(ArchiveBase): class ArchiveZip(ArchiveBase):
"""ArchiveZip handles zip archives. """ArchiveZip handles zip archives.
Being a zip archive PISI packages also use this class Being a zip archive PiSi packages also use this class
extensively. This class provides unpacking and packing magic for extensively. This class provides unpacking and packing magic for
zip archives.""" zip archives."""
+2 -2
View File
@@ -177,7 +177,7 @@ class Builder:
def build(self): def build(self):
"""Build the package in one shot.""" """Build the package in one shot."""
ctx.ui.status(_("Building PISI source package: %s") % self.spec.source.name) ctx.ui.status(_("Building PiSi source package: %s") % self.spec.source.name)
self.compile_action_script() self.compile_action_script()
@@ -775,7 +775,7 @@ class Builder:
name = pisi.util.join_path(outdir, name) name = pisi.util.join_path(outdir, name)
self.new_packages.append(name) self.new_packages.append(name)
ctx.ui.info(_("Creating PISI package %s.") % name) ctx.ui.info(_("Creating PiSi package %s.") % name)
pkg = Package(name, 'w') pkg = Package(name, 'w')
+15 -15
View File
@@ -231,7 +231,7 @@ class Clean(Command):
Usage: clean Usage: clean
PISI uses filesystem locks for managing database access. PiSi uses filesystem locks for managing database access.
This command deletes unused locks from the database directory.""" This command deletes unused locks from the database directory."""
__metaclass__ = autocommand __metaclass__ = autocommand
@@ -346,11 +346,11 @@ def ignoredep_opt(self):
class Build(Command): class Build(Command):
"""Build PISI packages """Build PiSi packages
Usage: build [<pspec.xml> | <sourcename>] ... Usage: build [<pspec.xml> | <sourcename>] ...
You can give a URI of the pspec.xml file. PISI will You can give a URI of the pspec.xml file. PiSi will
fetch all necessary files and build the package for you. fetch all necessary files and build the package for you.
Alternatively, you can give the name of a source package Alternatively, you can give the name of a source package
@@ -431,7 +431,7 @@ unpack, setup, build, install, package.
class Emerge(Build): class Emerge(Build):
"""Build and install PISI source packages from repository """Build and install PiSi source packages from repository
Usage: emerge <sourcename> ... Usage: emerge <sourcename> ...
@@ -493,7 +493,7 @@ class PackageOp(Command):
class Install(PackageOp): class Install(PackageOp):
"""Install PISI packages """Install PiSi packages
Usage: install <package1> <package2> ... <packagen> Usage: install <package1> <package2> ... <packagen>
@@ -530,7 +530,7 @@ expanded to package names.
class Upgrade(PackageOp): class Upgrade(PackageOp):
"""Upgrade PISI packages """Upgrade PiSi packages
Usage: Upgrade [<package1> <package2> ... <packagen>] Usage: Upgrade [<package1> <package2> ... <packagen>]
@@ -634,7 +634,7 @@ expanded to package names.
class Remove(PackageOp): class Remove(PackageOp):
"""Remove PISI packages """Remove PiSi packages
Usage: remove <package1> <package2> ... <packagen> Usage: remove <package1> <package2> ... <packagen>
@@ -831,11 +831,11 @@ If no packages are given, checks all installed packages.
class Index(Command): class Index(Command):
"""Index PISI files in a given directory """Index PiSi files in a given directory
Usage: index <directory> ... Usage: index <directory> ...
This command searches for all PISI files in a directory, collects PISI This command searches for all PiSi files in a directory, collects PiSi
tags from them and accumulates the information in an output XML file, tags from them and accumulates the information in an output XML file,
named by default 'pisi-index.xml'. In particular, it indexes both named by default 'pisi-index.xml'. In particular, it indexes both
source and binary packages. source and binary packages.
@@ -929,7 +929,7 @@ class RebuildDb(Command):
Usage: rebuilddb [ <package1> <package2> ... <packagen> ] Usage: rebuilddb [ <package1> <package2> ... <packagen> ]
Rebuilds the PISI databases Rebuilds the PiSi databases
If package specs are given, they should be the names of package If package specs are given, they should be the names of package
dirs under /var/lib/pisi dirs under /var/lib/pisi
@@ -952,7 +952,7 @@ dirs under /var/lib/pisi
pisi.api.resurrect_package(package_fn, ctx.get_option('files`')) pisi.api.resurrect_package(package_fn, ctx.get_option('files`'))
else: else:
self.init(database=False) self.init(database=False)
if ctx.ui.confirm(_('Rebuild PISI databases?')): if ctx.ui.confirm(_('Rebuild PiSi databases?')):
pisi.api.rebuild_db(ctx.get_option('files')) pisi.api.rebuild_db(ctx.get_option('files'))
self.finalize() self.finalize()
@@ -965,7 +965,7 @@ Usage: update-repo [<repo1> <repo2> ... <repon>]
<repoi>: repository name <repoi>: repository name
Synchronizes the PISI databases with the current repository. Synchronizes the PiSi databases with the current repository.
If no repository is given, all repositories are updated. If no repository is given, all repositories are updated.
""" """
__metaclass__ = autocommand __metaclass__ = autocommand
@@ -1028,7 +1028,7 @@ NB: We support only local files (e.g., /a/b/c) and http:// URIs at the moment
name = 'pardus-1-test' name = 'pardus-1-test'
indexuri = 'http://paketler.pardus.org.tr/pardus-1-test/pisi-index.xml.bz2' indexuri = 'http://paketler.pardus.org.tr/pardus-1-test/pisi-index.xml.bz2'
pisi.api.add_repo(name, indexuri, ctx.get_option('at')) pisi.api.add_repo(name, indexuri, ctx.get_option('at'))
if ctx.ui.confirm(_('Update PISI database for repository %s?') % name): if ctx.ui.confirm(_('Update PiSi database for repository %s?') % name):
pisi.api.update_repo(name) pisi.api.update_repo(name)
self.finalize() self.finalize()
else: else:
@@ -1090,7 +1090,7 @@ class ListAvailable(Command):
Usage: list-available [ <repo1> <repo2> ... repon ] Usage: list-available [ <repo1> <repo2> ... repon ]
Gives a brief list of PISI packages published in the specified Gives a brief list of PiSi packages published in the specified
repositories. If no repository is specified, we list packages in repositories. If no repository is specified, we list packages in
all repositories. all repositories.
""" """
@@ -1149,7 +1149,7 @@ class ListComponents(Command):
Usage: list-components Usage: list-components
Gives a brief list of PISI components published in the Gives a brief list of PiSi components published in the
repositories. repositories.
""" """
__metaclass__ = autocommand __metaclass__ = autocommand
+2 -2
View File
@@ -11,8 +11,8 @@
# #
""" """
PISI Configuration module is used for gathering and providing PiSi Configuration module is used for gathering and providing
regular PISI configurations. regular PiSi configurations.
""" """
import os import os
+1 -1
View File
@@ -10,7 +10,7 @@
# Please read the COPYING file. # Please read the COPYING file.
# #
# PISI Configuration File module, obviously, is used to read from the # PiSi Configuration File module, obviously, is used to read from the
# configuration file. Module also defines default values for # configuration file. Module also defines default values for
# configuration parameters. # configuration parameters.
# #
+1 -1
View File
@@ -10,7 +10,7 @@
# Please read the COPYING file. # Please read the COPYING file.
# #
"""PISI constants. """PiSi constants.
If you have a "magic" constant value this is where it should be If you have a "magic" constant value this is where it should be
defined.""" defined."""
+1 -1
View File
@@ -21,7 +21,7 @@
# 13-Dec-2000: Updated to be used with the new bsddb3 package. # 13-Dec-2000: Updated to be used with the new bsddb3 package.
# Added DBShelfCursor class. # Added DBShelfCursor class.
# #
# 13-Dec-2005: Minor hacking by exa to make it work better with PISI # 13-Dec-2005: Minor hacking by exa to make it work better with PiSi
#------------------------------------------------------------------------ #------------------------------------------------------------------------
"""Manage shelves of pickled objects using bsddb database files for the """Manage shelves of pickled objects using bsddb database files for the
+2 -2
View File
@@ -10,7 +10,7 @@
# Please read the COPYING file. # Please read the COPYING file.
# #
"""PISI source/package index""" """PiSi source/package index"""
import os import os
@@ -116,7 +116,7 @@ class Index(XmlFile):
package = Package(path, 'r') package = Package(path, 'r')
# extract control files # extract control files
util.clean_dir(ctx.config.install_dir()) util.clean_dir(ctx.config.install_dir())
package.extract_PISI_files(ctx.config.install_dir()) package.extract_PiSi_files(ctx.config.install_dir())
md = metadata.MetaData() md = metadata.MetaData()
md.read(os.path.join(ctx.config.install_dir(), ctx.const.metadata_xml)) md.read(os.path.join(ctx.config.install_dir(), ctx.const.metadata_xml))
+3 -3
View File
@@ -70,7 +70,7 @@ def lock_dbenv():
try: try:
fcntl.flock(ctx.dbenv_lock, fcntl.LOCK_EX | fcntl.LOCK_NB) fcntl.flock(ctx.dbenv_lock, fcntl.LOCK_EX | fcntl.LOCK_NB)
except IOError: except IOError:
raise Error(_("Another instance of PISI is running. Only one instance is allowed to modify the PISI database at a time.")) raise Error(_("Another instance of PiSi is running. Only one instance is allowed to modify the PiSi database at a time."))
# write: write access to database environment # write: write access to database environment
# writeversion: would you like to be able # writeversion: would you like to be able
@@ -94,7 +94,7 @@ def init_dbenv(write=False, writeversion=False):
ctx.dbenv.open(pisi.context.config.db_dir(), flags) ctx.dbenv.open(pisi.context.config.db_dir(), flags)
ctx.dbenv.set_flags(db.DB_LOG_AUTOREMOVE, 1) # clear inactive logs automatically ctx.dbenv.set_flags(db.DB_LOG_AUTOREMOVE, 1) # clear inactive logs automatically
else: else:
raise Error(_("Cannot write to PISI database.")) raise Error(_("Cannot write to PiSi database."))
else: else:
ctx.dbenv = None # read-only access to database ctx.dbenv = None # read-only access to database
@@ -159,7 +159,7 @@ class LockedDBShelf(shelve.DBShelf):
try: try:
fcntl.flock(self.lockfile, fcntl.LOCK_EX | fcntl.LOCK_NB) fcntl.flock(self.lockfile, fcntl.LOCK_EX | fcntl.LOCK_NB)
except IOError: except IOError:
raise Error(_("Another instance of PISI is running. Only one instance is allowed to modify the PISI database at a time.")) raise Error(_("Another instance of PiSi is running. Only one instance is allowed to modify the PiSi database at a time."))
def close(self): def close(self):
if self.closed: if self.closed:
+1 -1
View File
@@ -51,7 +51,7 @@ def upgrade_pisi():
if Version(pisi.__filesdbversion__) > Version(old_filesdbversion) or \ if Version(pisi.__filesdbversion__) > Version(old_filesdbversion) or \
Version(pisi.__dbversion__) > Version(old_dbversion): Version(pisi.__dbversion__) > Version(old_dbversion):
pisi.api.init(database=False) pisi.api.init(database=False)
ctx.ui.info(_("* PISI database version has changed. Rebuilding database...")) ctx.ui.info(_("* PiSi database version has changed. Rebuilding database..."))
pisi.api.rebuild_db() pisi.api.rebuild_db()
ctx.ui.info(_("* Database rebuild operation is completed succesfully.")) ctx.ui.info(_("* Database rebuild operation is completed succesfully."))
pisi.api.finalize() pisi.api.finalize()
+2 -2
View File
@@ -31,7 +31,7 @@ class Error(pisi.Error):
class Package: class Package:
"""PISI Package Class provides access to a pisi package (.pisi """PiSi Package Class provides access to a pisi package (.pisi
file).""" file)."""
def __init__(self, packagefn, mode='r'): def __init__(self, packagefn, mode='r'):
self.filepath = packagefn self.filepath = packagefn
@@ -100,7 +100,7 @@ class Package:
self.impl.unpack_dir_flat(dir, outdir) self.impl.unpack_dir_flat(dir, outdir)
def extract_PISI_files(self, outdir): def extract_PISI_files(self, outdir):
"""Extract PISI control files: metadata.xml, files.xml, """Extract PiSi control files: metadata.xml, files.xml,
action scripts, etc.""" action scripts, etc."""
self.extract_files([ctx.const.metadata_xml, ctx.const.files_xml], outdir) self.extract_files([ctx.const.metadata_xml, ctx.const.files_xml], outdir)
self.extract_dir('config', outdir) self.extract_dir('config', outdir)
+1 -1
View File
@@ -10,7 +10,7 @@
# Please read the COPYING file. # Please read the COPYING file.
# #
"""PISI package relation graph that represents the state of packagedb""" """PiSi package relation graph that represents the state of packagedb"""
import string import string
+2 -2
View File
@@ -11,8 +11,8 @@
# #
""" """
Specfile module is our handler for PSPEC files. PSPEC (PISI SPEC) Specfile module is our handler for PSPEC files. PSPEC (PiSi SPEC)
files are specification files for PISI source packages. This module files are specification files for PiSi source packages. This module
provides read and write routines for PSPEC files. provides read and write routines for PSPEC files.
""" """
+1 -1
View File
@@ -521,7 +521,7 @@ def strip_directory(top, excludelist=[]):
# which causes wrong path entries in *.la files. And these wrong path # which causes wrong path entries in *.la files. And these wrong path
# entries sometimes triggers compile-time errors or linkage problems. # entries sometimes triggers compile-time errors or linkage problems.
# Instead of patching all these buggy sources and maintain these patches, # Instead of patching all these buggy sources and maintain these patches,
# PISI removes wrong paths... # PiSi removes wrong paths...
extension = os.path.splitext(frpath)[1] extension = os.path.splitext(frpath)[1]
if extension == ".la": if extension == ".la":
# FIXME: I'm regular expr. idiot, so one can convert this to python... # FIXME: I'm regular expr. idiot, so one can convert this to python...