Skip to content

Commit

Permalink
Merge pull request #19 from yast/better_option_parsing
Browse files Browse the repository at this point in the history
Better option parsing, properly handle mixed -I and -M options
  • Loading branch information
mvidner committed Jun 21, 2013
2 parents e14bcff + ddb753d commit 60f7fe4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
2.24.1
2.24.2
16 changes: 6 additions & 10 deletions liby2/src/genericfrontend.cc
Expand Up @@ -657,18 +657,14 @@ main (int argc, char **argv)
std::list<std::string> modpaths;
std::list<std::string> incpaths;

// include paths
while (!strcmp(argv[arg], "-I"))
// include and module paths
while (!strcmp(argv[arg], "-I") || !strcmp(argv[arg], "-M"))
{
arg++;
incpaths.push_front (string (argv[arg])); // push to front so first one is last in list
arg++;
}
if (!strcmp(argv[arg++], "-I"))
incpaths.push_front (string (argv[arg])); // push to front so first one is last in list
else
modpaths.push_front (string (argv[arg])); // push to front so first one is last in list

while (!strcmp(argv[arg], "-M"))
{
arg++;
modpaths.push_front (string (argv[arg])); // push to front so first one is last in list
arg++;
}

Expand Down
7 changes: 7 additions & 0 deletions package/yast2-core.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Jun 21 13:50:31 UTC 2013 - lslezak@suse.cz

- y2base: handle interleaved -I and -M options, as used by
Makefiles of rubified modules.
- 2.24.2

-------------------------------------------------------------------
Fri Jun 21 12:13:54 UTC 2013 - mvidner@suse.com

Expand Down

0 comments on commit 60f7fe4

Please sign in to comment.