Mailinglist Archive: zypp-devel (40 mails)

< Previous Next >
[zypp-devel] [PATCH] Do not download SQLite databases and add PRESTODELTA ResourceType to repomd repositories
  • From: Lorenzo Villani <lvillani@xxxxxxxxxxxxxxx>
  • Date: Sat, 11 Jul 2009 14:37:29 +0200
  • Message-id: <200907111437.35544.lvillani@xxxxxxxxxxxxxxx>
Attached
From 6335977dec4ec1db6ccd55d033c8bf3ab7961a36 Mon Sep 17 00:00:00 2001
From: Lorenzo Villani <lvillani@xxxxxxxxxxxxxxx>
Date: Sat, 11 Jul 2009 13:35:30 +0200
Subject: [PATCH] Do not download SQLite databases and add PRESTODELTA
ResourceType

---
zypp/repo/yum/Downloader.cc | 17 +++++++++++++++++
zypp/repo/yum/ResourceType.cc | 4 ++++
zypp/repo/yum/ResourceType.h | 5 +++++
3 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/zypp/repo/yum/Downloader.cc b/zypp/repo/yum/Downloader.cc
index 587f6e0..db1ce28 100644
--- a/zypp/repo/yum/Downloader.cc
+++ b/zypp/repo/yum/Downloader.cc
@@ -88,6 +88,23 @@ bool Downloader::repomd_Callback( const OnMediaLocation &loc,
return true;
}

+ // skip SQLite databases
+ if ( dtype == ResourceType::PRIMARY_DB )
+ {
+ MIL << "Skipping primary.sqlite.bz2" << endl;
+ return true;
+ }
+ if ( dtype == ResourceType::OTHER_DB)
+ {
+ MIL << "Skipping other.sqlite.bz2" << endl;
+ return true;
+ }
+ if ( dtype == ResourceType::FILELISTS_DB )
+ {
+ MIL << "Skipping filelists.sqlite.bz2" << endl;
+ return true;
+ }
+
this->enqueueDigested(loc_with_path);

// We got a patches file we need to read, to add patches listed
diff --git a/zypp/repo/yum/ResourceType.cc b/zypp/repo/yum/ResourceType.cc
index 650ba9f..f3dc062 100644
--- a/zypp/repo/yum/ResourceType.cc
+++ b/zypp/repo/yum/ResourceType.cc
@@ -32,8 +32,10 @@ namespace zypp
const ResourceType ResourceType::PATCH(ResourceType::PATCH_e);
const ResourceType ResourceType::PRODUCT(ResourceType::PRODUCT_e);
const ResourceType ResourceType::PATTERNS(ResourceType::PATTERNS_e);
+ const ResourceType ResourceType::PRESTODELTA(ResourceType::PRESTODELTA_e);
const ResourceType ResourceType::PRIMARY_DB(ResourceType::PRIMARY_DB_e);
const ResourceType ResourceType::OTHER_DB(ResourceType::OTHER_DB_e);
+ const ResourceType ResourceType::FILELISTS_DB(ResourceType::FILELISTS_DB_e);

ResourceType::ResourceType(const std::string & strval_r)
: _type(parse(strval_r))
@@ -55,6 +57,7 @@ namespace zypp
_table["patterns"] = ResourceType::PATTERNS_e;
_table["primary_db"] = ResourceType::PRIMARY_DB_e;
_table["other_db"] = ResourceType::OTHER_DB_e;
+ _table["filelists_db"] = ResourceType::FILELISTS_DB_e;
_table["NONE"] = _table["none"] = ResourceType::NONE_e;
}

@@ -85,6 +88,7 @@ namespace zypp
_table[PATTERNS_e] = "patterns";
_table[OTHER_DB_e] = "other_db";
_table[PRIMARY_DB_e] = "primary_db";
+ _table[FILELISTS_DB_e] = "filelists_db";
_table[NONE_e] = "NONE";
}
return _table[_type];
diff --git a/zypp/repo/yum/ResourceType.h b/zypp/repo/yum/ResourceType.h
index 2d5cf9e..75aceb9 100644
--- a/zypp/repo/yum/ResourceType.h
+++ b/zypp/repo/yum/ResourceType.h
@@ -36,9 +36,12 @@ namespace zypp
static const ResourceType PATCH; // suse extension
static const ResourceType PRODUCT; // suse extension
static const ResourceType PATTERNS; // suse extension
+ // Yum presto (deltarpm) extension
+ static const ResourceType PRESTODELTA;
// sqlite caches yum extensions:
static const ResourceType PRIMARY_DB; // yum extension
static const ResourceType OTHER_DB; // yum extension
+ static const ResourceType FILELISTS_DB; // yum extension

enum Type
{
@@ -52,7 +55,9 @@ namespace zypp
PATCH_e,
PRODUCT_e,
PATTERNS_e,
+ PRESTODELTA_e,
PRIMARY_DB_e,
+ FILELISTS_DB_e,
OTHER_DB_e,
};

--
1.6.2.5

< Previous Next >