* bir takim ui kullanimlarini duzelt
* build alt komutlari optionlari build'den miras alir * test scriptlerini biraz duzelt
This commit is contained in:
+1
-1
@@ -326,7 +326,7 @@ def list_upgradable():
|
||||
pass
|
||||
#ctx.ui.info('Package %s cannot be upgraded. ' % x)
|
||||
return Ap
|
||||
|
||||
|
||||
def remove(A):
|
||||
"""remove set A of packages from system (A is a list of package names)"""
|
||||
|
||||
|
||||
@@ -734,7 +734,7 @@ FIXME: this is bogus
|
||||
|
||||
# Partial build commands
|
||||
|
||||
class BuildUntil(Command):
|
||||
class BuildUntil(Build):
|
||||
"""Run the build process partially
|
||||
|
||||
Usage: -sStateName build-until <pspec file>
|
||||
@@ -754,6 +754,7 @@ for you.
|
||||
name = ("build-until", "bu")
|
||||
|
||||
def options(self):
|
||||
super(BuildUntil, self).options()
|
||||
self.parser.add_option("-s", action="store", dest="state")
|
||||
|
||||
def run(self):
|
||||
@@ -770,7 +771,7 @@ for you.
|
||||
self.finalize()
|
||||
|
||||
|
||||
class BuildUnpack(Command):
|
||||
class BuildUnpack(Build):
|
||||
"""Unpack the source archive
|
||||
|
||||
Usage: build-unpack <pspec file>
|
||||
@@ -795,7 +796,7 @@ TODO: desc.
|
||||
self.finalize()
|
||||
|
||||
|
||||
class BuildSetup(Command):
|
||||
class BuildSetup(Build):
|
||||
"""Setup the source
|
||||
|
||||
Usage: build-setup <pspec file>
|
||||
@@ -846,7 +847,7 @@ TODO: desc.
|
||||
self.finalize()
|
||||
|
||||
|
||||
class BuildInstall(Command):
|
||||
class BuildInstall(Build):
|
||||
"""Install to the sandbox
|
||||
|
||||
Usage: build-install <pspec file>
|
||||
@@ -872,7 +873,7 @@ TODO: desc.
|
||||
self.finalize()
|
||||
|
||||
|
||||
class BuildPackage(Command):
|
||||
class BuildPackage(Build):
|
||||
"""Setup the source
|
||||
|
||||
Usage: build-build <pspec file>
|
||||
|
||||
+3
-3
@@ -111,7 +111,7 @@ dependency spec"""
|
||||
def satisfies_dependencies(pkg, deps, sat = installed_satisfies_dep):
|
||||
for dep in deps:
|
||||
if not sat(dep):
|
||||
ui.error('Package %s does not satisfy dependency %s\n' %
|
||||
ctx.ui.error('Package %s does not satisfy dependency %s\n' %
|
||||
(pkg,dep))
|
||||
return False
|
||||
return True
|
||||
@@ -124,11 +124,11 @@ def installable(pkg):
|
||||
"""calculate if pkg is installable currently
|
||||
which means it has to satisfy both install and runtime dependencies"""
|
||||
if not packagedb.has_package(pkg):
|
||||
ui.info("Package " + pkg + " is not present in the package database\n");
|
||||
ctx.ui.info("Package " + pkg + " is not present in the package database\n");
|
||||
return False
|
||||
elif satisfies_runtime_deps(pkg):
|
||||
return True
|
||||
else:
|
||||
#ui.info("package " + pkg + " does not satisfy dependencies\n");
|
||||
#ctx.ui.info("package " + pkg + " does not satisfy dependencies\n");
|
||||
return False
|
||||
|
||||
|
||||
+1
-2
@@ -37,9 +37,8 @@ class Package:
|
||||
|
||||
if url.is_remote_file():
|
||||
from fetcher import fetch_url
|
||||
from ui import ui
|
||||
dest = ctx.config.packages_dir()
|
||||
fetch_url(url, dest, ui.Progress)
|
||||
fetch_url(url, dest, ctx.ui.Progress)
|
||||
self.filepath = join(dest, url.filename())
|
||||
|
||||
self.impl = archive.ArchiveZip(self.filepath, 'zip', mode)
|
||||
|
||||
@@ -75,6 +75,8 @@ class PackageDB(object):
|
||||
list.append(pkg)
|
||||
return list
|
||||
|
||||
#TODO: list_upgrades?
|
||||
|
||||
def add_package(self, package_info):
|
||||
name = str(package_info.name)
|
||||
self.d[name] = package_info
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
from os.path import basename, dirname, join
|
||||
|
||||
import pisi.context as ctx
|
||||
from pisi.ui import ui
|
||||
from pisi.uri import URI
|
||||
from pisi.specfile import SpecFile
|
||||
|
||||
@@ -75,7 +74,7 @@ class SourceFetcher(object):
|
||||
def fetch(self, appendDest=""):
|
||||
from fetcher import fetch_url
|
||||
|
||||
ui.info("Fetching %s\n" % self.url.uri)
|
||||
ctx.ui.info("Fetching %s\n" % self.url.uri)
|
||||
dest = join(self.dest, appendDest)
|
||||
fetch_url(self.url, dest)
|
||||
|
||||
|
||||
+11
-11
@@ -1,21 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -x # xtrace
|
||||
set -e # errexit
|
||||
|
||||
echo "beta functionality test script"
|
||||
echo "working directory:" `pwd`
|
||||
echo "cleaning destination dir: tmp"
|
||||
PATH=$PATH:.
|
||||
set -x # xtrace
|
||||
set -e # errexit
|
||||
rm -rf tmp
|
||||
#echo "*** build tests"
|
||||
pisi-cli build https://svn.uludag.org.tr/pisi/trunk/system/base/zip/pspec.xml \
|
||||
https://svn.uludag.org.tr/pisi/trunk/system/base/unzip/pspec.xml
|
||||
|
||||
#partial-builds
|
||||
pisi-cli build-dosetup https://svn.uludag.org.tr/pisi/trunk/system/base/hdparm/pspec.xml
|
||||
pisi-cli build-dobuild https://svn.uludag.org.tr/pisi/trunk/system/base/hdparm/pspec.xml
|
||||
pisi-cli build-doinstall https://svn.uludag.org.tr/pisi/trunk/system/base/hdparm/pspec.xml
|
||||
pisi-cli build-dopackage https://svn.uludag.org.tr/pisi/trunk/system/base/hdparm/pspec.xml
|
||||
pisi-cli build-setup https://svn.uludag.org.tr/pisi/trunk/system/base/hdparm/pspec.xml
|
||||
pisi-cli build-build https://svn.uludag.org.tr/pisi/trunk/system/base/hdparm/pspec.xml
|
||||
pisi-cli build-install https://svn.uludag.org.tr/pisi/trunk/system/base/hdparm/pspec.xml
|
||||
pisi-cli build-package https://svn.uludag.org.tr/pisi/trunk/system/base/hdparm/pspec.xml
|
||||
|
||||
#echo "*** repository tests"
|
||||
|
||||
@@ -30,11 +30,11 @@ pisi-cli build https://svn.uludag.org.tr/pisi/trunk/system/base/grep/pspec.xml \
|
||||
#echo "*** package ops"
|
||||
pisi-cli info *.pisi
|
||||
# pisi-cli list-available
|
||||
pisi-cli install zip
|
||||
pisi-cli install --ignore-comar zip
|
||||
pisi-cli list-installed
|
||||
pisi-cli remove unzip
|
||||
pisi-cli install zip*.pisi
|
||||
pisi-cli install hdparm*.pisi flex*.pisi grep*.pisi
|
||||
pisi-cli remove --ignore-comar unzip
|
||||
pisi-cli install --ignore-comar zip*.pisi
|
||||
pisi-cli install --ignore-comar hdparm*.pisi flex*.pisi grep*.pisi
|
||||
pisi-cli remove-repo repo1
|
||||
# pisi-cli list-available
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ class XmlFileTestCase(unittest.TestCase):
|
||||
a_href = [types.StringType, xmlfile.mandatory]
|
||||
#t_Projects = [ [types.StringType], xmlfile.mandatory]
|
||||
a = A()
|
||||
print a
|
||||
self.assertEqual(a.href, None)
|
||||
dom = mdom.parse('tests/sandbox/a.xml')
|
||||
node = getNode(dom, 'A')
|
||||
|
||||
Reference in New Issue
Block a user