Mailinglist Archive: zypp-commit (233 mails)

< Previous Next >
[zypp-commit] <libzypp> master : Remove obsolete NameKindProxy
  • From: Michael Andres <ma@xxxxxxx>
  • Date: Wed, 4 Nov 2009 16:46:11 +0100
  • Message-id: <E1N6WCT-0006AS-60@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit d00aaabe2738101555e6899efc9a778afda6f225
Author: Michael Andres <ma@xxxxxxx>
Date: Wed Nov 4 16:39:54 2009 +0100

Remove obsolete NameKindProxy
---
devel/devel.ma/Ex.cc | 1 -
devel/devel.ma/FakePool.h | 1 -
devel/devel.ma/MaTest.cc | 23 -----
devel/devel.ma/Main.cc | 44 +++-------
devel/devel.ma/NewPool.cc | 23 -----
devel/devel.ma/Parse.cc | 23 -----
zypp/CMakeLists.txt | 2 -
zypp/NameKindProxy.cc | 97 ---------------------
zypp/NameKindProxy.h | 165 ------------------------------------
zypp/solver/detail/InstallOrder.cc | 1 -
zypp/zypp_detail/ZYppImpl.cc | 1 -
11 files changed, 13 insertions(+), 368 deletions(-)

diff --git a/devel/devel.ma/Ex.cc b/devel/devel.ma/Ex.cc
index de6301f..97a49b7 100644
--- a/devel/devel.ma/Ex.cc
+++ b/devel/devel.ma/Ex.cc
@@ -18,7 +18,6 @@
#include "zypp/Language.h"
#include "zypp/Digest.h"
#include "zypp/PackageKeyword.h"
-#include "zypp/NameKindProxy.h"
#include "zypp/pool/GetResolvablesToInsDel.h"

#include "zypp/parser/TagParser.h"
diff --git a/devel/devel.ma/FakePool.h b/devel/devel.ma/FakePool.h
index d95c8cf..30c2c57 100644
--- a/devel/devel.ma/FakePool.h
+++ b/devel/devel.ma/FakePool.h
@@ -16,7 +16,6 @@
#include "zypp/ZYppFactory.h"
#include "zypp/ResPool.h"
#include "zypp/ResPoolProxy.h"
-#include "zypp/NameKindProxy.h"
#include "zypp/CapFactory.h"

#include "zypp/Atom.h"
diff --git a/devel/devel.ma/MaTest.cc b/devel/devel.ma/MaTest.cc
index fc2ac75..3c38d15 100644
--- a/devel/devel.ma/MaTest.cc
+++ b/devel/devel.ma/MaTest.cc
@@ -24,7 +24,6 @@
#include "zypp/PackageKeyword.h"
#include "zypp/TmpPath.h"
#include "zypp/ManagedFile.h"
-#include "zypp/NameKindProxy.h"
#include "zypp/pool/GetResolvablesToInsDel.h"

#include "zypp/RepoManager.h"
@@ -219,28 +218,6 @@ struct StatusInstall : public SetTransactValue
{}
};

-inline bool g( const NameKindProxy & nkp, Arch arch = Arch() )
-{
- if ( nkp.availableEmpty() )
- {
- ERR << "No Item to select: " << nkp << endl;
- return false;
- ZYPP_THROW( Exception("No Item to select") );
- }
-
- if ( arch != Arch() )
- {
- typeof( nkp.availableBegin() ) it = nkp.availableBegin();
- for ( ; it != nkp.availableEnd(); ++it )
- {
- if ( (*it)->arch() == arch )
- return (*it).status().setTransact( true, ResStatus::USER );
- }
- }
-
- return nkp.availableBegin()->status().setTransact( true, ResStatus::USER );
-}
-
///////////////////////////////////////////////////////////////////

bool solve()
diff --git a/devel/devel.ma/Main.cc b/devel/devel.ma/Main.cc
index 7fe1c36..1cbdfee 100644
--- a/devel/devel.ma/Main.cc
+++ b/devel/devel.ma/Main.cc
@@ -6,7 +6,7 @@
///////////////////////////////////////////////////////////////////

//static const Pathname sysRoot( getenv("SYSROOT") ? getenv("SYSROOT") :
"/Local/ROOT" );
-static const Pathname sysRoot( "/tmp/ToolScanRepos" );
+static const Pathname sysRoot( "/" );

///////////////////////////////////////////////////////////////////

@@ -71,41 +71,23 @@ try {
dumpRange( USR, satpool.reposBegin(), satpool.reposEnd() ) << endl;
USR << "pool: " << pool << endl;

- sat::AttrMatcher matches( "^aaa_base$", Match::REGEX );
-
- getZYpp()->resolver()->addRequire( Capability("aaa_base") );
-
- solve();
- for_( it, make_filter_begin<resfilter::ByTransact>(pool),
make_filter_end<resfilter::ByTransact>(pool) )
{
- USR << *it << " " << (*it)->repoInfo().name() << endl;
- if ( matches( (*it)->name() ) )
- {
- SEC << *it << " " << (*it)->repoInfo().name() << endl;
- }
+ PoolQuery q;
+ q.addAttribute( sat::SolvAttr::name, "yast2-samba-server" );
+ MIL << dump(q) << endl;
}
-
- std::vector<std::string> words;
- str::split( "3ddiag ConsoleKit-x11 FZFangSong FZKaiTiB IPAGothic ImageMagick
MozillaFirefox MozillaFirefox-branding-Moblin MozillaFirefox-translations
NetworkManager OpenOffice_org OpenOffice_org-LanguageTool
OpenOffice_org-LanguageTool-de OpenOffice_org-LanguageTool-en
OpenOffice_org-LanguageTool-es OpenOffice_org-LanguageTool-fr
OpenOffice_org-LanguageTool-it OpenOffice_org-LanguageTool-nl
OpenOffice_org-LanguageTool-pl OpenOffice_org-LanguageTool-sv
OpenOffice_org-base OpenOffice_org-base-extensions OpenOffice_org-branding-SLED
OpenOffice_org-calc OpenOffice_org-calc-extensions OpenOffice_org-components
OpenOffice_org-draw OpenOffice_org-draw-extensions OpenOffice_org-filters
OpenOffice_org-filters-optional OpenOffice_org-gnome OpenOffice_org-hyphen
OpenOffice_org-icon-themes OpenOffice_org-impress
OpenOffice_org-impress-extensions OpenOffice_org-l10n-de OpenOffice_org-l10n-el
OpenOffice_org-l10n-en-GB OpenOffice_org-l10n-es OpenOffice_org-l10n-extras
OpenOffice_org-l10
n-fi OpenOffice_org-l10n-fr OpenOffice_org-l10n-it OpenOffice_org-l10n-ja
OpenOffice_org-l10n-ko OpenOffice_org-l10n-nl OpenOffice_org-l10n-pl
OpenOffice_org-l10n-pt OpenOffice_org-l10n-pt-BR OpenOffice_org-l10n-ru
OpenOffice_org-l10n-sv OpenOffice_org-l10n-zh-CN OpenOffice_org-l10n-zh-TW
OpenOffice_org-libs-core OpenOffice_org-libs-extern OpenOffice_org-libs-gui
OpenOffice_org-math OpenOffice_org-openclipart OpenOffice_org-templates-en
OpenOffice_org-templates-labels-a4 OpenOffice_org-templates-labels-letter
OpenOffice_org-templates-presentation-layouts OpenOffice_org-thesaurus-de
OpenOffice_org-thesaurus-en OpenOffice_org-thesaurus-es
OpenOffice_org-thesaurus-fr OpenOffice_org-thesaurus-pl
OpenOffice_org-thesaurus-pt OpenOffice_org-thesaurus-ru
OpenOffice_org-thesaurus-sk OpenOffice_org-thesaurus-sv OpenOffice_org-ure
OpenOffice_org-writer OpenOffice_org-writer-extensions PackageKit PolicyKit
PolicyKit-gnome SDL SDL_image SDL_mixer SDL_net SDL_ttf SuSEfirewall2
WorldOfGooD
emo a2ps aaa_base acct acl acpid acroread agfa-fonts alsa alsa-tools
amavisd-new anerley anjal ash at atk attr audit-libs autoyast2-installation
avahi backup-manager baekmuk-ttf banshee-1 banshee-1-backend-engine-gstreamer
banshee-1-backend-platform-gnome banshee-1-backend-platform-unix
banshee-1-extensions-default banshee-1-novell-aac bash bc bind-libs bind-utils
binutils bisho bitstream-vera blt bluez bluez-alsa bluez-cups bluez-firmware
bluez-gnome bluez-gstreamer bootchart bootsplash-branding-SLED branding-SLED
brasero bzip2 cabextract cairo cdrkit-cdrtools-compat checkmedia cheese
cifs-mount clutter-mozembed compat convmv coreutils cpio cpp cpufrequtils
cracklib cracklib-dict-full cron cryptconfig csync cubano cups cups-autoconfig
cups-backends cups-client cups-drivers cups-libs curl cyrus-sasl
cyrus-sasl-crammd5 cyrus-sasl-digestmd5 cyrus-sasl-gssapi cyrus-sasl-plain
dalston dates db-utils dbus-1 dbus-1-glib dbus-1-x11 dejavu deltarpm
desktop-file-utils desktop-transla
tions device-mapper dhcpcd dialog diffutils dirmngr dmraid dos2unix dosfstools
e2fsprogs ed eject elfutils empathy ethtool evince evolution evolution-pilot
expat extreme-tuxracer f-spot fbset file file-roller filesystem fillup filters
findutils finger flash-player fontconfig fonts-config foomatic-filters freeglut
freetype freetype2 fribidi frozen-bubble gammu gawk gcalctool
gconf2-branding-SLED gdb gdbm gdm gdm-branding-upstream gedit geoclue
gettext-runtime gftp gfxboot-branding-SLED ghostscript-fonts-other
ghostscript-fonts-std ghostscript-library ghostscript-x11 giflib gimp glib
glib2 glib2-branding-Moblin glibc glibc-locale gnome-audio gnome-control-center
gnome-desktop gnome-games gnome-icon-theme gnome-keyring gnome-keyring-pam
gnome-media gnome-menus gnome-mime-data gnome-mount gnome-packagekit
gnome-panel gnome-pilot gnome-session gnome-spell2 gnome-system-monitor
gnome-terminal gnome-themes gnome-utils gnome-vfs2 gnome-web-photo gpart gpg2
gpgme gphoto gpm gpsd grep
groff grub gstreamer-0_10 gstreamer-0_10-plugins-base
gstreamer-0_10-plugins-farsight gstreamer-0_10-plugins-good
gstreamer-0_10-schroedinger gstreamer-0_10-utils gsynaptics gtk gtk2
gtk2-branding-SLED gtk2-engines gtk2-theme-SLED gtk2-themes gtkhtml2 gtkspell
gutenprint gvfs-backends gypsy gzip hal hdparm hornsey hwinfo ifplugd imlib
info initviocons inkscape insserv iproute2 iptables iputils ipw-firmware ispell
ispell-american ispell_english_dictionary iw iwl3945-ucode iwl4965-ucode
iwl5000-ucode jana java-1_6_0-sun java-1_6_0-sun-plugin json-glib
kernel-default kernel-default-base kernel-default-extra kernel-firmware klogd
krb5 ksymoops laptop-mode-tools lcms less libQtWebKit4 libacl libattr
libblocxx6 libbluetooth3 libclutter-box2d-0_10-0 libclutter-glx-1_0-0
libclutter-gst-1_0-0 libclutter-gtk-1_0-0 libclutter-qt-1_0-0 libdb-4_5
libevent-1_4-2 libfakekey0 libfprint0 libgcc43 libgcrypt11 libgimpprint
libgpg-error0 libgsf-gnome libjpeg libmikmod libmng libmoon0 libnetpbm
10 libnscd libopensync-plugin-file libpcap0 libpng12-0 libproxy-tools
libproxy0 libproxy0-gnome libproxy0-mozjs libproxy0-networkmanager libreadline5
librpcsecgss libsmbios-bin libstdc++33 libstdc++43 libtiff3 libusbpp-0_1-4
libxcrypt libxml2 libxslt libzio libzypp lilo limal limal-perl linux-atm-lib
login logrotate lsof lukemftp m4 mailx make man man-pages manufacturer-PPDs
master-boot-code mdadm meerkat metacity metamail microcode_ctl mingetty
mkinitrd moblin-branding-Samsung moblin-gtk-engine moblin-icon-theme
moblin-menus moblin-registration moblin-release moblin-sound-theme
moblin-ux-settings moblin-web-browser module-init-tools mojito monsoon
moonlight-plugin moonshine moonshine-plugin mousetweaks mozilla-filesystem
mozilla-xulrunner190 mtools mutter mutter-moblin myspell-american
myspell-british myspell-dutch myspell-french myspell-german myspell-greek
myspell-italian myspell-polish myspell-portuguese myspell-russian
myspell-spanish myspell-swedish nautilus nautilus-c
d-burner nautilus-eiciel nautilus-open-terminal nautilus-sendto nautilus-share
nbtk ncurses-utils net-tools netcat netcfg network-manager-netbook neverball
nfsidmap notification-daemon novell-ipsec-tools novell-ldapext
novell-nortelplugins nscd nspluginwrapper nss_ldap ntfs-3g ntfsprogs ntp
numlockx openclipart-svg openldap2-client openmotif-libs openobex opensc
openslp openssh openssh-askpass openssl padevchooser pam pam-config pam-modules
pam_csync pam_krb5 pam_ldap pam_p11 pam_pkcs11 pam_radius pam_smb pam_ssh paman
paprefs parted pavucontrol pavumeter pciutils pcmciautils pcre pcsc-lite perl
perl-Bootloader perl-Config-Crontab perl-Crypt-SmbHash perl-Digest-MD4
perl-Digest-SHA1 perl-Parse-RecDescent perl-TermReadKey perl-X500-DN
perl-XML-XPath perl-base perl-gettext perl-satsolver permissions pinentry-gtk2
planner plymouth-lite pmtools polkit-default-privs popt postfix ppp pptp
preload procinfo procmail procps psmisc pulseaudio-esound-compat
pulseaudio-module-bluetooth p
ulseaudio-module-gconf pulseaudio-module-lirc pulseaudio-module-x11
pulseaudio-module-zeroconf pulseaudio-utils pwdutils python python-gnome
python-gtk python-numeric python-qt python-tk python-xml rdesktop recode
reiserfs release-notes-sled rest rpm rsh rsync rsyslog rtc-tzset samba
samba-client sample-media-images samsung-icon-theme samsung-manual sash sax2
sax2-gui sax2-ident sax2-libsax sax2-libsax-perl sax2-tools scim scim-bridge
scim-bridge-clutter scim-bridge-gtk scim-bridge-qt scim-chewing scim-m17n
scim-pinyin scim-tables scim-tables-zh screen seahorse sed setserial sg3_utils
shared-mime-info sled-manuals_en sled-moblinquick_en sled-moblinquick_en-pdf
splashy splashy-branding-SLED sqlite3 sreadahead star startup-notification
strace sudo supportutils suse-build-key suse-sam suseRegister susehelp
susehelp_en suspend syncevolution sysconfig sysfsutils syslinux
system-config-printer sysvinit tango-icon-theme tar tcl-devel tcpd tcsh telnet
terminfo tightvnc timezone tk-d
evel translation-update tsclient turnpike twitter-glib udev ulimit unrar unzip
usbutils utempter util-linux uxlaunch vbetool vim vim-data vte w3m wdiff wget
wimax-tools wireless-tools wol words wpa_supplicant wvdial wvstreams
x11-input-synaptics x11-tools x86info xchat xdmbgrd xfsprogs xkeyboard-config
xorg-x11 xorg-x11-Xvnc xorg-x11-driver-input xorg-x11-driver-video
xorg-x11-fonts xorg-x11-libX11-ccache xorg-x11-libs xorg-x11-server
xorg-x11-server-extra xorg-x11-xauth xpdf-tools xterm xtermset xulrunner yast2
yast2-bootloader yast2-branding-SLED yast2-control-center-gnome yast2-core
yast2-country yast2-firewall yast2-firstboot yast2-gtk yast2-hardware-detection
yast2-installation yast2-kerberos-client yast2-ldap yast2-ldap-client
yast2-metapackage-handler yast2-mouse yast2-ncurses yast2-ncurses-pkg
yast2-network yast2-ntp-client yast2-online-update yast2-online-update-frontend
yast2-packager yast2-pam yast2-perl-bindings yast2-pkg-bindings yast2-qt
yast2-qt-pkg yast2-rdp
yast2-registration yast2-registration-branding-SLE yast2-repair yast2-runlevel
yast2-samba-client yast2-schema yast2-security yast2-slp yast2-sound
yast2-storage yast2-storage-lib yast2-support yast2-sysconfig yast2-theme-SLE
yast2-trans-en_GB yast2-trans-en_US yast2-trans-es yast2-trans-fi
yast2-trans-fr yast2-trans-ja yast2-trans-ko yast2-trans-pt_BR
yast2-trans-stats yast2-trans-sv yast2-trans-zh_CN yast2-trans-zh_TW
yast2-transfer yast2-tune yast2-update yast2-users yast2-wagon yast2-x11
yast2-xml yelp youtube-player zenity zip zlib",
- std::back_inserter(words) );
- for_( it, words.begin(), words.end() )
- {
- getZYpp()->resolver()->addRequire( Capability(*it) );
+ {
+ PoolQuery q;
+ q.addAttribute( sat::SolvAttr::name, "yast2-samba-server" );
+ q.addKind( ResKind::patch );
+ MIL << dump(q) << endl;
}
-
- getZYpp()->resolver()->addRequire( Capability("aaa_base > 11-6.2") );
-
- solve();
- for_( it, make_filter_begin<resfilter::ByTransact>(pool),
make_filter_end<resfilter::ByTransact>(pool) )
- {
- USR << *it << " " << (*it)->repoInfo().name() << endl;
- if ( matches( (*it)->name() ) )
- {
- SEC << *it << " " << (*it)->repoInfo().name() << endl;
- }
+ {
+ PoolQuery q;
+ q.addAttribute( sat::SolvAttr::name, "patch:yast2-samba-server" );
+ MIL << dump(q) << endl;
}

-
if ( 0 )
{
getZYpp()->resolver()->addRequire( Capability("emacs") );
diff --git a/devel/devel.ma/NewPool.cc b/devel/devel.ma/NewPool.cc
index 1596cdc..d96c453 100644
--- a/devel/devel.ma/NewPool.cc
+++ b/devel/devel.ma/NewPool.cc
@@ -25,7 +25,6 @@
#include "zypp/TmpPath.h"
#include "zypp/ManagedFile.h"
#include "zypp/MediaSetAccess.h"
-#include "zypp/NameKindProxy.h"
#include "zypp/pool/GetResolvablesToInsDel.h"

#include "zypp/RepoManager.h"
@@ -226,28 +225,6 @@ struct StatusInstall : public SetTransactValue
{}
};

-inline bool g( const NameKindProxy & nkp, Arch arch = Arch() )
-{
- if ( nkp.availableEmpty() )
- {
- ERR << "No Item to select: " << nkp << endl;
- return false;
- ZYPP_THROW( Exception("No Item to select") );
- }
-
- if ( arch != Arch() )
- {
- typeof( nkp.availableBegin() ) it = nkp.availableBegin();
- for ( ; it != nkp.availableEnd(); ++it )
- {
- if ( (*it)->arch() == arch )
- return (*it).status().setTransact( true, ResStatus::USER );
- }
- }
-
- return nkp.availableBegin()->status().setTransact( true, ResStatus::USER );
-}
-
///////////////////////////////////////////////////////////////////

bool solve()
diff --git a/devel/devel.ma/Parse.cc b/devel/devel.ma/Parse.cc
index 7a0bdb3..2847296 100644
--- a/devel/devel.ma/Parse.cc
+++ b/devel/devel.ma/Parse.cc
@@ -19,7 +19,6 @@
#include "zypp/Digest.h"
#include "zypp/PackageKeyword.h"
#include "zypp/ManagedFile.h"
-#include "zypp/NameKindProxy.h"
#include "zypp/pool/GetResolvablesToInsDel.h"

#include "zypp/parser/TagParser.h"
@@ -203,28 +202,6 @@ struct StatusInstall : public SetTransactValue
{}
};

-inline bool g( const NameKindProxy & nkp, Arch arch = Arch() )
-{
- if ( nkp.availableEmpty() )
- {
- ERR << "No Item to select: " << nkp << endl;
- return false;
- ZYPP_THROW( Exception("No Item to select") );
- }
-
- if ( arch != Arch() )
- {
- typeof( nkp.availableBegin() ) it = nkp.availableBegin();
- for ( ; it != nkp.availableEnd(); ++it )
- {
- if ( (*it)->arch() == arch )
- return (*it).status().setTransact( true, ResStatus::USER );
- }
- }
-
- return nkp.availableBegin()->status().setTransact( true, ResStatus::USER );
-}
-
///////////////////////////////////////////////////////////////////

bool solve( bool establish = false )
diff --git a/zypp/CMakeLists.txt b/zypp/CMakeLists.txt
index bbceaa3..e62b5c2 100644
--- a/zypp/CMakeLists.txt
+++ b/zypp/CMakeLists.txt
@@ -33,7 +33,6 @@ SET( zypp_SRCS
Locks.cc
MediaProducts.cc
MediaSetAccess.cc
- NameKindProxy.cc
OnMediaLocation.cc
Package.cc
Patch.cc
@@ -122,7 +121,6 @@ SET( zypp_HEADERS
ManagedFile.h
MediaProducts.h
MediaSetAccess.h
- NameKindProxy.h
Vendor.h
OnMediaLocation.h
Package.h
diff --git a/zypp/NameKindProxy.cc b/zypp/NameKindProxy.cc
deleted file mode 100644
index b3ddf65..0000000
--- a/zypp/NameKindProxy.cc
+++ /dev/null
@@ -1,97 +0,0 @@
-/*---------------------------------------------------------------------\
-| ____ _ __ __ ___ |
-| |__ / \ / / . \ . \ |
-| / / \ V /| _/ _/ |
-| / /__ | | | | | | |
-| /_____||_| |_| |_| |
-| |
-\---------------------------------------------------------------------*/
-/** \file zypp/NameKindProxy.cc
- *
-*/
-#include <iostream>
-
-#include "zypp/base/Easy.h"
-#include "zypp/NameKindProxy.h"
-
-using std::endl;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
- namespace
- {
- /** \todo Move it to base/IOStream.h */
- template<class _Tp>
- struct PrintOn : public std::unary_function<_Tp, bool>
- {
- bool operator()( const _Tp & obj )
- {
- _str << _prfx << obj << std::endl;
- return true;
- }
-
- PrintOn( std::ostream & str, const std::string & prfx = std::string() )
- : _str( str )
- , _prfx( prfx )
- {}
- std::ostream & _str;
- std::string _prfx;
- };
- }
-
- ///////////////////////////////////////////////////////////////////
- //
- // CLASS NAME : NameKindProxy
- //
- ///////////////////////////////////////////////////////////////////
-
- ///////////////////////////////////////////////////////////////////
- //
- // METHOD NAME : NameKindProxy::NameKindProxy
- // METHOD TYPE : Ctor
- //
- NameKindProxy::NameKindProxy( ResPool pool_r, const C_Str & name_r,
Resolvable::Kind kind_r )
- : _kind( kind_r )
- , _name( name_r )
- {
- for_( it, pool_r.byIdentBegin( kind_r, _name ), pool_r.byIdentEnd(
kind_r, _name ) )
- {
- if ( it->status().isInstalled() )
- _installed.insert( *it ) ;
- else
- _available.insert( *it );
- }
- }
-
- NameKindProxy::NameKindProxy( ResPool pool_r, IdString name_r,
Resolvable::Kind kind_r )
- : _kind( kind_r )
- , _name( name_r )
- {
- for_( it, pool_r.byIdentBegin( kind_r, _name ), pool_r.byIdentEnd(
kind_r, _name ) )
- {
- if ( it->status().isInstalled() )
- _installed.insert( *it ) ;
- else
- _available.insert( *it );
- }
- }
-
- /******************************************************************
- **
- ** FUNCTION NAME : operator<<
- ** FUNCTION TYPE : std::ostream &
- */
- std::ostream & operator<<( std::ostream & str, const NameKindProxy & obj )
- {
- str << "[" << obj.kind() << "] " << obj.name()
- << " {" << obj.installedSize() << "/" << obj.availableSize() << "}" <<
endl;
- std::for_each( obj.installedBegin(), obj.installedEnd(),
PrintOn<PoolItem>(str," ") );
- std::for_each( obj.availableBegin(), obj.availableEnd(),
PrintOn<PoolItem>(str," ") );
- return str;
- }
-
- /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/NameKindProxy.h b/zypp/NameKindProxy.h
deleted file mode 100644
index cd77a62..0000000
--- a/zypp/NameKindProxy.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/*---------------------------------------------------------------------\
-| ____ _ __ __ ___ |
-| |__ / \ / / . \ . \ |
-| / / \ V /| _/ _/ |
-| / /__ | | | | | | |
-| /_____||_| |_| |_| |
-| |
-\---------------------------------------------------------------------*/
-/** \file zypp/NameKindProxy.h
- *
-*/
-#ifndef ZYPP_NAMEKINDPROXY_H
-#define ZYPP_NAMEKINDPROXY_H
-
-#include <iosfwd>
-#include <set>
-
-#include "zypp/ResPool.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
- namespace name_kind_proxy_details
- {
- struct IOrder : public std::binary_function<PoolItem,PoolItem,bool>
- {
- // NOTE: operator() provides LESS semantics to order the set.
- // So LESS means 'prior in set'. We want the last item installed
- // first.
- /** \todo let ResObject provide installtime */
- bool operator()( const PoolItem & lhs, const PoolItem & rhs ) const
- {
- // top should be installtime!
-
- int res = lhs->arch().compare( rhs->arch() );
- if ( res )
- return res > 0;
- res = lhs->edition().compare( rhs->edition() );
- if ( res )
- return res > 0;
-
- // no more criteria, still equal:
- // use the ResObject::constPtr (the poiner value)
- // (here it's arbitrary whether < or > )
- return lhs.resolvable() < rhs.resolvable();
- }
- };
-
- struct AOrder : public std::binary_function<PoolItem,PoolItem,bool>
- {
- // NOTE: operator() provides LESS semantics to order the set.
- // So LESS means 'prior in set'. We want 'better' archs and
- // 'better' editions at the beginning of the set. So we return
- // TRUE if (lhs > rhs)!
- //
- bool operator()( const PoolItem & lhs, const PoolItem & rhs ) const
- {
- int res = lhs->arch().compare( rhs->arch() );
- if ( res )
- return res > 0;
- res = lhs->edition().compare( rhs->edition() );
- if ( res )
- return res > 0;
-
- // no more criteria, still equal:
- // use the ResObject::constPtr (the poiner value)
- // (here it's arbitrary whether < or > )
- return lhs.resolvable() < rhs.resolvable();
- }
- };
- }
-
- ///////////////////////////////////////////////////////////////////
- //
- // CLASS NAME : NameKindProxy
- //
- /** Retrieve and maintain PoolItem of a certain name and kind.
- *
- * Installed PoolItems are sorted according to their installtime
- * (last installed first).
- *
- * Available PoolItems are sorted 'best first'.
- *
- * \todo provide status query and manipulation methods
- */
- class NameKindProxy
- {
- typedef name_kind_proxy_details::IOrder IOrder;
- typedef name_kind_proxy_details::AOrder AOrder;
- public:
- typedef std::set<PoolItem,IOrder> InstalledSet;
- typedef InstalledSet::iterator Installed_iterator;
- typedef InstalledSet::const_iterator Installed_const_iterator;
- typedef InstalledSet::size_type Installed_size_type;
-
- typedef std::set<PoolItem,AOrder> AvailableSet;
- typedef AvailableSet::iterator Available_iterator;
- typedef AvailableSet::const_iterator Available_const_iterator;
- typedef AvailableSet::size_type Available_size_type;
-
- public:
- NameKindProxy( ResPool pool_r, IdString name_r, ResKind kind_r );
- NameKindProxy( ResPool pool_r, const C_Str & name_r, ResKind kind_r );
-
- public:
- ResKind kind() const
- { return _kind; }
-
- IdString name() const
- { return _name; }
-
- public:
- Installed_size_type installedSize() const
- { return _installed.size(); }
-
- bool installedEmpty() const
- { return _installed.empty(); }
-
- Installed_const_iterator installedBegin() const
- { return _installed.begin(); }
-
- Installed_const_iterator installedEnd() const
- { return _installed.end(); }
-
- public:
- Available_size_type availableSize() const
- { return _available.size(); }
-
- bool availableEmpty() const
- { return _available.empty(); }
-
- Available_const_iterator availableBegin() const
- { return _available.begin(); }
-
- Available_const_iterator availableEnd() const
- { return _available.end(); }
-
- public:
-
- // status query and manip stuff...
-
- private:
- ResKind _kind;
- IdString _name;
- InstalledSet _installed;
- AvailableSet _available;
- };
- ///////////////////////////////////////////////////////////////////
-
- /** \relates NameKindProxy Stream output. */
- std::ostream & operator<<( std::ostream & str, const NameKindProxy & obj );
-
- /** \relates NameKindProxy Convenience construction. */
- template<class _Res>
- inline NameKindProxy nameKindProxy( ResPool pool_r, IdString name_r )
- { return NameKindProxy( pool_r, name_r, ResTraits<_Res>::kind ); }
- template<class _Res>
- inline NameKindProxy nameKindProxy( ResPool pool_r, const C_Str & name_r )
- { return NameKindProxy( pool_r, name_r, ResTraits<_Res>::kind ); }
-
- /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_NAMEKINDPROXY_H
diff --git a/zypp/solver/detail/InstallOrder.cc
b/zypp/solver/detail/InstallOrder.cc
index 8bae34b..d1cdbf1 100644
--- a/zypp/solver/detail/InstallOrder.cc
+++ b/zypp/solver/detail/InstallOrder.cc
@@ -36,7 +36,6 @@

#include "zypp/ResFilters.h"
#include "zypp/ResStatus.h"
-#include "zypp/NameKindProxy.h"
#include "zypp/sat/Pool.h"
#include <zypp/sat/WhatObsoletes.h>

diff --git a/zypp/zypp_detail/ZYppImpl.cc b/zypp/zypp_detail/ZYppImpl.cc
index 740646c..58c753c 100644
--- a/zypp/zypp_detail/ZYppImpl.cc
+++ b/zypp/zypp_detail/ZYppImpl.cc
@@ -20,7 +20,6 @@
#include "zypp/target/TargetImpl.h"
#include "zypp/ZYpp.h"
#include "zypp/DiskUsageCounter.h"
-#include "zypp/NameKindProxy.h"
#include "zypp/ZConfig.h"
#include "zypp/sat/Pool.h"
#include "zypp/PoolItem.h"
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages