Skip to content

Commit

Permalink
Merge pull request #11 from tgoettlicher/master
Browse files Browse the repository at this point in the history
check pick list and installed obj for package classification
  • Loading branch information
tgoettlicher committed Aug 2, 2013
2 parents 2b6c829 + a5dbedc commit d4aa44c
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 98 deletions.
12 changes: 12 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
-------------------------------------------------------------------
Fri Aug 2 15:08:35 CEST 2013 - tgoettlicher@suse.de

- bnc#831758: fix symbol icons
- Version 2.42.13

-------------------------------------------------------------------
Tue Jul 30 13:10:44 CEST 2013 - tgoettlicher@suse.de

- check pick list and installed obj for package classification
- Version 2.42.12

-------------------------------------------------------------------
Tue Jul 16 11:07:45 CEST 2013 - tgoettlicher@suse.de

Expand Down
71 changes: 0 additions & 71 deletions DELETE_WHEN_NO_LONGER_NEEDED_yast2-qt-pkg.spec.in

This file was deleted.

8 changes: 6 additions & 2 deletions PROJECTINFO.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@ SET( DESCRIPTION "This package contains the Qt package selector\ncomponen

## Things to cleanup; probably too yast2 related

IF( NOT PREFIX )
SET( PREFIX "/usr" )
ENDIF( NOT PREFIX )

# used in src/icons and YQPackageSelectorHelp.cc (via -DHELPIMAGEDIR) probably specific to this file
SET( INSTALL_HELP_ICONS_DIR "${CMAKE_INSTALL_PREFIX}/share/YaST2/images" )
SET( INSTALL_HELP_ICONS_DIR "${PREFIX}/share/YaST2/images" )

# maybe '#include <yui/Libyui_config.h>' rather than using '-DTHEMEDIR'
SET( YUIQT_THEMEDIR "${CMAKE_INSTALL_PREFIX}/share/YaST2/theme" )
SET( YUIQT_THEMEDIR "${PREFIX}/share/YaST2/theme" )
2 changes: 1 addition & 1 deletion VERSION.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SET( VERSION_MAJOR "2" )
SET( VERSION_MINOR "42" )
SET( VERSION_PATCH "11" )
SET( VERSION_PATCH "13" )
SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" )

##### This is need for the libyui core, ONLY.
Expand Down
1 change: 1 addition & 0 deletions libyui-qt-pkg.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ rm -rf "$RPM_BUILD_ROOT"
%{_libdir}/@BASELIB@/lib*.so.*
%doc %dir %{_docdir}/@PROJECTNAME@@SONAME_MAJOR@
%doc %{_docdir}/@PROJECTNAME@@SONAME_MAJOR@/COPYING*
%{_prefix}/share/YaST2/images

%files devel
%defattr(-,root,root)
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
PROCESS_SOURCES()
SUBDIRS(icons)
47 changes: 23 additions & 24 deletions src/YQPkgPackageKitGroupsFilterView.cc
Original file line number Diff line number Diff line change
Expand Up @@ -282,31 +282,30 @@ YQPkgPackageKitGroupsFilterView::filter()
for ( ZyppPoolIterator it = zyppPkgBegin();
it != zyppPkgEnd();
++it )
{
ZyppSel selectable = *it;

// Multiple instances of this package may or may not be in the same
// group, so let's check both the installed version (if there
// is any) and the candidate version.
//
// Make sure we emit only one filterMatch() signal if both exist
// and both are in the same group. We don't want multiple list
// entries for the same package!

bool match =
check( selectable, tryCastToZyppPkg( selectable->candidateObj() ) ) ||
check( selectable, tryCastToZyppPkg( selectable->installedObj() ) );

// If there is neither an installed nor a candidate package, check
// any other instance.

if ( ! match &&
! selectable->candidateObj() &&
! selectable->installedObj() )
check( selectable, tryCastToZyppPkg( selectable->theObj() ) );
}
{
ZyppSel selectable = *it;
bool match = false;

// If there is an installed obj, check this first. The bits are set for the installed
// obj only and the installed obj is not contained in the pick list if there in an
// identical candidate available from a repo.
if ( selectable->installedObj() )
{
match = check( selectable, tryCastToZyppPkg( selectable->installedObj() ) );
}
// And then check the pick list which contain all availables and all objects for multi
// version packages and the installed obj if there isn't same version in a repo.
if ( !match )
{
zypp::ui::Selectable::picklist_iterator it = selectable->picklistBegin();
while ( it != selectable->picklistEnd() && !match )
{
check( selectable, tryCastToZyppPkg( *it ) );
++it;
}
}
}
}

emit filterFinished();
}

Expand Down

0 comments on commit d4aa44c

Please sign in to comment.