poldek: poldek/pkgdir/pkg_restore.c, poldek/pkgdir/pkg_store.c, po...

mis mis at pld-linux.org
Fri Jun 22 00:28:40 CEST 2007


Author: mis                          Date: Thu Jun 21 22:28:40 2007 GMT
Module: poldek                        Tag: HEAD
---- Log message:
- dead code die

---- Files affected:
poldek/poldek/pkgdir:
   pkg_restore.c (1.23 -> 1.24) , pkg_store.c (1.24 -> 1.25) , pkg_store.h (1.6 -> 1.7) , pkgdir.h (1.35 -> 1.36) 

---- Diffs:

================================================================
Index: poldek/poldek/pkgdir/pkg_restore.c
diff -u poldek/poldek/pkgdir/pkg_restore.c:1.23 poldek/poldek/pkgdir/pkg_restore.c:1.24
--- poldek/poldek/pkgdir/pkg_restore.c:1.23	Thu Jun 21 18:47:45 2007
+++ poldek/poldek/pkgdir/pkg_restore.c	Fri Jun 22 00:28:35 2007
@@ -197,7 +197,6 @@
             nerr++;
             goto l_end;
         }
-		
             
         while (nread && line[nread - 1] == '\n')
             line[--nread] = '\0';
@@ -364,20 +363,7 @@
                 break;
 
             case PKG_STORETAG_UINF:
-                pkgt.pkguinf_offs = n_stream_tell(st);
-                if ((ldflags & PKGDIR_LD_DESC) == 0) {
-                    pkguinf_skip_rpmhdr(st);
-					
-                } else {
-                    pkgt.pkguinf = pkguinf_restore_rpmhdr_st(na, st, 0);
-                    if (pkgt.pkguinf == NULL) {
-                        logn(LOGERR, errmg_ldtag, fn, ul_offs, *line);
-                        nerr++;
-                        goto l_end;
-                    }
-                }
-				
-				n_stream_seek(st, 1, SEEK_CUR);	/* eat '\n' */
+                n_assert(0);
                 break;
 
             default:

================================================================
Index: poldek/poldek/pkgdir/pkg_store.c
diff -u poldek/poldek/pkgdir/pkg_store.c:1.24 poldek/poldek/pkgdir/pkg_store.c:1.25
--- poldek/poldek/pkgdir/pkg_store.c:1.24	Thu Jun 21 18:47:45 2007
+++ poldek/poldek/pkgdir/pkg_store.c	Fri Jun 22 00:28:35 2007
@@ -53,7 +53,6 @@
     { PKG_STORETAG_CNFLS, PKG_STORETAG_SIZE16, "cnfls" },
     { PKG_STORETAG_FL,    PKG_STORETAG_SIZE32, "file list" },
     { PKG_STORETAG_DEPFL, PKG_STORETAG_SIZE32, "depdirs file list" },
-    { PKG_STORETAG_UINF,  PKG_STORETAG_SIZE32, "user-level-info" },
 //    { '6', PKG_STORETAG_SIZE16, "fake16" }, // for testing
 //    { '2', PKG_STORETAG_SIZE32, "fake32" },
     { 0, 0, 0 }, 
@@ -401,18 +400,10 @@
     pkg_store_fl(pkg, nbuf, depdirs, exclpath, flags);
     //mem_info(-10, "after fl");
 
-    if ((flags & PKGSTORE_NODESC) == 0) {
-        struct pkguinf *pkgu;
-        
-        //mem_info(-10, "before uinf");
-        if ((pkgu = pkg_uinf(pkg))) {
-            pkg_store_bintag(PKG_STORETAG_UINF, nbuf);
-            pkguinf_store(pkgu, nbuf, "C");
-            n_buf_printf(nbuf, "\n");
-            pkguinf_free(pkgu);
-            //mem_info(-10, "after uinf");
-        }
-    }
+    /* removed support for uinfo in main index,
+       assert nobody try this */
+    n_assert(flags & PKGSTORE_NODESC);
+    
     n_buf_printf(nbuf, "\n");
     
     return n_buf_size(nbuf);

================================================================
Index: poldek/poldek/pkgdir/pkg_store.h
diff -u poldek/poldek/pkgdir/pkg_store.h:1.6 poldek/poldek/pkgdir/pkg_store.h:1.7
--- poldek/poldek/pkgdir/pkg_store.h:1.6	Thu Jun 21 18:47:45 2007
+++ poldek/poldek/pkgdir/pkg_store.h	Fri Jun 22 00:28:35 2007
@@ -18,7 +18,8 @@
 #define PKG_STORETAG_CNFLS 'C'
 #define PKG_STORETAG_FL    'l'
 #define PKG_STORETAG_DEPFL 'L'
-#define PKG_STORETAG_UINF  'U'
+
+#define PKG_STORETAG_UINF  'U'  /* depreciated */
 
 
 #define PKG_STORETAG_SIZENIL  0 /* ascii tag */

================================================================
Index: poldek/poldek/pkgdir/pkgdir.h
diff -u poldek/poldek/pkgdir/pkgdir.h:1.35 poldek/poldek/pkgdir/pkgdir.h:1.36
--- poldek/poldek/pkgdir/pkgdir.h:1.35	Mon Aug 21 16:18:05 2006
+++ poldek/poldek/pkgdir/pkgdir.h	Fri Jun 22 00:28:35 2007
@@ -67,7 +67,7 @@
     char                *orig_idxpath;
 
     char                *lc_lang;         /* configured languages ($LC_LANG format) */
-    tn_hash             *avlangs_h; 
+    tn_hash             *avlangs_h;       /* all available languages */
     tn_array            *langs;           /* used languages      */
 
     struct pkgdir_dirindex *dirindex;
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/poldek/poldek/pkgdir/pkg_restore.c?r1=1.23&r2=1.24&f=u
    http://cvs.pld-linux.org/poldek/poldek/pkgdir/pkg_store.c?r1=1.24&r2=1.25&f=u
    http://cvs.pld-linux.org/poldek/poldek/pkgdir/pkg_store.h?r1=1.6&r2=1.7&f=u
    http://cvs.pld-linux.org/poldek/poldek/pkgdir/pkgdir.h?r1=1.35&r2=1.36&f=u



More information about the pld-cvs-commit mailing list