SET(LIBZYPP_MAJOR "16")
SET(LIBZYPP_COMPATMINOR "0")
SET(LIBZYPP_MINOR "0")
-SET(LIBZYPP_PATCH "3")
+SET(LIBZYPP_PATCH "4")
#
-# LAST RELEASED: 16.0.3 (0)
+# LAST RELEASED: 16.0.4 (0)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
-------------------------------------------------------------------
+Wed Jun 15 12:36:27 CEST 2016 - ma@suse.de
+
+- Fix bug in removeRepository which may keep an empty .repo file
+ rather than deleting it (bsc#984494)
+- version 16.0.4 (0)
+
+-------------------------------------------------------------------
Mon Jun 13 12:53:03 CEST 2016 - ma@suse.de
- Shrink pool if all repos are removed (bnc#899755)
{
// figure how many repos are there in the file:
std::list<RepoInfo> filerepos = repositories_in_file(todelete.filepath());
- if ( (filerepos.size() == 1) && ( filerepos.front().alias() == todelete.alias() ) )
+ if ( filerepos.size() == 0 // bsc#984494: file may have already been deleted
+ ||(filerepos.size() == 1 && filerepos.front().alias() == todelete.alias() ) )
{
- // easy, only this one, just delete the file
- if ( filesystem::unlink(todelete.filepath()) != 0 )
+ // easy: file does not exist, contains no or only the repo to delete: delete the file
+ int ret = filesystem::unlink( todelete.filepath() );
+ if ( ! ( ret == 0 || ret == ENOENT ) )
{
// TranslatorExplanation '%s' is a filename
ZYPP_THROW(RepoException( todelete, str::form( _("Can't delete '%s'"), todelete.filepath().c_str() )));