|
|
@ -1,108 +0,0 @@ |
|
|
|
|
|
|
|
# --- ROCK-COPYRIGHT-NOTE-BEGIN --- |
|
|
|
# |
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
|
|
# Please add additional copyright information _after_ the line containing |
|
|
|
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by |
|
|
|
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! |
|
|
|
# |
|
|
|
# ROCK Linux: rock-src/package/base/mine/no-crash-and-comments.patch |
|
|
|
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf |
|
|
|
# |
|
|
|
# This program is free software; you can redistribute it and/or modify |
|
|
|
# it under the terms of the GNU General Public License as published by |
|
|
|
# the Free Software Foundation; either version 2 of the License, or |
|
|
|
# (at your option) any later version. A copy of the GNU General Public |
|
|
|
# License can be found at Documentation/COPYING. |
|
|
|
# |
|
|
|
# Many people helped and are helping developing ROCK Linux. Please |
|
|
|
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM |
|
|
|
# file for details. |
|
|
|
# |
|
|
|
# --- ROCK-COPYRIGHT-NOTE-END --- |
|
|
|
|
|
|
|
diff -ur mine-0.14/Makefile mine-0.14-fixed/Makefile
|
|
|
|
--- mine-0.14/Makefile 2003-06-09 14:44:48.000000000 +0200
|
|
|
|
+++ mine-0.14-fixed/Makefile 2003-06-14 14:50:25.000000000 +0200
|
|
|
|
@@ -44,7 +44,7 @@
|
|
|
|
# Set and configure the c-compiler |
|
|
|
# |
|
|
|
CFLAGS = -I$(CDB_DIR) -I$(BZIP2_DIR) -I$(LIBTAR_DIR)/lib -I. -Wall |
|
|
|
-CFLAGS += -I$(LIBTAR_DIR)/listhash -D'MINE_VERSION="$(MINE_VER)"' -O2 -ggdb
|
|
|
|
+CFLAGS += -I$(LIBTAR_DIR)/listhash -D'MINE_VERSION="$(MINE_VER)"' -ggdb
|
|
|
|
ifeq ($(USE_AVL), 1) |
|
|
|
CFLAGS += -DUSE_AVL=1 |
|
|
|
MINE_OBJ += avl.o |
|
|
|
diff -ur mine-0.14/readdb.c mine-0.14-fixed/readdb.c
|
|
|
|
--- mine-0.14/readdb.c 2003-06-09 14:44:48.000000000 +0200
|
|
|
|
+++ mine-0.14-fixed/readdb.c 2003-06-14 18:06:57.000000000 +0200
|
|
|
|
@@ -1,6 +1,6 @@
|
|
|
|
/* |
|
|
|
* GEM MINE - The ROCK Linux Package Manager |
|
|
|
- * Copyright (C) 2002-2003 Clifford Wolf
|
|
|
|
+ * Copyright (C) 2002-2003 Clifford Wolf and Rene Rebe
|
|
|
|
* |
|
|
|
* This program is free software; you can redistribute it and/or modify |
|
|
|
* it under the terms of the GNU General Public License as published by |
|
|
|
@@ -141,6 +141,7 @@
|
|
|
|
e->next = d->list; d->list = e; e->content.pkg = p; |
|
|
|
directory_entry_count++; |
|
|
|
|
|
|
|
+ /* read basic info like V and C tags */
|
|
|
|
while ( fgets(line, 1024, f) != NULL && strcmp(line,"\027\n") ) { |
|
|
|
if ( (line_length = strlen(line)) < 3 ) continue; |
|
|
|
if ( line[line_length-1] == '\n' ) line[--line_length] = 0; |
|
|
|
@@ -165,6 +166,7 @@
|
|
|
|
} |
|
|
|
if ( !dbf ) fclose(f); |
|
|
|
|
|
|
|
+ /* read package dependencies */
|
|
|
|
if ( !dbf ) { |
|
|
|
snprintf(filename, PATH_MAX, "%s/%s/info/dependencies/%s", |
|
|
|
sourcedir, config, packagename); |
|
|
|
@@ -359,7 +361,7 @@
|
|
|
|
struct dirent **namelist; |
|
|
|
struct directory *d; |
|
|
|
struct package *p; |
|
|
|
- struct dependency *dep;
|
|
|
|
+ struct dependency **next_dep;
|
|
|
|
char filename[PATH_MAX]; |
|
|
|
FILE *f; |
|
|
|
int i; |
|
|
|
@@ -370,6 +372,7 @@
|
|
|
|
|
|
|
|
printf("Reading package database. Please wait...\n"); |
|
|
|
if ( strncmp(sourcedir, "http://", 7) && strncmp(sourcedir, "ftp://", 6) ) { |
|
|
|
+ /* determine package files and max disk number */
|
|
|
|
snprintf(filename, PATH_MAX, "%s/index.txt", sourcedir); |
|
|
|
if ( (f = fopen(filename, "r")) != NULL ) { |
|
|
|
char pkgdir[200], disk[200], line[160]; |
|
|
|
@@ -435,10 +438,24 @@
|
|
|
|
|
|
|
|
for (d = directories; d != NULL; d = d->next) sort_directory(d); |
|
|
|
|
|
|
|
- for (p = packages; p != NULL; p = p->next)
|
|
|
|
- for (dep = p->deps; dep != NULL; dep = dep->next)
|
|
|
|
- sscanf(memdb_get(&pkg_addr_hash, dep->name), "%p", &dep->pkg);
|
|
|
|
-
|
|
|
|
+ for (p = packages; p != NULL; p = p->next) {
|
|
|
|
+ /* fill the dependenies with references to the individual packges */
|
|
|
|
+ for (next_dep = &(p->deps); *next_dep != NULL;) {
|
|
|
|
+ char* pkg_ptr_str = memdb_get(&pkg_addr_hash, (*next_dep)->name);
|
|
|
|
+ if (pkg_ptr_str)
|
|
|
|
+ sscanf(pkg_ptr_str, "%p", &(*next_dep)->pkg);
|
|
|
|
+ if ((*next_dep)->pkg) {
|
|
|
|
+ next_dep = &((*next_dep)->next);
|
|
|
|
+ } else {
|
|
|
|
+ /* drop dependency since it is not in db - this can happend
|
|
|
|
+ if multiple builds are run with modified packages */
|
|
|
|
+ struct dependency *tbd_dep = *next_dep;
|
|
|
|
+ *next_dep = tbd_dep->next;
|
|
|
|
+ free (tbd_dep->name);
|
|
|
|
+ free (tbd_dep);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
memdb_free(&files_on_disks); |
|
|
|
memdb_init(&pkg_addr_hash); |
|
|
|
return 0; |