Hello community, here is the log from the commit of package smart checked in at Thu Mar 1 21:37:48 CET 2007. -------- --- smart/smart.changes 2007-01-31 19:18:22.000000000 +0100 +++ /mounts/work_src_done/STABLE/smart/smart.changes 2007-03-01 15:06:13.512639000 +0100 @@ -1,0 +2,11 @@ +Thu Mar 1 13:27:59 CET 2007 - cthiel@suse.de + +- updated smart-trunk.patch to r857 +- added smart-show-changelog.patch by Mauricio Teixeira and Davodet Olivier + (http://tracker.labix.org/issue244) +- added smart-fix-archscore-add-disable-biarch-option.patch, + smart-broken-repo-without-summary-or-description-workaround.diff and + smart-better-x86_64-support.patch by Pascal Bleser (fixes #242782) +- added experimental command "newer" by Pascal Bleser + +------------------------------------------------------------------- New: ---- smart-better-x86_64-support.patch smart-broken-repo-without-summary-or-description-workaround.diff smart-fix-archscore-add-disable-biarch-option.patch smart-newer.py smart-show-changelog.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ smart.spec ++++++ --- /var/tmp/diff_new_pack.a11644/_old 2007-03-01 21:37:34.000000000 +0100 +++ /var/tmp/diff_new_pack.a11644/_new 2007-03-01 21:37:34.000000000 +0100 @@ -20,17 +20,22 @@ %endif Summary: Smart Package Manager Version: 0.50 -Release: 2 +Release: 7 Source: %{name}-%{version}.tar.bz2 Source1: distro.py Source2: %{name}.desktop Source3: %{name}-ksmarttray.desktop +Source4: %{name}-newer.py Patch1: %{name}-channel-mirrors.patch Patch2: %{name}-rpm-check-signatures.patch Patch3: %{name}-ksmarttray-runsmart.patch Patch4: %{name}-ksmarttray.patch Patch5: %{name}-yast-media.patch +Patch6: %{name}-show-changelog.patch Patch99: %{name}-trunk.patch +Patch100: %{name}-fix-archscore-add-disable-biarch-option.patch +Patch101: %{name}-better-x86_64-support.patch +Patch102: %{name}-broken-repo-without-summary-or-description-workaround.diff URL: http://smartpm.org Group: System/Packages License: GNU General Public License (GPL) @@ -93,10 +98,14 @@ %patch3 %patch4 %patch5 +%patch6 %if %{suse_version} < 1010 echo ' sysconf.set("no-rpm-readHeaderFromFD", 3)' >> %{SOURCE1} %endif -%patch99 -p1 +%patch99 +%patch100 +%patch101 +%patch102 %build export CFLAGS="$RPM_OPT_FLAGS" @@ -125,6 +134,7 @@ %{__install} -m 0644 -D %{SOURCE2} $RPM_BUILD_ROOT/usr/share/applications/%{name}.desktop %{__install} -m 0644 -D %{SOURCE3} $RPM_BUILD_ROOT/usr/share/applications/%{name}-ksmarttray.desktop %{__install} -m 0644 -D smart/interfaces/images/smart.png $RPM_BUILD_ROOT/usr/share/pixmaps/smart.png +%{__install} %{SOURCE4} $RPM_BUILD_ROOT%{py_sitedir}/smart/commands/newer.py %if %{suse_version} < 1010 pushd contrib/rpmhelper python ./setup.py install --prefix=%{_prefix} --root="$RPM_BUILD_ROOT" @@ -190,7 +200,15 @@ /opt/kde3/bin/kde_add_smart_channel.sh /opt/kde3/share/apps/konqueror -%changelog -n smart +%changelog +* Thu Mar 01 2007 - cthiel@suse.de +- updated smart-trunk.patch to r857 +- added smart-show-changelog.patch by Mauricio Teixeira and Davodet Olivier + (http://tracker.labix.org/issue244) +- added smart-fix-archscore-add-disable-biarch-option.patch, + smart-broken-repo-without-summary-or-description-workaround.diff and + smart-better-x86_64-support.patch by Pascal Bleser (fixes #242782) +- added experimental command "newer" by Pascal Bleser * Wed Jan 31 2007 - cthiel@suse.de - readded smart-trunk.patch (r856) * Tue Jan 16 2007 - cthiel@suse.de ++++++ smart-better-x86_64-support.patch ++++++ --- smart/backends/rpm/base.py.orig 2006-12-04 17:38:26.000000000 +0100 +++ smart/backends/rpm/base.py 2006-11-22 00:44:44.000000000 +0100 @@ -185,9 +185,22 @@ def __lt__(self, other): rc = cmp(self.name, other.name) if type(other) is RPMPackage: + selfver, selfarch = splitarch(self.version) + otherver, otherarch = splitarch(other.version) + if archscore(selfarch) == 0: + return True + if archscore(otherarch) == 0: + return False + if os.uname()[4] == 'x86_64': + if selfarch != 'x86_64' and otherarch != 'x86_64': + pass + else: + if selfarch != 'x86_64': + return True + if otherarch != 'x86_64': + return False + if rc == 0 and self.version != other.version: - selfver, selfarch = splitarch(self.version) - otherver, otherarch = splitarch(other.version) if selfver != otherver: rc = vercmp(self.version, other.version) if rc == 0: ++++++ smart-broken-repo-without-summary-or-description-workaround.diff ++++++ --- smart/backends/rpm/header.py.orig 2006-07-29 01:45:12.000000000 +0200 +++ smart/backends/rpm/header.py 2006-07-29 02:17:35.000000000 +0200 @@ -87,22 +87,39 @@ return self._h[rpm.RPMTAG_SIZE] def getDescription(self): + if not self or not self._h: + return "" s = self._h[rpm.RPMTAG_DESCRIPTION] - for encoding in ENCODINGS: - try: - s = s.decode(encoding) - except UnicodeDecodeError: - continue - break - else: - s = "" + if not s: + return "" + if type(s) == list: + if len(s) > 0: + s = s[0] + if len(s) > 0: + for encoding in ENCODINGS: + try: + s = s.decode(encoding) + except UnicodeDecodeError: + continue + break + else: + s = "" return s def getSummary(self): + if not self._h: + return "" s = self._h[rpm.RPMTAG_SUMMARY] if not s: s = "" else: + if type(s) == list: + if len(s) > 0: + s = s[0] + else: + s = "" + + if len(s) > 0: for encoding in ENCODINGS: try: s = s.decode(encoding) ++++++ smart-fix-archscore-add-disable-biarch-option.patch ++++++ --- smart/backends/rpm/base.py +++ smart/backends/rpm/base.py @@ -41,11 +41,16 @@ traceback.print_exc() raise Error, _("'rpm' python module is not available") -archscore = rpm.archscore +def archscore(arch): + if sysconf.get("rpm-enable-biarch", True): + return rpm.archscore(arch) + if os.uname()[4] == 'x86_64' and arch != 'x86_64': + return 0 + return rpm.archscore(arch) __all__ = ["RPMPackage", "RPMProvides", "RPMNameProvides", "RPMPreRequires", "RPMRequires", "RPMUpgrades", "RPMConflicts", "RPMObsoletes", - "rpm", "getTS", "system_provides"] + "rpm", "getTS", "system_provides", "archscore"] def getTS(new=False): if not hasattr(getTS, "ts"): @@ -99,6 +104,11 @@ def equals(self, other): if self.name != other.name or self.version != other.version: return False + if not sysconf.get("rpm-enable-biarch", True): + selfver, selfarch = splitarch(self.version) + otherver, otherarch = splitarch(other.version) + if selfarch != otherarch: + return False if Package.equals(self, other): return True fk = dict.fromkeys @@ -141,8 +151,9 @@ return False selfver, selfarch = splitarch(self.version) otherver, otherarch = splitarch(other.version) - if getArchColor(selfarch) != getArchColor(otherarch): - return True + if sysconf.get("rpm-enable-biarch", True): + if getArchColor(selfarch) != getArchColor(otherarch): + return True if not pkgconf.testFlag("multi-version", self): return False return selfver != otherver --- smart/backends/rpm/header.py +++ smart/backends/rpm/header.py @@ -223,7 +223,7 @@ if h[1106]: # RPMTAG_SOURCEPACKAGE continue arch = h[1022] # RPMTAG_ARCH - if rpm.archscore(arch) == 0: + if archscore(arch) == 0: continue name = h[1000] # RPMTAG_NAME --- smart/backends/rpm/metadata.py +++ smart/backends/rpm/metadata.py @@ -168,7 +168,7 @@ skip = None elif tag == ARCH: - if rpm.archscore(elem.text) == 0: + if archscore(elem.text) == 0: skip = PACKAGE else: arch = elem.text --- smart/backends/rpm/redcarpet.py +++ smart/backends/rpm/redcarpet.py @@ -191,7 +191,7 @@ self._release = data def handleArchEnd(self, name, attrs, data): - if rpm.archscore(data) == 0: + if archscore(data) == 0: self._skip = self.PACKAGE else: self._arch = data --- smart/backends/rpm/synthesis.py +++ smart/backends/rpm/synthesis.py @@ -165,7 +165,7 @@ version, arch = version[:dot], version[dot+1:] versionarch = "@".join((version, arch)) - if rpm.archscore(arch) == 0: + if archscore(arch) == 0: continue name = "-".join(rpmnameparts[0:-2]) --- smart/backends/rpm/yast2.py +++ smart/backends/rpm/yast2.py @@ -188,7 +188,7 @@ raise Error("Error loading YaST2 channel info. Possibly " \ "corrupted file.\n%s" % self._pkginfofile) - if rpm.archscore(arch) <= 0: + if archscore(arch) <= 0: return name = nameparts[0] self.curpkgname = name ++++++ smart-show-changelog.patch ++++++ Index: smart/interfaces/gtk/packageinfo.py =================================================================== --- smart/interfaces/gtk/packageinfo.py (revisão 833) +++ smart/interfaces/gtk/packageinfo.py (cópia de trabalho) @@ -128,7 +128,26 @@ label = gtk.Label(_("Content")) self._notebook.append_page(sw, label) + sw = gtk.ScrolledWindow() + sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_ALWAYS) + sw.set_shadow_type(gtk.SHADOW_IN) + sw.set_border_width(5) + sw.show() + self._change = gtk.TextView() + self._change.set_editable(False) + self._change.set_cursor_visible(False) + self._change.set_left_margin(5) + self._change.set_right_margin(5) + self._change.show() + buffer = self._change.get_buffer() + buffer.create_tag("changetime", font_desc=boldfont) + buffer.create_tag("changelog", font_desc=font) + sw.add(self._change) + + label = gtk.Label(_("Changelog")) + self._notebook.append_page(sw, label) + self._relations = GtkPackageView() self._relations.set_border_width(5) self._relations.getTreeView().set_headers_visible(False) @@ -273,7 +292,31 @@ contbuf.insert_with_tags_by_name(iter, path+"\n", "content") elif num == 3: + # Update changelog + contbuf = self._change.get_buffer() + contbuf.set_text("") + if not pkg: return + + iter = contbuf.get_end_iter() + for loader in pkg.loaders: + if loader.getInstalled(): + break + else: + loader = pkg.loaders.keys()[0] + info = loader.getInfo(pkg) + changelog = info.getChangeLog() + + for i in range(len(changelog)/2): + contbuf.insert_with_tags_by_name(iter, changelog[2*i]+"\n", "changetime") + changesplit = changelog[2*i+1].split("\n") + changedetails = changesplit[0] + "\n" + for i in range(1, len(changesplit)): + changedetails += " " + changesplit[i] + "\n" + contbuf.insert_with_tags_by_name(iter, changedetails, "changelog") + + elif num == 4: + # Update relations if not pkg: @@ -282,7 +325,7 @@ self._setRelations(pkg) - elif num == 4: + elif num == 5: # Update URLs Index: smart/cache.py =================================================================== --- smart/cache.py (revisão 833) +++ smart/cache.py (cópia de trabalho) @@ -149,6 +149,9 @@ def getPathList(self): return [] + def getChangeLog(self): + return [] + def pathIsDir(self, path): return None Index: smart/commands/info.py =================================================================== --- smart/commands/info.py (revisão 833) +++ smart/commands/info.py (cópia de trabalho) @@ -46,6 +46,8 @@ help=_("show URLs")) parser.add_option("--paths", action="store_true", help=_("show path list")) + parser.add_option("--changelog", action="store_true", + help=_("show change log")) opts, args = parser.parse_args(argv) opts.args = args return opts @@ -157,4 +159,21 @@ print "", entry print + if opts.changelog: + print " ", _("Changelog:") + for loader in pkg.loaders: + if loader.getInstalled(): + break + else: + loader = pkg.loaders.keys()[0] + info = loader.getInfo(pkg) + changelog = info.getChangeLog() + for i in range(len(changelog)/2): + print " ", "%s" % changelog[2*i] + changesplit = changelog[2*i+1].split("\n") + print " ", "%s" % changesplit[0] + for i in range(1, len(changesplit)): + print " ", "%s" % changesplit[i] + print + # vim:ts=4:sw=4:et Index: smart/backends/rpm/header.py =================================================================== --- smart/backends/rpm/header.py (revisão 833) +++ smart/backends/rpm/header.py (cópia de trabalho) @@ -30,6 +30,8 @@ import locale import stat import os +from datetime import datetime +import time try: import rpmhelper @@ -64,6 +66,7 @@ PackageInfo.__init__(self, package, order) self._loader = loader self._path = None + self._change = None def getReferenceURLs(self): url = self._h[rpm.RPMTAG_URL] @@ -125,6 +128,23 @@ s = "" return s + def getChangeLog(self): + if self._change is None: + logname = self._h[rpm.RPMTAG_CHANGELOGNAME] + logtime = self._h[rpm.RPMTAG_CHANGELOGTIME] + change = self._h[rpm.RPMTAG_CHANGELOGTEXT] + if type(logname) != list: + logname = [logname] + if type(logtime) != list: + logtime = [logtime] + if type(change) != list: + change = [change] + self._change = {} + for i in range(len(change)): + self._change[2*i] = datetime.fromtimestamp(logtime[i]).strftime("%Y-%m-%d")+" "+ logname[i] + self._change[2*i+1] = " " + change[i] + return self._change + def getPathList(self): if self._path is None: paths = self._h[rpm.RPMTAG_OLDFILENAMES] ++++++ smart-trunk.patch ++++++ ++++ 89995 lines (skipped) ++++ between smart/smart-trunk.patch ++++ and /mounts/work_src_done/STABLE/smart/smart-trunk.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de