Hello community,
here is the log from the commit of package scout
checked in at Thu Nov 6 00:57:33 CET 2008.
--------
--- scout/scout.changes 2008-10-13 12:54:02.000000000 +0200
+++ /mounts/work_src_done/STABLE/scout/scout.changes 2008-11-05 11:43:36.000000000 +0100
@@ -1,0 +2,5 @@
+Mon Nov 3 11:19:27 CET 2008 - prusnak@suse.cz
+
+- modify zypp search to work with new python-satsolver
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ scout.spec ++++++
--- /var/tmp/diff_new_pack.IK7966/_old 2008-11-06 00:55:57.000000000 +0100
+++ /var/tmp/diff_new_pack.IK7966/_new 2008-11-06 00:55:57.000000000 +0100
@@ -20,7 +20,7 @@
Name: scout
Version: 0.1.0
-Release: 26
+Release: 27
Url: http://en.opensuse.org/Scout
License: X11/MIT
Group: System/Packages
@@ -33,9 +33,9 @@
BuildRequires: python-xml
Requires: python-xml
%endif
-%if 0%{?suse_version} > 1030
-BuildRequires: python-satsolver >= 0.11.0
-Requires: python-satsolver >= 0.11.0
+%if 0%{?suse_version} > 1100
+BuildRequires: python-satsolver >= 0.12.0
+Requires: python-satsolver >= 0.12.0
%endif
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
%define py_sitedir %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")
@@ -62,7 +62,7 @@
%endif
%if 0%{?suse_version} <= 1100 && 0%{?suse_version} > 1030
%define scoutrepo suse110
-%define cnfrepo zypp
+%define cnfrepo suse110
%endif
%if 0%{?suse_version} <= 1030 && 0%{?suse_version} > 1020
%define scoutrepo suse103
@@ -84,7 +84,7 @@
%package -n command-not-found
Version: 0.1.0
-Release: 33
+Release: 34
License: X11/MIT
Group: System/Packages
Summary: Command Not Found extension for shell
@@ -185,7 +185,7 @@
%{_bindir}/%{name}*
%{py_sitedir}/%{name}
%{_datadir}/%{name}
-%{_sysconfdir}/bash_completion.d/*
+%config %{_sysconfdir}/bash_completion.d/*
%{_mandir}/man1/*
%if %{cnfrepo} != none
@@ -193,7 +193,7 @@
%defattr(-,root,root)
%doc handlers/bin/README
%{_bindir}/command-not-found
-%{_sysconfdir}/*_command_not_found
+%config %{_sysconfdir}/*_command_not_found
%endif
# %if %{scoutrepo} != none
#
@@ -204,6 +204,8 @@
# %endif
%changelog
+* Mon Nov 03 2008 prusnak@suse.cz
+- modify zypp search to work with new python-satsolver
* Fri Oct 10 2008 prusnak@suse.cz
- print output of c-n-f to stderr
- remove no longer needed python-satsolver workarounds
++++++ scout.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/scout/handlers/bin/command-not-found new/scout/handlers/bin/command-not-found
--- old/scout/handlers/bin/command-not-found 2008-10-11 15:10:36.000000000 +0200
+++ new/scout/handlers/bin/command-not-found 2008-10-30 15:30:01.000000000 +0100
@@ -18,7 +18,7 @@
print >> sys.stderr, _(" * %(prog)s [ path: %(path)s/%(binary)s, repository: %(repo)s ]") % \
({'prog' : row[3], 'path' : row[2], 'binary' : row[1], 'repo' : row[0]})
print >> sys.stderr
- print >> sys.stderr, _('Try:'), INSTALL_CMD,
+ print >> sys.stderr, _('Try installing with:'), INSTALL_CMD,
if len(rows) > 1:
print >> sys.stderr, _('')
else:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/scout/handlers/bin/README new/scout/handlers/bin/README
--- old/scout/handlers/bin/README 2008-10-06 22:08:54.000000000 +0200
+++ new/scout/handlers/bin/README 2008-10-30 15:30:01.000000000 +0100
@@ -1,22 +1,40 @@
-Installation:
+ABOUT
-== BASH ==
+The "command not found" message is not very helpful. If e.g. the unzip command
+is not found but it's available in a package, it would be very interesting
+if the system could tell that the command is currently not available,
+but installing a package would provide it.
-To use this feature you must have bash compiled with command-not-found patch
-and add the following 3 lines into your .bashrc file:
-if [ -f /etc/bash_command_not_found ]; then
- . /etc/bash_command_not_found
-fi
-You can add these 3 lines to /etc/bash.bashrc to install for all users.
+USAGE
-== ZSH ==
+Just type command that is not installed on your system and handler should respond
+with output similar to this:
-To use this feature you, please add the following lines to your .zshrc file:
+The program 'blender' can be found in the following package:
+ * blender [ path: /usr/bin/blender, repository: zypp (factory) ]
-if [ -f /etc/zsh_command_not_found ]; then
- . /etc/zsh_command_not_found
-fi
+Try: sudo zypper install blender
-You can add these 3 lines to /etc/zshrc to install for all users.
+bash: blender: command not found
+
+
+
+INSTALLATON
+
+This feature should be automatically enabled when using openSUSE 11.1 or newer.
+If it is not working you can follow these instructions to install it manually:
+
+bash - add the following 3 lines to your ~/.bashrc file (current user only)
+ or /etc/bash.bashrc.local (system-wide setting):
+
+ if test -f /etc/bash_command_not_found; then
+ . /etc/bash_command_not_found
+ fi
+
+zsh - add the following 3 lines to your ~/.zshrc file (current user only)
+
+ if [ -f /etc/zsh_command_not_found ]; then
+ . /etc/zsh_command_not_found
+ fi
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/scout/i18n/command-not-found/command-not-found.pot new/scout/i18n/command-not-found/command-not-found.pot
--- old/scout/i18n/command-not-found/command-not-found.pot 2008-10-06 22:08:54.000000000 +0200
+++ new/scout/i18n/command-not-found/command-not-found.pot 2008-10-30 15:30:01.000000000 +0100
@@ -30,7 +30,7 @@
msgstr ""
#: handlers/bin/command-not-found:21
-msgid "Try:"
+msgid "Try installing with:"
msgstr ""
#: handlers/bin/command-not-found:23
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/scout/i18n/command-not-found/cs.po new/scout/i18n/command-not-found/cs.po
--- old/scout/i18n/command-not-found/cs.po 2008-10-06 22:08:54.000000000 +0200
+++ new/scout/i18n/command-not-found/cs.po 2008-10-30 15:30:01.000000000 +0100
@@ -30,8 +30,8 @@
msgstr " * %(prog)s [ cesta: %(path)s/%(binary)s, repozitář: %(repo)s ]"
#: handlers/bin/command-not-found:21
-msgid "Try:"
-msgstr "Použij:"
+msgid "Try installing with:"
+msgstr "K instalaci použijte:"
#: handlers/bin/command-not-found:23
msgid ""
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/scout/i18n/command-not-found/de.po new/scout/i18n/command-not-found/de.po
--- old/scout/i18n/command-not-found/de.po 2008-10-06 22:08:54.000000000 +0200
+++ new/scout/i18n/command-not-found/de.po 2008-10-30 15:30:01.000000000 +0100
@@ -29,8 +29,8 @@
msgstr " * %(prog)s [ Pfad: %(path)s/%(binary)s, Repository: %(repo)s ]"
#: handlers/bin/command-not-found:21
-msgid "Try:"
-msgstr "Versuchen Sie:"
+msgid "Try installing with:"
+msgstr "Zum installieren versuchen Sie:"
#: handlers/bin/command-not-found:23
msgid ""
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/scout/i18n/command-not-found/sk.po new/scout/i18n/command-not-found/sk.po
--- old/scout/i18n/command-not-found/sk.po 2008-10-06 22:08:54.000000000 +0200
+++ new/scout/i18n/command-not-found/sk.po 2008-10-30 15:30:01.000000000 +0100
@@ -30,8 +30,8 @@
msgstr " * %(prog)s [ cesta: %(path)s/%(binary)s, repozitár: %(repo)s ]"
#: handlers/bin/command-not-found:21
-msgid "Try:"
-msgstr "Skúste:"
+msgid "Try installing with:"
+msgstr "Pre nainštalovanie skúste:"
#: handlers/bin/command-not-found:23
msgid ""
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/scout/README new/scout/README
--- old/scout/README 2008-10-06 22:08:54.000000000 +0200
+++ new/scout/README 2008-10-30 15:30:01.000000000 +0100
@@ -6,3 +6,6 @@
GIT development:
http://repo.or.cz/w/scout.git
+
+Ohloh project:
+http://www.ohloh.net/projects/scout
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/scout/scout/bin.py new/scout/scout/bin.py
--- old/scout/scout/bin.py 2008-10-11 15:10:36.000000000 +0200
+++ new/scout/scout/bin.py 2008-10-21 13:01:58.000000000 +0200
@@ -4,6 +4,7 @@
import scout
import sys
import os
+import re
from fnmatch import fnmatch
from ConfigParser import SafeConfigParser
@@ -16,8 +17,8 @@
etcpath = '/etc/zypp/repos.d'
solvfile = '/var/cache/zypp/solv/%s/solv'
- # path regular expression for { /bin, /sbin, /usr/bin, /usr/sbin, /usr/games, /opt/kde3/bin, /opt/kde3/sbin, /opt/gnome/bin, /opt/gnome/sbin }
- pathre = '^/(s?bin|usr/(s?bin|games)|opt/(kde3|gnome)/s?bin)/%s$'
+ # path regular expression for binary paths
+ pathre = '^/(bin|sbin|usr/bin|usr/sbin|usr/games|opt/kde3/bin|opt/kde3/sbin|opt/gnome/bin|opt/gnome/sbin)/%s$'
def __init__(self):
self.pool = satsolver.Pool()
@@ -35,12 +36,15 @@
def search(self, term):
pkgmatch = []
- for repo in self.pool.repos():
- for d in repo.search( self.pathre % term, satsolver.SEARCH_REGEX | satsolver.SEARCH_FILES, None, 'solvable:filelist' ):
- path = d.value()
- row = ( 'zypp (%s)' % repo.name(), term, path[:-len(term)-1] , d.solvable().name() )
- if not row in pkgmatch:
- pkgmatch.append( row )
+ pathreprg = re.compile(self.pathre % term)
+ term = term
+ for d in self.pool.search( term, satsolver.SEARCH_STRING, None, 'solvable:filelist' ):
+ path = d.value()
+ # do matching for path
+ if not pathreprg.match(path): continue
+ row = ( 'zypp (%s)' % d.solvable().repo().name(), term, path[:-len(term)-1] , d.solvable().name() )
+ if not row in pkgmatch:
+ pkgmatch.append( row )
return pkgmatch
class ScoutModule(scout.BaseScoutModule):
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/scout/scout-cmd-profile.py new/scout/scout-cmd-profile.py
--- old/scout/scout-cmd-profile.py 1970-01-01 01:00:00.000000000 +0100
+++ new/scout/scout-cmd-profile.py 2008-10-21 12:43:48.000000000 +0200
@@ -0,0 +1,22 @@
+#!/usr/bin/python
+
+# Copyright (c) 2008 Pavol Rusnak, Michal Vyskocil
+# see __init__.py for license details
+
+import scout
+import hotshot
+import hotshot.stats
+
+def runscout():
+ ret = scout.ScoutCore.run()
+ if ret != None:
+ print ret
+
+prof = hotshot.Profile("scout.prof")
+prof.runcall(runscout)
+prof.close()
+
+stats = hotshot.stats.load("scout.prof")
+stats.strip_dirs()
+stats.sort_stats('time', 'calls')
+stats.print_stats(20)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org