18 extern time_t
get_date(
const char * p,
void * now);
24 #if defined(RPM_VENDOR_MANDRIVA)
32 #define POPT_RELOCATE -1021
33 #define POPT_EXCLUDEPATH -1022
34 #define POPT_ROLLBACK -1023
35 #define POPT_ROLLBACK_EXCLUDE -1024
37 #define POPT_AUTOROLLBACK_GOAL -1036
39 #define alloca_strdup(_s) strcpy(alloca(strlen(_s)+1), (_s))
60 enum poptCallbackReason reason,
61 const struct poptOption * opt,
const char * arg,
78 if (arg == NULL || *arg !=
'/')
79 argerror(
_(
"exclude paths must begin with a /"));
83 {
char * oldPath = NULL;
84 char * newPath = NULL;
87 argerror(
_(
"Option --relocate needs /old/path=/new/path argument"));
89 argerror(
_(
"relocations must begin with a /"));
91 if (!(newPath = strchr(oldPath,
'=')))
92 argerror(
_(
"relocations must contain a ="));
95 argerror(
_(
"relocations must have a / following the ="));
98 oldPath =
_free(oldPath);
107 argerror(
_(
"Option --rbexclude needs transaction id argument(s)"));
110 while (*te !=
'\0' && strchr(
" \t\n,", *te) != NULL)
112 while ((t = te++) != NULL && *t !=
'\0') {
114 while (*te !=
'\0' && strchr(
" \t\n,", *te) == NULL)
116 while (*te !=
'\0' && strchr(
" \t\n,", *te) != NULL)
138 argerror(
_(
"Option --rollback needs a time/date stamp argument"));
145 if (tid == (time_t)-1 || tid == (time_t)0)
146 argerror(
_(
"malformed rollback time/date stamp argument"));
153 argerror(
_(
"arbgoal takes a time/date stamp argument"));
159 if (tid == (time_t)-1 || tid == (time_t)0)
160 argerror(
_(
"malformed arbgoal time/date stamp argument"));
201 { NULL,
'\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA | POPT_CBFLAG_CONTINUE,
205 {
"allfiles",
'\0', POPT_BIT_SET,
207 N_(
"install all files, even configurations which might otherwise be skipped"),
209 {
"apply",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN, &rpmIArgs.
transFlags,
212 N_(
"do not execute package scriptlet(s)"), NULL },
213 {
"dirstash",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
215 N_(
"save erased package files by renaming into sub-directory"), NULL},
216 {
"excludeconfigs",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
218 N_(
"do not install configuration files"), NULL},
219 {
"excludedocs",
'\0', POPT_BIT_SET,
221 N_(
"do not install documentation"), NULL},
223 N_(
"update the database, but do not modify the filesystem"), NULL},
226 N_(
"do not install configuration files"), NULL},
229 N_(
"do not install documentation"), NULL},
233 N_(
"don't install file security contexts"), NULL},
234 {
"nofdigests",
'\0', POPT_BIT_SET,
236 N_(
"don't verify file digests"), NULL },
239 N_(
"don't verify file security contexts"), NULL },
241 N_(
"don't verify file digests"), NULL },
245 N_(
"don't register headers in rpmdb"), NULL},
248 {
"noscripts",
'\0', POPT_BIT_SET,
250 N_(
"do not execute package scriptlet(s)"), NULL },
253 N_(
"do not execute package scriptlet(s)"), NULL },
257 N_(
"do not execute %%pretrans scriptlet (if any)"), NULL },
260 N_(
"do not execute %%pre scriptlet (if any)"), NULL },
263 N_(
"do not execute %%post scriptlet (if any)"), NULL },
266 N_(
"do not execute %%preun scriptlet (if any)"), NULL },
269 N_(
"do not execute %%postun scriptlet (if any)"), NULL },
272 N_(
"do not execute %%postrans scriptlet (if any)"), NULL },
275 N_(
"do not execute any scriptlet(s) triggered by this package"), NULL},
278 N_(
"do not execute any %%triggerprein scriptlet(s)"), NULL},
281 N_(
"do not execute any %%triggerin scriptlet(s)"), NULL},
284 N_(
"do not execute any %%triggerun scriptlet(s)"), NULL},
287 N_(
"do not execute any %%triggerpostun scriptlet(s)"), NULL},
291 N_(
"save erased package files by repackaging"), NULL},
293 N_(
"don't install, but tell if it would work or not"), NULL},
295 {
"allmatches",
'\0', POPT_BIT_SET,
297 N_(
"remove all packages which match <package> (normally an error is generated if <package> specified multiple packages)"),
300 {
"badreloc",
'\0', POPT_BIT_SET,
302 N_(
"relocate files in non-relocatable package"), NULL},
304 {
"erase",
'e', POPT_BIT_SET,
306 N_(
"erase (uninstall) package"),
N_(
"<package>+") },
308 N_(
"skip files with leading component <path> "),
311 {
"fileconflicts",
'\0', POPT_BIT_CLR, &rpmIArgs.
probFilter,
313 N_(
"detect file conflicts between packages"), NULL},
317 N_(
"upgrade package(s) if already installed"),
318 N_(
"<packagefile>+") },
320 N_(
"print hash marks as package installs (good with -v)"), NULL},
322 {
"ignorearch",
'\0', POPT_BIT_SET,
324 N_(
"don't verify package architecture"), NULL},
325 {
"ignoreos",
'\0', POPT_BIT_SET,
327 N_(
"don't verify package operating system"), NULL},
329 {
"ignoresize",
'\0', POPT_BIT_SET, &rpmIArgs.
probFilter,
331 N_(
"don't check disk space before installing"), NULL},
332 {
"includedocs",
'\0', POPT_ARGFLAG_DOC_HIDDEN, &rpmIArgs.
incldocs, 0,
333 N_(
"install documentation"), NULL},
335 {
"install",
'i', 0, NULL,
'i',
336 N_(
"install package(s)"),
N_(
"<packagefile>+") },
339 N_(
"do not verify package dependencies"), NULL },
341 {
"noorder",
'\0', POPT_BIT_SET,
343 N_(
"do not reorder package installation to satisfy dependencies"),
347 N_(
"don't verify package digest(s)"), NULL },
349 N_(
"don't verify database header(s) when retrieved"), NULL },
351 N_(
"don't verify package signature(s)"), NULL },
353 {
"oldpackage",
'\0', POPT_BIT_SET,
355 N_(
"upgrade to an old version of the package (--force on upgrades does this automatically)"),
357 {
"percent",
'\0', POPT_BIT_SET,
359 N_(
"print percentages as package installs"), NULL},
360 {
"prefix",
'\0', POPT_ARG_STRING, &rpmIArgs.
qva_prefix, 0,
361 N_(
"relocate the package to <dir>, if relocatable"),
364 N_(
"relocate files from path <old> to <new>"),
366 {
"replacefiles",
'\0', POPT_BIT_SET, &rpmIArgs.
probFilter,
368 N_(
"ignore file conflicts between packages"), NULL},
369 {
"replacepkgs",
'\0', POPT_BIT_SET,
371 N_(
"reinstall if the package is already present"), NULL},
372 {
"rollback",
'\0', POPT_ARG_STRING|POPT_ARGFLAG_DOC_HIDDEN, NULL,
POPT_ROLLBACK,
373 N_(
"deinstall new, reinstall old, package(s), back to <date>"),
376 N_(
"If transaction fails rollback to <date>"),
379 N_(
"Exclude Transaction I.D. from rollback"),
381 {
"upgrade",
'U', POPT_BIT_SET,
383 N_(
"upgrade package(s)"),
384 N_(
"<packagefile>+") },