diff options
author | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2011-01-13 01:36:19 +0000 |
---|---|---|
committer | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2011-01-13 01:36:19 +0000 |
commit | 77afa5fdc7987ba5e85fb64b904863cea54a0fc7 (patch) | |
tree | 81edfbb54b9b446c4efaf8bd6632fc73d89e8f64 | |
parent | 412cf4a3088581793b30f0fd97eae263d2b77fdb (diff) | |
download | perl-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-- | NEWS | 1 | ||||
-rw-r--r-- | URPM.xs | 24 |
2 files changed, 1 insertions, 24 deletions
@@ -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 @@ -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 { |