RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 21-Nov-2007 00:02:51
Branch: HEAD Handle: 2007112023025000
Modified files:
rpm CHANGES
rpm/perl RPM_Header.xs
rpm/rpmdb hdrinline.h pkgio.c
Log:
- remove headerWrite() from the public API, use rpmpkgWrite instead.
Summary:
Revision Changes Path
1.1858 +1 -0 rpm/CHANGES
1.12 +6 -1 rpm/perl/RPM_Header.xs
1.34 +0 -16 rpm/rpmdb/hdrinline.h
1.47 +17 -0 rpm/rpmdb/pkgio.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.1857 -r1.1858 CHANGES
--- rpm/CHANGES 20 Nov 2007 22:39:00 -0000 1.1857
+++ rpm/CHANGES 20 Nov 2007 23:02:50 -0000 1.1858
@@ -1,4 +1,5 @@
5.0a2 -> 5.0a3:
+ - jbj: remove headerWrite() from the public API, use rpmpkgWrite instead.
- jbj: convert last headerWrite to use rpmpkgWrite instead.
- jbj: conver 2 (of 9 remaining) headerRead's to use rpmpkgRead instead.
- jbj: add newlines to error message spew from pkgio.
@@ .
patch -p0 <<'@@ .'
Index: rpm/perl/RPM_Header.xs
============================================================================
$ cvs diff -u -r1.11 -r1.12 RPM_Header.xs
--- rpm/perl/RPM_Header.xs 11 Nov 2007 22:07:45 -0000 1.11
+++ rpm/perl/RPM_Header.xs 20 Nov 2007 23:02:50 -0000 1.12
@@ -142,7 +142,12 @@
RETVAL = 0;
if (h) {
if ((fd = fdDup(fileno(fp))) != NULL) {
- headerWrite(fd, h);
+ const char item[] = "Header";
+ const char * msg = NULL;
+ rpmRC rc = rpmpkgWrite(item, fd, h, &msg);
+ if (rc != RPMRC_OK)
+ rpmlog(RPMLOG_ERR, "%s: %s: %s\n", "write", item, msg);
+ msg = _free(msg);
Fclose(fd);
RETVAL = 1;
}
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/hdrinline.h
============================================================================
$ cvs diff -u -r1.33 -r1.34 hdrinline.h
--- rpm/rpmdb/hdrinline.h 17 Nov 2007 16:56:21 -0000 1.33
+++ rpm/rpmdb/hdrinline.h 20 Nov 2007 23:02:50 -0000 1.34
@@ -204,22 +204,6 @@
}
/** \ingroup header
- * Write (with unload) header to file handle.
- * @param _fd file handle
- * @param h header
- * @return 0 on success, 1 on error
- */
-/*@unused@*/ static inline
-int headerWrite(void * _fd, /*@null@*/ Header h)
- /*@modifies _fd, h @*/
-{
- /*@-abstract@*/
- if (h == NULL) return 0;
- /*@=abstract@*/
- return (h2hv(h)->hdrwrite) (_fd, h);
-}
-
-/** \ingroup header
* Check if tag is in header.
* @param h header
* @param tag tag
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/pkgio.c
============================================================================
$ cvs diff -u -r1.46 -r1.47 pkgio.c
--- rpm/rpmdb/pkgio.c 20 Nov 2007 22:39:00 -0000 1.46
+++ rpm/rpmdb/pkgio.c 20 Nov 2007 23:02:50 -0000 1.47
@@ -52,6 +52,23 @@
static int _print_pkts = 0;
/*===============================================*/
+/** \ingroup header
+ * Write (with unload) header to file handle.
+ * @param _fd file handle
+ * @param h header
+ * @return 0 on success, 1 on error
+ */
+/*@unused@*/ static inline
+int headerWrite(void * _fd, /*@null@*/ Header h)
+ /*@modifies _fd, h @*/
+{
+ /*@-abstract@*/
+ if (h == NULL) return 0;
+ /*@=abstract@*/
+ return (h2hv(h)->hdrwrite) (_fd, h);
+}
+
+/*===============================================*/
rpmop rpmtsOp(rpmts ts, rpmtsOpX opx)
{
@@ .
Received on Wed Nov 21 00:02:51 2007