ok, seems all tags available are provided.
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Tue, 31 Jan 2006 13:05:28 +0000 (13:05 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Tue, 31 Jan 2006 13:05:28 +0000 (13:05 +0000)
zypp/source/susetags/PackagesParser.cc
zypp/source/susetags/SuseTagsPackageImpl.cc
zypp/source/susetags/SuseTagsPackageImpl.h

index 9befdb4..e7d0063 100644 (file)
@@ -103,6 +103,22 @@ namespace zypp
             pkgImpl->_sourcesize = str::strtonum<unsigned long>(words[0]);
             pkgImpl->_archivesize = str::strtonum<unsigned long>(words[1]);
           }
+          if ( stag_r.name == "Loc" )
+          {
+            std::vector<std::string> words;
+            unsigned int howmany = str::split( stag_r.value, std::back_inserter(words) );
+            pkgImpl->_media_number = 1;
+            if ( howmany >= 2 )
+            {
+              pkgImpl->_media_number = str::strtonum<unsigned int>(words[0]);
+              pkgImpl->_location = Pathname(words[1]);
+            }
+            else
+            {
+                ZYPP_THROW( ParseException( "Loc" ) );
+            }
+            // ignore path
+          }
         }
 
         /* Consume MulitTag data. */
index 4ab7adf..49ee92f 100644 (file)
@@ -66,7 +66,7 @@ namespace zypp
       { return Changelog(); }
 
       Pathname SuseTagsPackageImpl::location() const
-      { return Pathname(); }
+      { return _location; }
 
       std::string SuseTagsPackageImpl::url() const
       { return std::string(); }
index c8ecccd..a866287 100644 (file)
@@ -84,7 +84,7 @@ namespace zypp
         /** */
         virtual bool installOnly() const;
 
-        virtual License licenseToConfirm() const PURE_VIRTUAL;
+        virtual License licenseToConfirm() const;
 
         PackageGroup _group;
         std::list<std::string> _authors;
@@ -93,8 +93,8 @@ namespace zypp
         ByteCount _archivesize;
         Label _license;
         Date _buildtime;
-        //=Tim: 1111489970
-        // what is this property
+        unsigned int _media_number;
+        Pathname _location;
 
 /*
 =Grp: System/Base