SOURCES: poldek-pkguinf-sourcerpm.patch (NEW) - add sourcerpm to p...
megabajt
megabajt at pld-linux.org
Fri Apr 4 21:32:58 CEST 2008
Author: megabajt Date: Fri Apr 4 19:32:58 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- add sourcerpm to pkguinf struct
---- Files affected:
SOURCES:
poldek-pkguinf-sourcerpm.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/poldek-pkguinf-sourcerpm.patch
diff -u /dev/null SOURCES/poldek-pkguinf-sourcerpm.patch:1.1
--- /dev/null Fri Apr 4 21:32:58 2008
+++ SOURCES/poldek-pkguinf-sourcerpm.patch Fri Apr 4 21:32:53 2008
@@ -0,0 +1,101 @@
+diff -urN poldek-0.30-cvs20080225.00/cli/desc.c poldek-0.30-cvs20080225.00.new/cli/desc.c
+--- poldek-0.30-cvs20080225.00/cli/desc.c 2008-02-02 22:16:26.000000000 +0100
++++ poldek-0.30-cvs20080225.00.new/cli/desc.c 2008-04-04 20:40:45.000000000 +0200
+@@ -882,6 +882,11 @@
+ cmdctx_printf(cmdctx, "%s\n", pkg_pkgdirpath(pkg));
+ }
+
++ if (pkgu && (s = pkguinf_get(pkgu, PKGUINF_SOURCERPM))) {
++ cmdctx_printf_c(cmdctx, PRCOLOR_CYAN, "%-16s", "Source RPM:");
++ cmdctx_printf(cmdctx, "%s\n", s);
++ }
++
+ if ((fn = pkg_filename(pkg, fnbuf, sizeof(fnbuf)))) {
+ cmdctx_printf_c(cmdctx, PRCOLOR_CYAN, "%-16s", "File:");
+ cmdctx_printf(cmdctx, "%s\n", fn);
+diff -urN poldek-0.30-cvs20080225.00/pkgu.c poldek-0.30-cvs20080225.00.new/pkgu.c
+--- poldek-0.30-cvs20080225.00/pkgu.c 2008-04-04 20:12:55.000000000 +0200
++++ poldek-0.30-cvs20080225.00.new/pkgu.c 2008-04-04 20:37:34.000000000 +0200
+@@ -51,6 +51,7 @@
+ char *vendor;
+ char *buildhost;
+ char *distro;
++ char *sourcerpm;
+
+ tn_hash *_ht;
+ tn_array *_langs;
+@@ -113,6 +114,7 @@
+ pkgu->_description = NULL;
+ pkgu->vendor = NULL;
+ pkgu->buildhost = NULL;
++ pkgu->sourcerpm = NULL;
+
+ pkgu->_ht = NULL;
+ pkgu->_langs = NULL;
+@@ -347,6 +349,7 @@
+ pkgu->url = cp_tag(pkgu->_na, h, RPMTAG_URL);
+ pkgu->distro = cp_tag(pkgu->_na, h, RPMTAG_DISTRIBUTION);
+ pkgu->buildhost = cp_tag(pkgu->_na, h, RPMTAG_BUILDHOST);
++ pkgu->sourcerpm = cp_tag(pkgu->_na, h, RPMTAG_SOURCERPM);
+
+ return pkgu;
+ }
+@@ -404,7 +407,14 @@
+ n_buf_puts(nbuf, pkgu->distro);
+ n_buf_putc(nbuf, '\0');
+ }
+-
++
++ if (pkgu->sourcerpm) {
++ n_buf_putc(nbuf, PKGUINF_SOURCERPM);
++ n_buf_putc(nbuf, '\0');
++ n_buf_puts(nbuf, pkgu->sourcerpm);
++ n_buf_putc(nbuf, '\0');
++ }
++
+ n_buf_putc(nbuf, PKGUINF_TAG_ENDCMN);
+ n_buf_putc(nbuf, '\0');
+ }
+@@ -493,6 +503,10 @@
+ case PKGUINF_DISTRO:
+ set_member(pkgu, &pkgu->distro, val, len);
+ break;
++
++ case PKGUINF_SOURCERPM:
++ set_member(pkgu, &pkgu->sourcerpm, val, len);
++ break;
+ }
+ }
+ }
+@@ -556,6 +570,9 @@
+
+ case PKGUINF_DISTRO:
+ return pkgu->distro;
++
++ case PKGUINF_SOURCERPM:
++ return pkgu->sourcerpm;
+
+ case PKGUINF_SUMMARY:
+ val = (char**)&pkgu->_summary;
+@@ -625,6 +642,10 @@
+ set_member(pkgu, &pkgu->distro, val, len);
+ break;
+
++ case PKGUINF_SOURCERPM:
++ set_member(pkgu, &pkgu->distro, val, len);
++ break;
++
+ case PKGUINF_SUMMARY:
+ case PKGUINF_DESCRIPTION:
+ {
+diff -urN poldek-0.30-cvs20080225.00/pkgu.h poldek-0.30-cvs20080225.00.new/pkgu.h
+--- poldek-0.30-cvs20080225.00/pkgu.h 2008-02-02 22:38:24.000000000 +0100
++++ poldek-0.30-cvs20080225.00.new/pkgu.h 2008-04-04 20:37:56.000000000 +0200
+@@ -14,6 +14,7 @@
+ #define PKGUINF_VENDOR 'v'
+ #define PKGUINF_BUILDHOST 'b'
+ #define PKGUINF_DISTRO 'D'
++#define PKGUINF_SOURCERPM 'S'
+
+ struct pkguinf;
+
================================================================
More information about the pld-cvs-commit
mailing list