aboutsummaryrefslogtreecommitdiffstats
path: root/gendepslist2.cc
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-03-10 15:44:41 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-03-10 15:44:41 +0000
commit116f5db5c2339c9526735df960b4dbc52ee78568 (patch)
tree947c476827c243f6a3f13ddeba22349aa6bd513f /gendepslist2.cc
parent660b32febf18a4bd6eda857f2bd302fcfb503bec (diff)
downloadrpmtools-116f5db5c2339c9526735df960b4dbc52ee78568.tar
rpmtools-116f5db5c2339c9526735df960b4dbc52ee78568.tar.gz
rpmtools-116f5db5c2339c9526735df960b4dbc52ee78568.tar.bz2
rpmtools-116f5db5c2339c9526735df960b4dbc52ee78568.tar.xz
rpmtools-116f5db5c2339c9526735df960b4dbc52ee78568.zip
*** empty log message ***
Diffstat (limited to 'gendepslist2.cc')
-rw-r--r--gendepslist2.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/gendepslist2.cc b/gendepslist2.cc
index f2508e6..1520c48 100644
--- a/gendepslist2.cc
+++ b/gendepslist2.cc
@@ -254,9 +254,9 @@ map<string, set<string> > closure(const map<string, set<string> > &names) {
// }
//};
-inline int verif(int num, int max, const string &package, const string &dep) {
- if (num >= max) cerr << package << " requires " << dep << " which is not in the same hdlist\n";
- return num;
+inline int verif(int npack, int ndep, const string &package, const string &dep) {
+ if (ndep > npack) cerr << package << " requires " << dep << " which is not in the same hdlist\n";
+ return ndep;
}
void printDepslist(ofstream *out1, ofstream *out2) {
@@ -319,11 +319,15 @@ void printDepslist(ofstream *out1, ofstream *out2) {
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);
+ for (ITv k = l.begin(); k != l.end(); k++) {
+ verif(nb2hdlist[i], nb2hdlist[where[*k]], *p, *k);
+ *out2 << " " << where[*k];
+ }
} else if (q->compare("NOTFOUND_") > 1) {
*out2 << " " << *q;
} else {
- *out2 << " " << verif(where[*q], nb2hdlist[i], *p, *q);
+ verif(nb2hdlist[i], nb2hdlist[where[*q]], *p, *q);
+ *out2 << " " << where[*q];
}
}
*out2 << "\n";