projects
/
platform
/
upstream
/
libsolv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use sed instead of grep to get rid of the <?xml...> line
[platform/upstream/libsolv.git]
/
tools
/
mergesolv.c
diff --git
a/tools/mergesolv.c
b/tools/mergesolv.c
index
0d6075c
..
6719c8c
100644
(file)
--- a/
tools/mergesolv.c
+++ b/
tools/mergesolv.c
@@
-21,6
+21,9
@@
#include "pool.h"
#include "repo_solv.h"
#include "pool.h"
#include "repo_solv.h"
+#ifdef SUSE
+#include "repo_autopattern.h"
+#endif
#include "common_write.h"
static void
#include "common_write.h"
static void
@@
-61,12
+64,15
@@
main(int argc, char **argv)
Repo *repo;
const char *basefile = 0;
int with_attr = 0;
Repo *repo;
const char *basefile = 0;
int with_attr = 0;
+#ifdef SUSE
+ int add_auto = 0;
+#endif
int c;
pool = pool_create();
repo = repo_create(pool, "<mergesolv>");
int c;
pool = pool_create();
repo = repo_create(pool, "<mergesolv>");
- while ((c = getopt(argc, argv, "ahb:")) >= 0)
+ while ((c = getopt(argc, argv, "ahb:
X
")) >= 0)
{
switch (c)
{
{
switch (c)
{
@@
-79,7
+85,13
@@
main(int argc, char **argv)
case 'b':
basefile = optarg;
break;
case 'b':
basefile = optarg;
break;
+ case 'X':
+#ifdef SUSE
+ add_auto = 1;
+#endif
+ break;
default:
default:
+ usage();
exit(1);
}
}
exit(1);
}
}
@@
-94,9
+106,17
@@
main(int argc, char **argv)
perror(argv[optind]);
exit(1);
}
perror(argv[optind]);
exit(1);
}
- repo_add_solv(repo, fp, 0);
+ if (repo_add_solv(repo, fp, 0))
+ {
+ fprintf(stderr, "repo %s: %s\n", argv[optind], pool_errstr(pool));
+ exit(1);
+ }
fclose(fp);
}
fclose(fp);
}
+#ifdef SUSE
+ if (add_auto)
+ repo_add_autopattern(repo, 0);
+#endif
tool_write(repo, basefile, 0);
pool_free(pool);
return 0;
tool_write(repo, basefile, 0);
pool_free(pool);
return 0;