aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <peroyvind@mandriva.org>2011-01-13 01:36:19 +0000
committerPer Øyvind Karlsen <peroyvind@mandriva.org>2011-01-13 01:36:19 +0000
commit77afa5fdc7987ba5e85fb64b904863cea54a0fc7 (patch)
tree81edfbb54b9b446c4efaf8bd6632fc73d89e8f64
parent412cf4a3088581793b30f0fd97eae263d2b77fdb (diff)
downloadperl-URPM-77afa5fdc7987ba5e85fb64b904863cea54a0fc7.tar
perl-URPM-77afa5fdc7987ba5e85fb64b904863cea54a0fc7.tar.gz
perl-URPM-77afa5fdc7987ba5e85fb64b904863cea54a0fc7.tar.bz2
perl-URPM-77afa5fdc7987ba5e85fb64b904863cea54a0fc7.tar.xz
perl-URPM-77afa5fdc7987ba5e85fb64b904863cea54a0fc7.zip
revert missing db environment hack, proper fix has been done in rpm now
-rw-r--r--NEWS1
-rw-r--r--URPM.xs24
2 files changed, 1 insertions, 24 deletions
diff --git a/NEWS b/NEWS
index 7c451d1..47c91f3 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
Version 4.6 - 11 Jan 2011, by Per Øyvind Karlsen
+- revert missing db environment hack, proper fix has been done in rpm now
- drop deprecated URPM::Pkg->header_filename
- make URPM::Pkg->filename properly return the filename in synthesis, rather
than trying to generate it from NVRA
diff --git a/URPM.xs b/URPM.xs
index b53614f..6d8f2a4 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -2810,30 +2810,6 @@ Db_open(prefix=NULL, write_perm=0)
} else {
rpmtsSetRootDir(db->ts, prefix && prefix[0] ? prefix : NULL);
}
- /* XXX: be sure that we have db environment in place before using it */
- if(rpmtsRootDir(db->ts)) {
- dbpath = rpmGenPath(rpmtsRootDir(db->ts), "%{_dbpath}", "log");
- rpmioMkpath(dbpath, 0755, -1, -1);
- stpcpy((char*)dbpath+strlen(dbpath)-3, "tmp");
- rpmioMkpath(dbpath, 0755, -1, -1);
- dbpath = _free(dbpath);
- dbpath = rpmGenPath(rpmtsRootDir(db->ts), "%{_dbpath}", "DB_CONFIG");
- if(Stat(dbpath, &st) < 0) {
- tmp = dbpath + strlen(rpmtsRootDir(db->ts))-1;
- if(Stat(tmp, &st) >= 0) {
- FD_t chrootDbConf = Fopen(dbpath, "w");
- FD_t sysDbConf = Fopen(tmp, "r");
- char buf[BUFSIZ];
- size_t r;
-
- while((r = Fread(buf, 1, sizeof(buf), sysDbConf)) > 0)
- Fwrite(buf, 1, r, chrootDbConf);
- Fclose(chrootDbConf);
- Fclose(sysDbConf);
- }
- }
- dbpath = _free(dbpath);
- }
if (rpmtsOpenDB(db->ts, write_perm ? O_RDWR | O_CREAT : O_RDONLY) == 0) {
RETVAL = db;
} else {