[packages/poldek] - rel 6: add upstream patches

cactus cactus at pld-linux.org
Thu Jan 3 23:18:14 CET 2013


commit d28376d3d8ad7c1567eeabca8cb5ad123de3a1ad
Author: Bartlomiej Zimon <uzi18 at o2.pl>
Date:   Thu Jan 3 23:18:02 2013 +0100

    - rel 6: add upstream patches
    
    - fix LP#1077603 - poldek make indexes crash for subpackage without Group
    - fix LP#966972: adding repo to group from repo config
    - Control rpm's _check_dirname_deps via "auto directory dependencies" config option
    - homepage: fix repository address
    
    Signed-off-by: Bartlomiej Zimon <uzi18 at o2.pl>

 poldek-git.patch | 322 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 poldek.spec      |   2 +-
 2 files changed, 323 insertions(+), 1 deletion(-)
---
diff --git a/poldek.spec b/poldek.spec
index 38ba09c..cceeca9 100644
--- a/poldek.spec
+++ b/poldek.spec
@@ -14,7 +14,7 @@
 %define		ver_rpm		5.4.10
 
 %define		snap	rc6
-%define		rel	5%{?with_snap:.%{SNAP}}
+%define		rel	6%{?with_snap:.%{SNAP}}
 Summary:	RPM packages management helper tool
 Summary(hu.UTF-8):	RPM csomagkezelést segítő eszköz
 Summary(pl.UTF-8):	Pomocnicze narzędzie do zarządzania pakietami RPM
diff --git a/poldek-git.patch b/poldek-git.patch
index 81d7b7a..a674183 100644
--- a/poldek-git.patch
+++ b/poldek-git.patch
@@ -165,3 +165,325 @@ index 9913168..a20c305 100644
  EXPORT struct pkgdir *pkgdb_to_pkgdir(struct pm_ctx *ctx, const char *rootdir,
                                 const char *path, unsigned pkgdir_ldflags,
                                 const char *key, ...);
+commit a6f68bc7fe9305d4988e69c1d3166b1a4585b8f7
+Author: Bartlomiej Zimon <uzi18 at o2.pl>
+Date:   Thu Jan 3 22:44:11 2013 +0100
+
+    - fix LP#1077603 - poldek make indexes crash for subpackage without Group
+      https://bugs.launchpad.net/poldek/+bug/1077603
+    
+    Signed-off-by: Bartlomiej Zimon <uzi18 at o2.pl>
+
+diff --git a/pkgroup.c b/pkgroup.c
+index cd8bf4d..9fdeaf9 100644
+--- a/pkgroup.c
++++ b/pkgroup.c
+@@ -470,17 +470,21 @@ int pkgroup_idx_update_rpmhdr(struct pkgroup_idx *idx, void *rpmhdr)
+ 
+     DBGF("ngroups %d, %d\n", ngroups, n_array_size(langs));
+     for (i=0; i < ngroups; i++) {
+-        const char *lang = n_array_nth(langs, i);
+-        DBGF("   gr[%d of %d] %s\n", i, ngroups, groups[i]);
+-        
+-        if (n_str_eq(lang, "C")) {
+-            if ((gr = n_hash_get(idx->ht, groups[i])) == NULL) {
+-                gr = pkgroup_new(n_array_size(idx->arr) + 1, groups[i]);
+-                n_array_push(idx->arr, gr);
+-                n_hash_insert(idx->ht, gr->name, gr);
+-            }
+-            break;
++      const char *lang = n_array_nth(langs, i);
++      
++      const char *grp = groups;
++      if (ngroups > 1) grp = groups[i];
++      
++      DBGF("   gr[%d of %d] %s\n", i, ngroups, grp);
++      
++      if (n_str_eq(lang, "C")) {
++        if ((gr = n_hash_get(idx->ht, grp)) == NULL) {
++          gr = pkgroup_new(n_array_size(idx->arr) + 1, grp);
++          n_array_push(idx->arr, gr);
++          n_hash_insert(idx->ht, gr->name, gr);
+         }
++        break;
++      }
+     }
+ 
+     if (gr != NULL) {
+commit 810280a1e3be737bf074b536c414eadbb0f38596
+Author: Bartlomiej Zimon <uzi18 at o2.pl>
+Date:   Thu Jan 3 22:48:28 2013 +0100
+
+    - fix LP#966972: adding repo to group from repo config
+      https://bugs.launchpad.net/poldek/+bug/966972
+    
+    Signed-off-by: Bartlomiej Zimon <uzi18 at o2.pl>
+
+diff --git a/doc/poldek.conf.xml b/doc/poldek.conf.xml
+index aae8091..7ecf678 100644
+--- a/doc/poldek.conf.xml
++++ b/doc/poldek.conf.xml
+@@ -525,6 +525,12 @@ Every repository is configured in its own [ source ] section.
+     </description>
+   </option>
+ 
++  <option name="group" type="string" value="">
++    <description>
++    Group name of the repositories group.
++    </description>
++  </option>
++
+   <option name="type" type="string" required="yes" value="pndir">
+     <description>
+     Type of repository index. Permitted values are 'pndir', 'pdir', 'apt', 'yum'
+diff --git a/lib_init.c b/lib_init.c
+index ff9a270..92d9163 100644
+--- a/lib_init.c
++++ b/lib_init.c
+@@ -269,7 +269,7 @@ tn_array *expand_sources_group(tn_array *srcs_named, tn_array *htcnf_sources,
+         struct source *s = n_array_nth(srcs_named, i);
+ 
+         for (j=0; j < n_array_size(htcnf_sources); j++) {
+-            const char *name, *type;
++            const char *name, *type, *grp;
+             tn_hash *ht;
+ 
+             ht = n_array_nth(htcnf_sources, j);
+@@ -278,8 +278,9 @@ tn_array *expand_sources_group(tn_array *srcs_named, tn_array *htcnf_sources,
+                 continue;
+             
+             type = poldek_conf_get(ht, "type", NULL);
++            grp = poldek_conf_get(ht, "group", NULL);
+             /* skip not "group" */
+-            if (type == NULL || n_str_ne(type, source_TYPE_GROUP)) { 
++            if ((type == NULL || n_str_ne(type, source_TYPE_GROUP)) && !grp) {
+                 isgroup_matches[j] = 1;
+                 continue;
+             }
+@@ -287,26 +288,35 @@ tn_array *expand_sources_group(tn_array *srcs_named, tn_array *htcnf_sources,
+             name = poldek_conf_get(ht, "name", NULL);
+             n_assert(name);
+ 
+-            if (htcnf_matches[j] == 0 && fnmatch(s->name, name, 0) == 0) {
+-                tn_array *names;
+-                int ii;
+-                
+-                names = poldek_conf_get_multi(ht, "sources");
+-                n_assert(names);
+-                
+-                for (ii=0; ii < n_array_size(names); ii++) {
+-                    struct source *src = source_new(n_array_nth(names, ii), NULL, NULL, NULL);
+-                    DBGF("%s -> %s\n", s->name, n_array_nth(names, ii));
+-                    src->no = s->no + 1 + ii; /* XXX: hope we fit (see sources_add()) */
+-                    n_array_push(sources, src);
++            if (!grp) { // old groups
++                if (htcnf_matches[j] == 0 && fnmatch(s->name, name, 0) == 0) {
++                    tn_array *names;
++                    int ii;
++
++                    names = poldek_conf_get_multi(ht, "sources");
++                    n_assert(names);
++
++                    for (ii=0; ii < n_array_size(names); ii++) {
++                        struct source *src = source_new(n_array_nth(names, ii), NULL, NULL, NULL);
++                        DBGF("%s -> %s\n", s->name, n_array_nth(names, ii));
++                        printf("%s -> %s\n", s->name, n_array_nth(names, ii));
++                        src->no = s->no + 1 + ii; /* XXX: hope we fit (see sources_add()) */
++                        n_array_push(sources, src);
++                    }
++                    n_hash_replace(expanded_h, s->name, NULL);
++                    htcnf_matches[j] = 1;
+                 }
++            } else if (fnmatch(s->name, grp, 0) == 0) { // new groups
++                struct source *src = source_new(name, NULL, NULL, NULL);
++                src->no = s->no + 1;
++                n_array_push(sources, src);
+                 n_hash_replace(expanded_h, s->name, NULL);
+-                htcnf_matches[j] = 1;
+             }
+         }
+         
+         n_array_push(sources, source_link(s));
+     }
++
+ #if ENABLE_TRACE
+     for (i=0; i < n_array_size(sources); i++) {
+         struct source *s = n_array_nth(sources, i);
+@@ -349,6 +359,9 @@ static int source_to_htconf(struct source *src, int no, tn_hash *htcnf)
+     
+     if (src->flags & PKGSOURCE_NOAUTO)
+         poldek_conf_add_to_section(sect, "auto", "no");
++
++    if (src->flags & PKGSOURCE_GROUP && src->group)
++        poldek_conf_add_to_section(sect, "group", src->group);
+     
+     if (src->flags & PKGSOURCE_NOAUTOUP)
+         poldek_conf_add_to_section(sect, "autoup", "no");
+@@ -438,7 +451,7 @@ static int get_conf_sources(struct poldek_ctx *ctx, tn_array *sources,
+                 source_free(src);
+         }
+     }
+-    
++
+     for (i=0; i < n_array_size(srcs_named); i++) {
+         struct source *src = n_array_nth(srcs_named, i);
+         if (matches == NULL ||
+diff --git a/pkgdir/source.c b/pkgdir/source.c
+index 894519a..a0b2f57 100644
+--- a/pkgdir/source.c
++++ b/pkgdir/source.c
+@@ -73,6 +73,8 @@ static struct src_option source_options[] = {
+                      PKGSRC_OPTION_STRING | PKGSRC_OPTION_SUBOPT, NULL },
+     { "lang",     0, PKGSOURCE_DSCR |
+                      PKGSRC_OPTION_STRING | PKGSRC_OPTION_SUBOPT, NULL },
++    { "group",    0, PKGSOURCE_GROUP |
++                     PKGSRC_OPTION_STRING | PKGSRC_OPTION_SUBOPT, NULL },
+     { "pri",      0, PKGSOURCE_PRI | PKGSRC_OPTION_SUBOPT, NULL},
+     { "compress", 0, PKGSOURCE_COMPRESS |
+                      PKGSRC_OPTION_STRING | PKGSRC_OPTION_SUBOPT, NULL },
+@@ -121,6 +123,10 @@ unsigned get_subopt(struct source *src, struct src_option *opt,
+         src->dscr = n_strdup(str);
+         v = 1;
+ 
++    } else if (opt->flag & PKGSOURCE_GROUP) {
++        src->group = n_strdup(str);
++        v = 1;
++
+     } else if (opt->flag & PKGSOURCE_COMPRESS) {
+         src->compress = n_strdup(str);
+         v = 1;
+@@ -131,7 +137,6 @@ unsigned get_subopt(struct source *src, struct src_option *opt,
+             v = 1;
+         }
+     }
+-    
+ 
+     if (v == 0)
+         logn(LOGWARN, _("%s%sinvalid value ('%s') for option '%s'"),
+@@ -162,7 +167,7 @@ struct source *source_malloc(void)
+     src->no = 0;
+     //src->flags |= PKGSOURCE_PRI;
+     src->name = src->path = src->pkg_prefix = NULL;
+-    src->dscr = src->type = NULL;
++    src->group = src->dscr = src->type = NULL;
+     src->lc_lang = NULL;
+     src->_refcnt = 0;
+     src->exclude_path = n_array_new(4, free, (tn_fn_cmp)strcmp);
+@@ -197,6 +202,7 @@ struct source *source_clone(const struct source *src)
+     cp_str_ifnotnull(&nsrc->compress, src->compress);
+ 
+     cp_str_ifnotnull(&nsrc->dscr, src->dscr);
++    cp_str_ifnotnull(&nsrc->group, src->group);
+     cp_str_ifnotnull(&nsrc->lc_lang, src->lc_lang);
+     cp_str_ifnotnull(&nsrc->original_type, src->original_type);
+ 
+@@ -224,6 +230,7 @@ void source_free(struct source *src)
+ 
+     n_cfree(&src->compress);
+     n_cfree(&src->dscr);
++    n_cfree(&src->group);
+     n_cfree(&src->lc_lang);
+     n_cfree(&src->original_type);
+ 
+@@ -585,6 +592,9 @@ struct source *source_new_htcnf(const tn_hash *htcnf)
+     if ((vs = poldek_conf_get(htcnf, "lang", NULL)))
+         n += n_snprintf(&spec[n], sizeof(spec) - n, ",lang=%s", vs);
+ 
++    if ((vs = poldek_conf_get(htcnf, "group", NULL)))
++        n += n_snprintf(&spec[n], sizeof(spec) - n, ",group=%s", vs);
++
+     vs = poldek_conf_get(htcnf, "path", NULL);
+     if (vs == NULL)
+         vs = poldek_conf_get(htcnf, "url", NULL);
+@@ -781,6 +791,13 @@ int source_snprintf_flags(char *str, int size, const struct source *src)
+                 n += n_snprintf(&str[n], size - n, "=%s,", src->type);
+             }
+ 
++        } else if ((opt->flag & PKGSOURCE_GROUP)) {
++            if (src->type) {
++                n += poldek_term_snprintf_c(PRCOLOR_GREEN, &str[n], size - n,
++                                            "%s", opt->name);
++                n += n_snprintf(&str[n], size - n, "=%s,", src->group);
++            }
++
+         } else if ((opt->flag & PKGSOURCE_DSCR)) {
+             if (src->dscr) {
+                 n += poldek_term_snprintf_c(PRCOLOR_GREEN, &str[n], size - n,
+@@ -788,7 +805,6 @@ int source_snprintf_flags(char *str, int size, const struct source *src)
+                 n += n_snprintf(&str[n], size - n, "=%s,", src->dscr);
+             }
+ 
+-
+         } else {
+             int j = 0;
+             
+diff --git a/pkgdir/source.h b/pkgdir/source.h
+index 32e4781..86e823a 100644
+--- a/pkgdir/source.h
++++ b/pkgdir/source.h
+@@ -31,6 +31,7 @@ EXPORT const char source_TYPE_GROUP[]; /* "group" */
+ #define PKGSOURCE_TYPE       (1 << 5)
+ #define PKGSOURCE_PRI        (1 << 6)
+ #define PKGSOURCE_DSCR       (1 << 7)
++#define PKGSOURCE_GROUP      (1 << 9)
+ #define PKGSOURCE_NAMED      (1 << 10)
+ #define PKGSOURCE_COMPRESS   (1 << 11)
+ #define PKGSOURCE_NODESC     (1 << 12)
+@@ -56,6 +57,7 @@ struct source {
+     char      *original_type;   /* type of source repo for this source  */
+     unsigned  subopt_flags;
+     int       _refcnt;
++    char      *group;
+ };
+ 
+ EXPORT struct source *source_malloc(void);
+commit 3396184bdbf036adabf0440ea6a67726dbbb347b
+Author: Marcin Banasiak <marcin.banasiak at gmail.com>
+Date:   Sat Nov 17 15:10:33 2012 +0100
+
+    Control rpm's _check_dirname_deps via "auto directory dependencies" config option
+
+diff --git a/pm/rpm/rpminstall.c b/pm/rpm/rpminstall.c
+index 9a40768..c128216 100644
+--- a/pm/rpm/rpminstall.c
++++ b/pm/rpm/rpminstall.c
+@@ -371,6 +371,12 @@ int pm_rpm_packages_install(struct pkgdb *db, const tn_array *pkgs,
+     argv[nargs++] = "--noorder";    /* packages always ordered by me */
+ #endif
+ 
++    argv[nargs++] = "--define";
++    if (ts->getop(ts, POLDEK_OP_AUTODIRDEP))
++        argv[nargs++] = "_check_dirname_deps 1";
++    else
++        argv[nargs++] = "_check_dirname_deps 0";
++
+     if (ts->rpmacros) 
+         for (i=0; i<n_array_size(ts->rpmacros); i++) {
+             argv[nargs++] = "--define";
+commit 7c0eccdfcb64e0acc35d59cde376925eb23235e9
+Author: Marcin Banasiak <marcin.banasiak at gmail.com>
+Date:   Sun Oct 7 14:23:53 2012 +0200
+
+    homepage: fix repository address
+
+diff --git a/doc/homepage/devel-body.html b/doc/homepage/devel-body.html
+index c1b94fa..c0d98c8 100644
+--- a/doc/homepage/devel-body.html
++++ b/doc/homepage/devel-body.html
+@@ -1,12 +1,11 @@
+-<h2> Anonymous CVS </h2>
+-<p>Getting the module (no password is needed):</p>
++<h2>Anonymous GIT</h2>
++<p>Getting the repository:</p>
+ <pre class="screen">
+-$ cvs -d :pserver:cvs at anoncvs.pld-linux.org:/cvsroot login
+-$ cvs -d :pserver:cvs at anoncvs.pld-linux.org:/cvsroot co poldek
++$ git clone git://gitorious.org/poldek/poldek.git
+ </pre>
+ 
+ <p>            
+ Particular files may be accessed via 
+-<a href="http://cvs.pld-linux.org/poldek/">CVSWeb</a>
++<a href="http://gitorious.org/poldek/">Gitorious interface</a>
+ <p>
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/poldek.git/commitdiff/d28376d3d8ad7c1567eeabca8cb5ad123de3a1ad



More information about the pld-cvs-commit mailing list