[Uludag-commits] r17544 - in branches/pisi-devel: . licenses pisi pisi/pxml

uludag-commits at pardus.org.tr uludag-commits at pardus.org.tr
1 Nis 2008 Sal 16:16:17 EEST


Author: faik
Date: Tue Apr  1 16:16:17 2008
New Revision: 17544

Added:
   branches/pisi-devel/licenses/IDPL-1
      - copied unchanged from r17543, trunk/pisi/licenses/IDPL-1
Modified:
   branches/pisi-devel/pisi-spec.rng
   branches/pisi-devel/pisi/api.py
   branches/pisi-devel/pisi/index.py
   branches/pisi-devel/pisi/pxml/xmlfile.py
   branches/pisi-devel/pisi/ui.py
Log:
Merge with trunk



Modified: branches/pisi-devel/pisi-spec.rng
=================================================================
--- branches/pisi-devel/pisi-spec.rng	(original)
+++ branches/pisi-devel/pisi-spec.rng	Tue Apr  1 16:16:17 2008
@@ -304,6 +304,7 @@
                 <value>IBM-J1.5</value>
                 <value>IBM-J1.6</value>
                 <value>ICE</value>
+                <value>IDPL-1</value>
                 <value>IPL-1</value>
                 <value>IRPDL</value>
                 <value>ISC</value>

Modified: branches/pisi-devel/pisi/api.py
=================================================================
--- branches/pisi-devel/pisi/api.py	(original)
+++ branches/pisi-devel/pisi/api.py	Tue Apr  1 16:16:17 2008
@@ -88,6 +88,18 @@
     """
     ctx.dbus_sockname = sockname
 
+def set_signal_handling(enable):
+    """ 
+    Enable signal handling. Signal handling in pisi mostly used for disabling keyboard interrupts 
+    in critical paths.
+    Used by YALI
+    @param enable: Flag indicating signal handling usage
+    """
+    if enable:
+        ctx.sig = pisi.signalhandler.SignalHandler()
+    else:
+        ctx.sig = None
+
 def set_options(options):
     """ 
     Set various options of pisi
@@ -234,6 +246,16 @@
     packagedb = pisi.db.packagedb.PackageDB()
     return packagedb.search_package(terms, lang, repo)
 
+def search_installed(terms, lang=None):
+    """
+    Return a list of components that contains all the given terms either in its name, summary or
+    description -> list_of_strings
+    @param terms: a list of terms used to search components -> list_of_strings
+    @param lang: language of the summary and description
+    """
+    installdb = pisi.db.installdb.InstallDB()
+    return installdb.search_package(terms, lang)
+
 def search_source(terms, lang=None, repo=None):
     """
     Return a list of source packages that contains all the given terms either in its name, summary or

Modified: branches/pisi-devel/pisi/index.py
=================================================================
--- branches/pisi-devel/pisi/index.py	(original)
+++ branches/pisi-devel/pisi/index.py	Tue Apr  1 16:16:17 2008
@@ -48,14 +48,6 @@
         return self.distribution.name + self.distribution.repositoryname
 
     def read_uri(self, uri, tmpdir, force = False):
-        # A workaround for the side effect of commit revision 17027
-        # Someone should nuke pisi.file.File into pieces
-        fileuri = pisi.file.File.make_uri(uri)
-        if fileuri.is_local_file():
-            pisi.file.File.download(fileuri, tmpdir, not force, pisi.file.File.auto, pisi.file.File.detached, True)
-            uri = pisi.file.File.decompress(uri, pisi.file.File.auto)
-        ##
-
         self.read(uri, tmpDir=tmpdir, sha1sum=not force,
                   compress=pisi.file.File.auto, sign=pisi.file.File.detached, copylocal = True, nodecode = True)
 

Modified: branches/pisi-devel/pisi/pxml/xmlfile.py
=================================================================
--- branches/pisi-devel/pisi/pxml/xmlfile.py	(original)
+++ branches/pisi-devel/pisi/pxml/xmlfile.py	Tue Apr  1 16:16:17 2008
@@ -65,9 +65,12 @@
     def readxml(self, uri, tmpDir='/tmp', sha1sum=False,
                 compress=None, sign=None, copylocal = False):
 
+        # workaround for repo index files to fix 
+        # rev. 17027 regression (http://liste.pardus.org.tr/gelistirici/2008-February/011133.html)
+        compressed = uri.endswith(".bz2") or uri.endswith(".gz")
         uri = pisi.file.File.make_uri(uri)
 
-        if uri.is_local_file():
+        if uri.is_local_file() and not compressed:
             # this is a local file
             localpath = uri.path()
         else:

Modified: branches/pisi-devel/pisi/ui.py
=================================================================
--- branches/pisi-devel/pisi/ui.py	(original)
+++ branches/pisi-devel/pisi/ui.py	Tue Apr  1 16:16:17 2008
@@ -72,7 +72,8 @@
 
     def confirm(self, msg):
         "ask a yes/no question"
-        pass
+        # default ui confirms everything
+        return True
 
     def display_progress(self, **ka):
         "display progress"


Uludag-commits mesaj listesiyle ilgili daha fazla bilgi