[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/deltarpm/devel deltarpm-3.4-multilib-workaround.patch, NONE, 1.1 deltarpm.spec, 1.5, 1.6



Author: ajax

Update of /cvs/pkgs/rpms/deltarpm/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16920

Modified Files:
	deltarpm.spec 
Added Files:
	deltarpm-3.4-multilib-workaround.patch 
Log Message:
* Wed May 09 2007 Adam Jackson <ajax redhat com> 3.4-2
- Add -a flag to work around multilib ignorance. (#238964)


deltarpm-3.4-multilib-workaround.patch:

--- NEW FILE deltarpm-3.4-multilib-workaround.patch ---
--- ./applydeltarpm.c.orig	2007-03-20 16:17:29.291156000 +0000
+++ ./applydeltarpm.c	2007-04-23 15:37:12.959694000 +0000
@@ -1115,8 +1115,9 @@ main(int argc, char **argv)
   int seqmatches = 1;
   FILE *vfp;
   struct deltarpm d;
+  char *arch = 0;
 
-  while ((c = getopt(argc, argv, "cCisvpr:")) != -1)
+  while ((c = getopt(argc, argv, "cCisvpr:a:")) != -1)
     {
       switch(c)
 	{
@@ -1144,6 +1145,9 @@ main(int argc, char **argv)
 	  checkflags = SEQCHECK_SIZE;
 	  check = 1;
 	  break;
+	case 'a':
+	  arch = optarg;
+	  break;
 	default:
 	  fprintf(stderr, "usage: applydeltarpm [-r <rpm>] deltarpm rpm\n");
           exit(1);
@@ -1328,7 +1332,10 @@ main(int argc, char **argv)
 	      dup2(pi[1], 1);
 	      close(pi[1]);
 	    }
-	  execlp(RPMDUMPHEADER, RPMDUMPHEADER, d.nevr, (char *)0);
+	  if (arch)
+	    execlp(RPMDUMPHEADER, RPMDUMPHEADER, "-a", arch, d.nevr, (char *)0);
+	  else
+	    execlp(RPMDUMPHEADER, RPMDUMPHEADER, d.nevr, (char *)0);
 	  perror(RPMDUMPHEADER);
 	  _exit(1);
 	}
--- ./rpmdumpheader.c.orig	2007-03-02 13:53:59.600823000 +0000
+++ ./rpmdumpheader.c	2007-04-23 15:40:34.057415000 +0000
@@ -23,7 +23,14 @@ int main(int argc, char **argv)
   char *e;
   char *v;
   char *r;
+  char *a = NULL;
 
+  if (argc > 2 && !strcmp(argv[1], "-a"))
+    {
+      a = argv[2];
+      argc -= 2;
+      argv += 2;
+    }
   if (argc != 2)
     {
       fprintf(stderr, "usage: rpmdumpheader package\n");
@@ -62,6 +69,9 @@ int main(int argc, char **argv)
   rpmdbSetIteratorRE(mi, RPMTAG_EPOCH, RPMMIRE_STRCMP, e);
   rpmdbSetIteratorRE(mi, RPMTAG_VERSION, RPMMIRE_STRCMP, v);
   rpmdbSetIteratorRE(mi, RPMTAG_RELEASE, RPMMIRE_STRCMP, r);
+  if (a)
+    rpmdbSetIteratorRE(mi, RPMTAG_ARCH, RPMMIRE_STRCMP, a);
+
   if ((h = rpmdbNextIterator(mi)) != NULL)
     {
       fdo = Fopen("-", "w.ufdio");
@@ -70,9 +80,9 @@ int main(int argc, char **argv)
   else
     {
       if (e)
-	fprintf(stderr, "%s-%s:%s-%s is not installed\n", n, e, v, r);
+	fprintf(stderr, "%s-%s:%s-%s%s%s is not installed\n", n, e, v, r, a ? "." : "", a ? a : "");
       else
-	fprintf(stderr, "%s-%s-%s is not installed\n", n, v, r);
+	fprintf(stderr, "%s-%s-%s%s%s is not installed\n", n, v, r, a ? "." : "", a ? a : "");
       ret = 1;
     }
   mi = rpmdbFreeIterator(mi);


Index: deltarpm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/deltarpm/devel/deltarpm.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- deltarpm.spec	6 Mar 2007 16:53:01 -0000	1.5
+++ deltarpm.spec	9 May 2007 21:38:48 -0000	1.6
@@ -1,7 +1,7 @@
 Summary: Create deltas between rpms
 Name: deltarpm
 Version: 3.4
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: BSD
 Group: System Environment/Base
 URL: http://www.novell.com/products/linuxpackages/professional/deltarpm.html
@@ -11,6 +11,8 @@
 
 BuildRequires: bzip2-devel, rpm-devel
 
+Patch0: deltarpm-3.4-multilib-workaround.patch
+
 %description
 A deltarpm contains the difference between an old
 and a new version of a rpm, which makes it possible
@@ -20,6 +22,7 @@
 
 %prep
 %setup -q
+%patch0 -p0 -b .multilib
 
 %build
 %{__make} %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" \
@@ -46,6 +49,9 @@
 %{_bindir}/rpmdumpheader
 
 %changelog
+* Wed May 09 2007 Adam Jackson <ajax redhat com> 3.4-2
+- Add -a flag to work around multilib ignorance. (#238964)
+
 * Tue Mar 06 2007 Adam Jackson <ajax redhat com> 3.4-1
 - Update to 3.4 (#231154)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]