aboutsummaryrefslogtreecommitdiffstats
path: root/gendepslist2.cc
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-03-10 15:34:23 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-03-10 15:34:23 +0000
commit387d64f8465368a6c62c8009773107726b44c0b4 (patch)
treec9d49bd7adc03c9e96046beae7c013452a57c3fa /gendepslist2.cc
parent158c46c9a67535d93c0339deede3e0f008caf60b (diff)
downloadrpmtools-387d64f8465368a6c62c8009773107726b44c0b4.tar
rpmtools-387d64f8465368a6c62c8009773107726b44c0b4.tar.gz
rpmtools-387d64f8465368a6c62c8009773107726b44c0b4.tar.bz2
rpmtools-387d64f8465368a6c62c8009773107726b44c0b4.tar.xz
rpmtools-387d64f8465368a6c62c8009773107726b44c0b4.zip
*** empty log message ***
Diffstat (limited to 'gendepslist2.cc')
-rw-r--r--gendepslist2.cc32
1 files changed, 15 insertions, 17 deletions
diff --git a/gendepslist2.cc b/gendepslist2.cc
index c929ec1..4ca6696 100644
--- a/gendepslist2.cc
+++ b/gendepslist2.cc
@@ -283,7 +283,7 @@ void printDepslist(ofstream *out1, ofstream *out2) {
vector<string> put_first_ = split(' ', put_first);
vector<string> packages;
- int hdlist2nbsep[nb_hdlists];
+ int nb2hdlist[packages.size()];
for (int i = 0; i < nb_hdlists; i++) {
set<string> list = hdlist2names[i];
while (list.begin() != list.end()) {
@@ -302,33 +302,31 @@ void printDepslist(ofstream *out1, ofstream *out2) {
found:
names.erase(n);
list.erase(n);
+ nb2hdlist[packages.size()] = i;
packages.push_back(n);
for (ITms p = names.begin(); p != names.end(); p++) p->second.erase(n);
}
- hdlist2nbsep[i] = packages.size();
}
int i = 0;
map<string,int> where;
for (ITv p = packages.begin(); p != packages.end(); p++, i++) where[*p] = i;
- for (int hdlist = 0; hdlist < nb_hdlists; hdlist++) {
- i = 0;
- for (ITv p = packages.begin(); p != packages.end(); p++, i++) {
- set<string> dep = closed[*p];
- *out2 << *p << " " << sizes[*p];
- for (ITs q = dep.begin(); q != dep.end(); q++) {
- if (q->find('|') != string::npos) {
- vector<string> l = split('|', *q);
- for (ITv k = l.begin(); k != l.end(); k++) *out2 << " " << verif(where[*k], hdlist2nbsep[hdlist], *p, *k);
- } else if (q->compare("NOTFOUND_") > 1) {
- *out2 << " " << *q;
- } else {
- *out2 << " " << verif(where[*q], hdlist2nbsep[hdlist], *p, *q);
- }
+ i = 0;
+ for (ITv p = packages.begin(); p != packages.end(); p++, i++) {
+ set<string> dep = closed[*p];
+ *out2 << *p << " " << sizes[*p];
+ for (ITs q = dep.begin(); q != dep.end(); q++) {
+ if (q->find('|') != string::npos) {
+ vector<string> l = split('|', *q);
+ for (ITv k = l.begin(); k != l.end(); k++) *out2 << " " << verif(where[*k], nb2hdlist[i], *p, *k);
+ } else if (q->compare("NOTFOUND_") > 1) {
+ *out2 << " " << *q;
+ } else {
+ *out2 << " " << verif(where[*q], nb2hdlist[i], *p, *q);
}
- *out2 << "\n";
}
+ *out2 << "\n";
}
}