delta rpms even if the package is available on a local source.
(Axel C. Frinke)
-------------------------------------------------------------------
+Thu Oct 2 19:46:13 CEST 2008 - ma@suse.de
+
+- Add zypp.conf option 'download.use_deltarpm_always' to enable using
+ delta rpms even if the package is available on a local source.
+ (Axel C. Frinke)
+- revision 11235
+- version 5.14.0 (13)
+
+-------------------------------------------------------------------
Thu Oct 2 18:50:11 CEST 2008 - ma@suse.de
- Add product attribute: PRODUCTLINE.
- revision 11234
-- version 5.14.0 (13)
-------------------------------------------------------------------
Thu Oct 2 17:18:19 CEST 2008 - ma@suse.de
##
# download.use_deltarpm = true
+##
+## Whether to consider using a deltarpm even when rpm is local
+##
+## Valid values: boolean
+## Default value: false
+##
+## This option has no effect unless download.use_deltarpm is set true.
+##
+# download.use_deltarpm_always = false
##
## Defining directory which contains vendor description files.
, repo_add_probe ( false )
, repo_refresh_delay ( 10 )
, download_use_deltarpm ( true )
+ , download_use_deltarpm_always ( false )
, solver_onlyRequires ( false )
, apply_locks_file ( true )
{
download_use_deltarpm = str::strToBool( value, download_use_deltarpm );
}
+ else if ( entry == "download.use_deltarpm_always" )
+ {
+ download_use_deltarpm_always = str::strToBool( value, download_use_deltarpm_always );
+ }
else if ( entry == "vendordir" )
{
cfg_vendor_path = Pathname(value);
}
else if ( entry == "credentials.global.dir" )
{
- credentials_global_dir_path = Pathname(value);
+ credentials_global_dir_path = Pathname(value);
}
else if ( entry == "credentials.global.file" )
{
- credentials_global_file_path = Pathname(value);
+ credentials_global_file_path = Pathname(value);
}
}
}
unsigned repo_refresh_delay;
bool download_use_deltarpm;
+ bool download_use_deltarpm_always;
bool solver_onlyRequires;
Pathname solver_checkSystemFile;
bool apply_locks_file;
target::rpm::RpmInstFlags rpmInstallFlags;
-
+
Pathname history_log_path;
Pathname credentials_global_dir_path;
Pathname credentials_global_file_path;
bool ZConfig::download_use_deltarpm() const
{ return _pimpl->download_use_deltarpm; }
+ bool ZConfig::download_use_deltarpm_always() const
+ { return download_use_deltarpm() && _pimpl->download_use_deltarpm_always; }
bool ZConfig::solver_onlyRequires() const
{ return _pimpl->solver_onlyRequires; }
*/
bool download_use_deltarpm() const;
+ /** Whether to consider using a deltarpm even when rpm is local.
+ * This requires \ref download_use_deltarpm being \c true.
+ * Config option <tt>download.use_deltarpm_always (false)</tt>
+ */
+ bool download_use_deltarpm_always() const;
+
/**
* Directory for equivalent vendor definitions (configPath()/vendors.d)
* \ingroup g_ZC_CONFIGFILES
/**
* Path where ZYpp install history is logged. Defaults to
* /var/log/zypp/history.
- *
+ *
* \see http://en.opensuse.org/Libzypp/Package_History
*/
Pathname historyLogFile() const;
-
+
/**
* Defaults to /etc/zypp/credentials.d
*/
Pathname credentialsGlobalDir() const;
-
+
/**
* Defaults to /etc/zypp/credentials.cat
*/
#include "zypp/repo/Applydeltarpm.h"
#include "zypp/repo/PackageDelta.h"
+#include "zypp/TmpPath.h"
#include "zypp/ZConfig.h"
#include "zypp/RepoInfo.h"
#include "zypp/media/MediaManager.h"
url = * info.baseUrlsBegin();
// check whether to process patch/delta rpms
- if ( MediaManager::downloads(url) )
+ if ( MediaManager::downloads(url) || ZConfig::instance().download_use_deltarpm_always() )
{
std::list<DeltaRpm> deltaRpms;
if ( ZConfig::instance().download_use_deltarpm() )
}
Pathname destination( Pathname::dirname( delta ) / defRpmFileName( _package ) );
- /* just to ease testing with non remote sources */
- // FIXME removed API
- //if ( ! _package->source().remote() )
- // destination = Pathname("/tmp") / defRpmFileName( _package );
- /**/
+
+ if ( ! delta.getDispose() )
+ {
+ // There is no cleanup method associated with the deta. Thus the
+ // delta is not a temporary file, and we don't want to write in
+ // the package into this directory.
+ destination = filesystem::TmpPath::defaultLocation() / defRpmFileName( _package );
+ }
if ( ! applydeltarpm::provide( delta, destination,
bind( &PackageProvider::progressDeltaApply, this, _1 ) ) )