Mailinglist Archive: yast-commit (815 mails)

< Previous Next >
[yast-commit] r39920 - in /trunk/pkg-bindings: VERSION package/yast2-pkg-bindings.changes src/Callbacks.cc src/Package.cc src/PkgModuleFunctions.h src/Resolvable.cc src/Source.cc
  • From: lslezak@xxxxxxxxxxxxxxxx
  • Date: Fri, 03 Aug 2007 09:25:52 -0000
  • Message-id: <20070803092552.B9533B5952@xxxxxxxxxxxxxxxx>
Author: lslezak
Date: Fri Aug  3 11:25:52 2007
New Revision: 39920

URL: http://svn.opensuse.org/viewcvs/yast?rev=39920&view=rev
Log:
- Pkg::ResolvableProperties() returns license and status if
  available
- fixed id of undefined repository (-1 returned as unsigned)
- 2.15.40

Modified:
    trunk/pkg-bindings/VERSION
    trunk/pkg-bindings/package/yast2-pkg-bindings.changes
    trunk/pkg-bindings/src/Callbacks.cc
    trunk/pkg-bindings/src/Package.cc
    trunk/pkg-bindings/src/PkgModuleFunctions.h
    trunk/pkg-bindings/src/Resolvable.cc
    trunk/pkg-bindings/src/Source.cc

Modified: trunk/pkg-bindings/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/VERSION?rev=39920&r1=39919&r2=39920&view=diff
==============================================================================
--- trunk/pkg-bindings/VERSION (original)
+++ trunk/pkg-bindings/VERSION Fri Aug  3 11:25:52 2007
@@ -1 +1 @@
-2.15.39
+2.15.40

Modified: trunk/pkg-bindings/package/yast2-pkg-bindings.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/package/yast2-pkg-bindings.changes?rev=39920&r1=39919&r2=39920&view=diff
==============================================================================
--- trunk/pkg-bindings/package/yast2-pkg-bindings.changes (original)
+++ trunk/pkg-bindings/package/yast2-pkg-bindings.changes Fri Aug  3 11:25:52 2007
@@ -1,7 +1,11 @@
 -------------------------------------------------------------------
-Thu Aug  2 15:05:39 CEST 2007 - lslezak@xxxxxxx
+Fri Aug  3 11:00:23 CEST 2007 - lslezak@xxxxxxx
 
 - added product directory support
+- Pkg::ResolvableProperties() returns license and status if
+  available
+- fixed id of undefined repository (-1 returned as unsigned)
+- 2.15.40
 
 -------------------------------------------------------------------
 Thu Aug  2 09:56:21 CEST 2007 - lslezak@xxxxxxx

Modified: trunk/pkg-bindings/src/Callbacks.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Callbacks.cc?rev=39920&r1=39919&r2=39920&view=diff
==============================================================================
--- trunk/pkg-bindings/src/Callbacks.cc (original)
+++ trunk/pkg-bindings/src/Callbacks.cc Fri Aug  3 11:25:52 2007
@@ -513,7 +513,7 @@
            size = pkg->downloadSize();
 
            // convert the repo ID
-           int source_id = _pkg_ref.logFindAlias(pkg->repository().info().alias());
+           long long source_id = _pkg_ref.logFindAlias(pkg->repository().info().alias());
            int media_nr = pkg->mediaNr();
 
            if( source_id != last_source_id || media_nr != last_source_media )

Modified: trunk/pkg-bindings/src/Package.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Package.cc?rev=39920&r1=39919&r2=39920&view=diff
==============================================================================
--- trunk/pkg-bindings/src/Package.cc (original)
+++ trunk/pkg-bindings/src/Package.cc Fri Aug  3 11:25:52 2007
@@ -1003,8 +1003,8 @@
     data->add( YCPString("arch"), YCPString( pkg->arch().asString() ) );
     data->add( YCPString("medianr"), YCPInteger( pkg->mediaNr() ) );
 
-    std::vector<YRepo_Ptr>::size_type sid = logFindAlias(pkg->repository().info().alias());
-    y2debug("srcId: %d", sid );
+    long long sid = logFindAlias(pkg->repository().info().alias());
+    y2debug("srcId: %lld", sid );
     data->add( YCPString("srcid"), YCPInteger( sid ) );
 
     std::string status("available");

Modified: trunk/pkg-bindings/src/PkgModuleFunctions.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/PkgModuleFunctions.h?rev=39920&r1=39919&r2=39920&view=diff
==============================================================================
--- trunk/pkg-bindings/src/PkgModuleFunctions.h (original)
+++ trunk/pkg-bindings/src/PkgModuleFunctions.h Fri Aug  3 11:25:52 2007
@@ -717,7 +717,7 @@
        virtual ~PkgModuleFunctions ();
 
        // must be public, used in callbacks
-       std::vector<YRepo_Ptr>::size_type logFindAlias(const std::string &alias) const;
+       long long logFindAlias(const std::string &alias) const;
 
        virtual const string name () const
        {

Modified: trunk/pkg-bindings/src/Resolvable.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Resolvable.cc?rev=39920&r1=39919&r2=39920&view=diff
==============================================================================
--- trunk/pkg-bindings/src/Resolvable.cc (original)
+++ trunk/pkg-bindings/src/Resolvable.cc Fri Aug  3 11:25:52 2007
@@ -405,6 +405,14 @@
                zypp::Repository repo = (*it)->repository();
                info->add(YCPString("source"), YCPInteger(logFindAlias(repo.info().alias())));
 
+               // add license info if it is defined
+               std::string license = (*it)->licenseToConfirm();
+               if (!license.empty())
+               {
+                   info->add(YCPString("license_confirmed"), YCPBoolean(it->status().isLicenceConfirmed()));
+                   info->add(YCPString("license"), YCPString(license));
+               }
+
                // product specific info
                if( req_kind == "product" ) {
                    zypp::Product::constPtr product = boost::dynamic_pointer_cast<const zypp::Product>(it->resolvable());

Modified: trunk/pkg-bindings/src/Source.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Source.cc?rev=39920&r1=39919&r2=39920&view=diff
==============================================================================
--- trunk/pkg-bindings/src/Source.cc (original)
+++ trunk/pkg-bindings/src/Source.cc Fri Aug  3 11:25:52 2007
@@ -286,7 +286,7 @@
     return YRepo_Ptr();
 }
 
-std::vector<YRepo_Ptr>::size_type PkgModuleFunctions::logFindAlias(const std::string &alias) const
+long long PkgModuleFunctions::logFindAlias(const std::string &alias) const
 {
     std::vector<YRepo_Ptr>::size_type index = 0;
 
@@ -296,7 +296,7 @@
            return index;
     }
 
-    return -1;
+    return -1LL;
 }
 
 bool PkgModuleFunctions::aliasExists(const std::string &alias) const
@@ -1329,7 +1329,7 @@
     unsigned int id = 0;
     while(aliasExists(ret))
     {
-       y2milestone("Alias %s already found: %d", ret.c_str(), logFindAlias(ret));
+       y2milestone("Alias %s already found: %lld", ret.c_str(), logFindAlias(ret));
 
        // the alias already exists - add a counter 
        std::ostringstream ostr;
@@ -1784,7 +1784,7 @@
   {
     y2error ("Invalid URL: %s", expt.asString().c_str());
     _last_error.setLastError(expt.asUserString());
-    return YCPInteger (-1);
+    return YCPInteger (-1LL);
   }
 
 
@@ -1834,7 +1834,7 @@
            y2error("SourceCreate for '%s' product '%s' has failed"
                , url.asString().c_str(), pn.asString().c_str());
            _last_error.setLastError(excpt.asUserString());
-           return YCPInteger(-1);
+           return YCPInteger(-1LL);
        }
     }
   } else {

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages