]> TLD Linux GIT Repositories - packages/poldek.git/blob - poldek-git.patch
- merged update to 0.30.0rc7 from PLD
[packages/poldek.git] / poldek-git.patch
1 commit 9ecd484cd077adba94649b83b3f3bfd639644056
2 Author: Marcin Banasiak <marcin.banasiak@gmail.com>
3 Date:   Wed Mar 20 00:09:57 2013 +0100
4
5     rpmvercmp: read macro configuration files before using rpmEVRparse()
6
7 diff --git a/pm/rpm/rpmvercmp.c b/pm/rpm/rpmvercmp.c
8 index 968489a..d83f26b 100644
9 --- a/pm/rpm/rpmvercmp.c
10 +++ b/pm/rpm/rpmvercmp.c
11 @@ -1,6 +1,6 @@
12  /*
13    Copyright (C) 2000 - 2008 Pawel A. Gajda <mis@pld-linux.org>
14 -  Copyright (C) 2010 - 2012 Marcin Banasiak <marcin.banasiak@gmail.com>
15 +  Copyright (C) 2010 - 2013 Marcin Banasiak <marcin.banasiak@gmail.com>
16  
17    This program is free software; you can redistribute it and/or modify
18    it under the terms of the GNU General Public License, version 2 as
19 @@ -20,7 +20,10 @@
20  #include <stdlib.h>
21  
22  #ifdef HAVE_RPM_5
23 +# include <rpm/rpmrc.h>
24  # include <rpm/rpmtag.h>
25 +#else
26 +# include <rpm/rpmlib.h>
27  #endif
28  
29  #define _RPMEVR_INTERNAL
30 @@ -61,6 +64,11 @@ int main(int argc, char *argv[])
31          exit(1);
32      }
33  
34 +    if (rpmReadConfigFiles(NULL, NULL) < 0) {
35 +       fprintf(stderr, "Failed to read configuration files\n");
36 +       exit(2);
37 +    }
38 +
39      evr1 = malloc(sizeof(struct EVR_s));
40      evr2 = malloc(sizeof(struct EVR_s));
41