RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Ralf S. Engelschall
Root: /v/rpm/cvs Email: rse@rpm5.org
Module: rpm Date: 27-Jun-2007 13:59:13
Branch: HEAD Handle: 2007062712591300
Modified files:
rpm macros.in
rpm/rpmdb rpmdb.c
Log:
Get rid of more hard-coded paths from the RPM code: rpmdbExportInfo()
was activated for a fixed hard-coded situation only: if the hard-coded
"/var/lib/rpm" is the DB path, then the headers are exported to the
partially also hard-coded "/var/cache/hrmib/". Brrr... this is useless
for mostly all platforms except for a few particular Linux ones.
Instead now activate rpmdbExportInfo() unconditionally (it seems to
be smart enough to not do anything if %{_hrmib_path} is not set at
all) and unset the macro %{_hrmib_path}. This way one can just set the
%{_hrmib_path} macro and this way get the header exporting without
having to rebuild RPM for a particular database path.
Summary:
Revision Changes Path
1.164 +2 -2 rpm/macros.in
1.134 +1 -15 rpm/rpmdb/rpmdb.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/macros.in
============================================================================
$ cvs diff -u -r1.163 -r1.164 macros.in
--- rpm/macros.in 22 Jun 2007 12:58:11 -0000 1.163
+++ rpm/macros.in 27 Jun 2007 11:59:13 -0000 1.164
@@ -1,7 +1,7 @@
#/*! \page config_macros Default configuration: @USRLIBRPM@/macros
# \verbatim
#
-# $Id: macros.in,v 1.163 2007/06/22 12:58:11 jbj Exp $
+# $Id: macros.in,v 1.164 2007/06/27 11:59:13 rse Exp $
#
# This is a global RPM configuration file. All changes made here will
# be lost when the rpm package is upgraded. Any per-system configuration
@@ -686,7 +686,7 @@
# Export package NEVRA (stamped with install tid) info for HRMIB on this path.
#
# XXX Note: escaped %% for use in headerSprintf()
-%_hrmib_path /var/cache/hrmib/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}
+#%_hrmib_path /var/cache/hrmib/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}
#==============================================================================
# ---- GPG/PGP/PGP5 signature macros.
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/rpmdb.c
============================================================================
$ cvs diff -u -r1.133 -r1.134 rpmdb.c
--- rpm/rpmdb/rpmdb.c 21 Jun 2007 12:25:44 -0000 1.133
+++ rpm/rpmdb/rpmdb.c 27 Jun 2007 11:59:13 -0000 1.134
@@ -1113,21 +1113,7 @@
/*@-globstate@*/ return NULL; /*@=globstate@*/
}
- /* XXX if default "/var/lib/rpm" path, manage %{_hrmib_path} entries too. */
- { const char * dbpath = rpmGetPath("%{?_dbpath}", NULL);
- const char * rootpath = NULL;
- const char * homepath = NULL;
-
- (void) urlPath(db->db_root, &rootpath);
- (void) urlPath(db->db_home, &homepath);
-#define _VARLIBRPM "/var/lib/rpm"
- if (!strcmp(rootpath, "/")
- && !strncmp(homepath, _VARLIBRPM, sizeof(_VARLIBRPM)-1))
- db->db_export = rpmdbExportInfo;
- dbpath = _free(dbpath);
-#undef _VARLIBRPM
- }
-
+ db->db_export = rpmdbExportInfo;
db->db_errpfx = rpmExpand( (epfx && *epfx ? epfx : _DB_ERRPFX), NULL);
db->db_remove_env = 0;
db->db_filter_dups = _db_filter_dups;
@@ .
Received on Wed Jun 27 13:59:13 2007