[zypp-commit] r5533 - in /trunk/libzypp-testsuite/solver: data.deptestomatic/simple-tests/licence-package.xml data.deptestomatic/simple-tests/licence-test.xml deptestomatic.howto src/deptestomatic.cc
Author: haass
Date: Fri May 11 13:51:31 2007
New Revision: 5533
URL: http://svn.opensuse.org/viewcvs/zypp?rev=5533&view=rev
Log:
Added posibility to show the licence-bit
Added:
trunk/libzypp-testsuite/solver/data.deptestomatic/simple-tests/licence-package.xml
trunk/libzypp-testsuite/solver/data.deptestomatic/simple-tests/licence-test.xml
Modified:
trunk/libzypp-testsuite/solver/deptestomatic.howto
trunk/libzypp-testsuite/solver/src/deptestomatic.cc
Added: trunk/libzypp-testsuite/solver/data.deptestomatic/simple-tests/licence-package.xml
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-testsuite/solver/data.deptestomatic/simple-tests/licence-package.xml?rev=5533&view=auto
==============================================================================
--- trunk/libzypp-testsuite/solver/data.deptestomatic/simple-tests/licence-package.xml (added)
+++ trunk/libzypp-testsuite/solver/data.deptestomatic/simple-tests/licence-package.xml Fri May 11 13:51:31 2007
@@ -0,0 +1,89 @@
+<channel><subchannel>
+<package>
+ <name>nh2ps</name>
+ <section>Productivity_Publishing_PS</section>
+ <location>1 nh2ps-2.3.1-553.x86_64.rpm</location>
+ <history>
+ <update>
+ <hid>12345</hid>
+ <version>2.3.1</version>
+ <release>553</release>
+ <arch>x86_64</arch>
+ </update>
+ </history>
+ <requires>
+ </requires>
+ <provides>
+ </provides>
+</package>
+<package>
+ <name>kdenetwork3-IRC</name>
+ <section>Productivity_Networking_IRC</section>
+ <location>1 kdenetwork3-IRC-3.5.6-2.x86_64.rpm</location>
+ <history>
+ <update>
+ <hid>12345</hid>
+ <version>3.5.6</version>
+ <release>2</release>
+ <arch>x86_64</arch>
+ </update>
+ </history>
+ <requires>
+ </requires>
+ <provides>
+ </provides>
+ <obsoletes>
+ </obsoletes>
+</package>
+<package>
+ <name>fftw3</name>
+ <section>Productivity_Scientific_Math</section>
+ <location>1 fftw3-3.1.2-24.x86_64.rpm</location>
+ <history>
+ <update>
+ <hid>12345</hid>
+ <version>3.1.2</version>
+ <release>24</release>
+ <arch>x86_64</arch>
+ </update>
+ </history>
+ <requires>
+ </requires>
+ <provides>
+ </provides>
+</package>
+<package>
+ <name>zen-updater</name>
+ <section>System_Management</section>
+ <location>1 zen-updater-7.1.100-50.x86_64.rpm</location>
+ <history>
+ <update>
+ <hid>12345</hid>
+ <version>7.1.100</version>
+ <release>50</release>
+ <arch>x86_64</arch>
+ </update>
+ </history>
+ <requires>
+ </requires>
+ <provides>
+ </provides>
+</package>
+<package>
+ <name>perl-XML-Simple</name>
+ <section>Development_Libraries_Perl</section>
+ <location>1 perl-XML-Simple-2.16-5.x86_64.rpm</location>
+ <history>
+ <update>
+ <hid>12345</hid>
+ <version>2.16</version>
+ <release>5</release>
+ <arch>x86_64</arch>
+ </update>
+ </history>
+ <requires>
+ </requires>
+ <provides>
+ </provides>
+</package>
+</subchannel></channel>
Added: trunk/libzypp-testsuite/solver/data.deptestomatic/simple-tests/licence-test.xml
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-testsuite/solver/data.deptestomatic/simple-tests/licence-test.xml?rev=5533&view=auto
==============================================================================
--- trunk/libzypp-testsuite/solver/data.deptestomatic/simple-tests/licence-test.xml (added)
+++ trunk/libzypp-testsuite/solver/data.deptestomatic/simple-tests/licence-test.xml Fri May 11 13:51:31 2007
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<!--
+ load patch data from you.suse.de and install script(is satisfied)
+ but not message ( is unneeded )
+-->
+<test>
+<setup>
+ <setlicencebit/>
+ <system file="licence-package.xml"/>
+ <channel name="test" file="single-package.xml"/>
+</setup>
+<trial>
+ <establish/>
+ <showpool all="true" prefix=">!> ESTABLISHED:" getlicence="true"/>
+ <install channel="test" name="B"/>
+ <reportproblems/>
+ <showpool all="true" prefix=">!> ESTABLISHED:" getlicence="true"/>
+</trial>
+</test>
Modified: trunk/libzypp-testsuite/solver/deptestomatic.howto
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-testsuite/solver/deptestomatic.howto?rev=5533&r1=5532&r2=5533&view=diff
==============================================================================
--- trunk/libzypp-testsuite/solver/deptestomatic.howto (original)
+++ trunk/libzypp-testsuite/solver/deptestomatic.howto Fri May 11 13:51:31 2007
@@ -17,6 +17,9 @@
<!-- Multiple <setup>..</setup> sections not allowed! -->
<setup arch="..."> <!-- Setting Architecture -->
+ <setlicencebit/> <!-- set licence-bit on all Items in Pool and on all Items which will be definded later -->
+ <!-- IMPORTANT: This flag has to bet set before the declaration of channel, source, system -->
+
<forceResolve/>: <!-- force Resolve -->
<maxSolverPasses value=".."/> <!-- sets the max solver passes -->
@@ -94,7 +97,7 @@
<takesolution problem="..." solution="..."/> <!-- takes the given solution number to solve the given problem number -->
- <showpool prefix="..." all="..."/> <!-- collect all objects in pool. With no given all only changing obejcts will be shown otherwise all -->
+ <showpool prefix="..." all="..." getlicence="..."/> <!-- collect all objects in pool. With no given all only changing obejcts will be shown otherwise all. If getlicence is true, the licencebit will be shown -->
<lock channel="..." package="..." kind="..."/> <!-- locks the package from channel -->
Modified: trunk/libzypp-testsuite/solver/src/deptestomatic.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-testsuite/solver/src/deptestomatic.cc?rev=5533&r1=5532&r2=5533&view=diff
==============================================================================
--- trunk/libzypp-testsuite/solver/src/deptestomatic.cc (original)
+++ trunk/libzypp-testsuite/solver/src/deptestomatic.cc Fri May 11 13:51:31 2007
@@ -563,7 +563,7 @@
}
};
-
+static bool set_licence = false;
static PoolItem_Ref
get_poolItem (const string & source_alias, const string & package_name, const string & kind_name = "", const string & ver = "", const string & rel = "", const string & arch = "")
@@ -739,7 +739,7 @@
// collect all installed items in a set
void
-print_pool( const string & prefix = "", bool show_all = true )
+print_pool( const string & prefix = "", bool show_all = true, string show_licence = false )
{
SortItem info( show_all );
cout << "Current pool:" << endl;
@@ -750,13 +750,33 @@
int count = 0;
for (ItemMap::const_iterator it = info.sorted.begin(); it != info.sorted.end(); ++it) {
cout << prefix << ++count << ": ";
- cout << it->second;
+ if(show_licence == "true"){
+ cout << it->second << " Licence: " << it->second.status().isLicenceConfirmed();
+ }else{
+ cout << it->second;
+ }
cout << endl;
}
cout << "Pool End." << endl;
return;
}
+// set licence-bit on all items in the pool
+void
+set_licence_Pool()
+{
+
+ SortItem info( true );
+ invokeOnEach( God->pool().begin( ),
+ God->pool().end ( ),
+ functor::functorRef
participants (1)
-
haass@svn.opensuse.org