Mailinglist Archive: zypp-commit (301 mails)

< Previous Next >
[zypp-commit] r7637 - in /trunk/libzypp: package/libzypp.changes zypp/parser/susetags/RepoParser.cc
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Thu, 25 Oct 2007 14:31:56 -0000
  • Message-id: <20071025143156.399822D248@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Thu Oct 25 16:31:55 2007
New Revision: 7637

URL: http://svn.opensuse.org/viewcvs/zypp?rev=7637&view=rev
Log:
- allow non-existing "packages" file in susetags parser (bug #309235)

Modified:
trunk/libzypp/package/libzypp.changes
trunk/libzypp/zypp/parser/susetags/RepoParser.cc

Modified: trunk/libzypp/package/libzypp.changes
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?rev=7637&r1=7636&r2=7637&view=diff
==============================================================================
--- trunk/libzypp/package/libzypp.changes (original)
+++ trunk/libzypp/package/libzypp.changes Thu Oct 25 16:31:55 2007
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Oct 25 16:29:24 CEST 2007 - aschnell@xxxxxxx
+
+- allow non-existing "packages" file in susetags parser (bug
+ #309235)
+
+-------------------------------------------------------------------
Fri Oct 12 15:47:37 CEST 2007 - ma@xxxxxxx

- SMBIOS DMI modalias matching added (#333152)

Modified: trunk/libzypp/zypp/parser/susetags/RepoParser.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/susetags/RepoParser.cc?rev=7637&r1=7636&r2=7637&view=diff
==============================================================================
--- trunk/libzypp/zypp/parser/susetags/RepoParser.cc (original)
+++ trunk/libzypp/zypp/parser/susetags/RepoParser.cc Thu Oct 25 16:31:55 2007
@@ -447,40 +447,44 @@

// Start with packages
{
- Pathname inputfile( assertMandatoryFile( _descrdir / "packages" ) );
- PackagesFileReader reader;
- reader.setPkgConsumer( bind( &Impl::consumePkg, this, _1 ) );
- reader.setSrcPkgConsumer( bind( &Impl::consumeSrcPkg, this, _1 ) );
-
- CombinedProgressData progress( _ticks, PathInfo(inputfile).size() );
- reader.parse( inputfile, progress );
- }
-
- // Now process packages.lang. Always parse 'en'.
- // At least packages.en is mandatory, because the file might
- // contain license texts.
- assertMandatoryFile( _descrdir / "packages.en" );
- parseLocaleIf( Locale("en") );
- // For each wanted locale at least
- // some fallback, if locale is not present.
- parseLocaleIf( ZConfig::instance().textLocale() );
-
- // Now process packages.DU.
- //if ( 0 ) // remove the if to enable, but leave the {} around.
- {
- Pathname inputfile( getOptionalFile( _descrdir / "packages.DU" ) );
- if ( ! inputfile.empty() )
+ // Even the packages file is optional, see e.g. bug #309235
+ Pathname inputfile( getOptionalFile( _descrdir / "packages" ) );
+ if (!inputfile.empty())
{
- PackagesDuFileReader reader;
- reader.setPkgConsumer( bind( &Impl::consumePkgDu, this, _1 ) );
- reader.setSrcPkgConsumer( bind( &Impl::consumeSrcPkgDu, this, _1 )
);
+ PackagesFileReader reader;
+ reader.setPkgConsumer( bind( &Impl::consumePkg, this, _1 ) );
+ reader.setSrcPkgConsumer( bind( &Impl::consumeSrcPkg, this, _1 ) );

CombinedProgressData progress( _ticks, PathInfo(inputfile).size() );
reader.parse( inputfile, progress );
+
+ // Now process packages.lang. Always parse 'en'.
+ // At least packages.en is mandatory if packages exists, because the
+ // file might contain license texts.
+ assertMandatoryFile( _descrdir / "packages.en" );
+ parseLocaleIf( Locale("en") );
+ // For each wanted locale at least
+ // some fallback, if locale is not present.
+ parseLocaleIf( ZConfig::instance().textLocale() );
+
+ // Now process packages.DU.
+ //if ( 0 ) // remove the if to enable, but leave the {} around.
+ {
+ Pathname inputfile( getOptionalFile( _descrdir / "packages.DU" )
);
+ if ( ! inputfile.empty() )
+ {
+ PackagesDuFileReader reader;
+ reader.setPkgConsumer( bind( &Impl::consumePkgDu, this, _1 ) );
+ reader.setSrcPkgConsumer( bind( &Impl::consumeSrcPkgDu, this,
_1 ) );
+
+ CombinedProgressData progress( _ticks,
PathInfo(inputfile).size() );
+ reader.parse( inputfile, progress );
+ }
+ }
}
}

- // Now process the rest of RepoIndex
+ // Now process the rest of RepoIndex
for ( RepoIndex::FileChecksumMap::const_iterator it =
_repoIndex->metaFileChecksums.begin();
it != _repoIndex->metaFileChecksums.end(); ++it )
{

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

< Previous Next >
This Thread
  • No further messages