13 extern time_t
get_date(
const char * p,
void * now);
23 #define POPT_RELOCATE -1021
24 #define POPT_EXCLUDEPATH -1022
25 #define POPT_ROLLBACK -1023
26 #define POPT_ROLLBACK_EXCLUDE -1024
28 #define POPT_AUTOROLLBACK_GOAL -1036
30 #define alloca_strdup(_s) strcpy(alloca(strlen(_s)+1), (_s))
52 enum poptCallbackReason reason,
53 const struct poptOption * opt,
const char * arg,
70 if (arg == NULL || *arg !=
'/')
71 argerror(
_(
"exclude paths must begin with a /"));
81 {
char * oldPath = NULL;
82 char * newPath = NULL;
85 argerror(
_(
"Option --relocate needs /old/path=/new/path argument"));
87 argerror(
_(
"relocations must begin with a /"));
89 if (!(newPath = strchr(oldPath,
'=')))
90 argerror(
_(
"relocations must contain a ="));
93 argerror(
_(
"relocations must have a / following the ="));
111 argerror(
_(
"Option --rbexclude needs transaction id argument(s)"));
114 while (*te !=
'\0' && strchr(
" \t\n,", *te) != NULL)
116 while ((t = te++) != NULL && *t !=
'\0') {
118 while (*te !=
'\0' && strchr(
" \t\n,", *te) == NULL)
120 while (*te !=
'\0' && strchr(
" \t\n,", *te) != NULL)
125 tid = (
int_32) strtol(t, NULL, 0);
142 argerror(
_(
"Option --rollback needs a time/date stamp argument"));
149 if (tid == (time_t)-1 || tid == (time_t)0)
150 argerror(
_(
"malformed rollback time/date stamp argument"));
157 argerror(
_(
"arbgoal takes a time/date stamp argument"));
163 if (tid == (time_t)-1 || tid == (time_t)0)
164 argerror(
_(
"malformed arbgoal time/date stamp argument"));
215 { NULL,
'\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA | POPT_CBFLAG_CONTINUE,
219 {
"allfiles",
'\0', POPT_BIT_SET,
221 N_(
"install all files, even configurations which might otherwise be skipped"),
223 {
"allmatches",
'\0', POPT_BIT_SET,
225 N_(
"remove all packages which match <package> (normally an error is generated if <package> specified multiple packages)"),
228 {
"apply",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN, &rpmIArgs.
transFlags,
231 N_(
"do not execute package scriptlet(s)"), NULL },
233 {
"badreloc",
'\0', POPT_BIT_SET,
235 N_(
"relocate files in non-relocatable package"), NULL},
237 {
"dirstash",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
239 N_(
"save erased package files by renaming into sub-directory"), NULL},
240 {
"erase",
'e', POPT_BIT_SET,
242 N_(
"erase (uninstall) package"),
N_(
"<package>+") },
243 {
"excludeconfigs",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
245 N_(
"do not install configuration files"), NULL},
246 {
"excludedocs",
'\0', POPT_BIT_SET,
248 N_(
"do not install documentation"), NULL},
250 N_(
"skip files with leading component <path> "),
254 N_(
"short hand for --replacepkgs --replacefiles"), NULL},
258 N_(
"upgrade package(s) if already installed"),
259 N_(
"<packagefile>+") },
261 N_(
"print hash marks as package installs (good with -v)"), NULL},
263 {
"ignorearch",
'\0', POPT_BIT_SET,
265 N_(
"don't verify package architecture"), NULL},
266 {
"ignoreos",
'\0', POPT_BIT_SET,
268 N_(
"don't verify package operating system"), NULL},
270 {
"ignoresize",
'\0', POPT_BIT_SET, &rpmIArgs.
probFilter,
272 N_(
"don't check disk space before installing"), NULL},
273 {
"includedocs",
'\0', POPT_ARGFLAG_DOC_HIDDEN, &rpmIArgs.
incldocs, 0,
274 N_(
"install documentation"), NULL},
276 {
"install",
'i', 0, NULL,
'i',
277 N_(
"install package(s)"),
N_(
"<packagefile>+") },
280 N_(
"update the database, but do not modify the filesystem"), NULL},
282 {
"noconfigs",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
284 N_(
"do not install configuration files"), NULL},
286 N_(
"do not verify package dependencies"), NULL },
287 {
"nodocs",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
289 N_(
"do not install documentation"), NULL},
292 N_(
"don't verify file digests"), NULL },
294 N_(
"don't verify file digests"), NULL },
296 N_(
"don't install file security contexts"), NULL},
298 {
"noorder",
'\0', POPT_BIT_SET,
300 N_(
"do not reorder package installation to satisfy dependencies"),
304 N_(
"do not execute package scriptlet(s)"), NULL },
306 {
"nopre",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN, &rpmIArgs.
transFlags,
308 N_(
"do not execute %%pre scriptlet (if any)"), NULL },
309 {
"nopost",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN, &rpmIArgs.
transFlags,
311 N_(
"do not execute %%post scriptlet (if any)"), NULL },
312 {
"nopreun",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN, &rpmIArgs.
transFlags,
314 N_(
"do not execute %%preun scriptlet (if any)"), NULL },
315 {
"nopostun",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN, &rpmIArgs.
transFlags,
317 N_(
"do not execute %%postun scriptlet (if any)"), NULL },
320 N_(
"don't verify package digest(s)"), NULL },
322 N_(
"don't verify database header(s) when retrieved"), NULL },
324 N_(
"don't verify package signature(s)"), NULL },
327 N_(
"do not execute any scriptlet(s) triggered by this package"), NULL},
328 {
"notriggerprein",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
330 N_(
"do not execute any %%triggerprein scriptlet(s)"), NULL},
331 {
"notriggerin",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
333 N_(
"do not execute any %%triggerin scriptlet(s)"), NULL},
334 {
"notriggerun",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
336 N_(
"do not execute any %%triggerun scriptlet(s)"), NULL},
337 {
"notriggerpostun",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
339 N_(
"do not execute any %%triggerpostun scriptlet(s)"), NULL},
341 {
"oldpackage",
'\0', POPT_BIT_SET,
343 N_(
"upgrade to an old version of the package (--force on upgrades does this automatically)"),
345 {
"percent",
'\0', POPT_BIT_SET,
347 N_(
"print percentages as package installs"), NULL},
348 {
"prefix",
'\0', POPT_ARG_STRING, &rpmIArgs.
qva_prefix, 0,
349 N_(
"relocate the package to <dir>, if relocatable"),
352 N_(
"relocate files from path <old> to <new>"),
354 {
"repackage",
'\0', POPT_BIT_SET,
356 N_(
"save erased package files by repackaging"), NULL},
357 {
"replacefiles",
'\0', POPT_BIT_SET, &rpmIArgs.
probFilter,
359 N_(
"ignore file conflicts between packages"), NULL},
360 {
"replacepkgs",
'\0', POPT_BIT_SET,
362 N_(
"reinstall if the package is already present"), NULL},
363 {
"rollback",
'\0', POPT_ARG_STRING|POPT_ARGFLAG_DOC_HIDDEN, 0,
POPT_ROLLBACK,
364 N_(
"deinstall new, reinstall old, package(s), back to <date>"),
367 N_(
"If transaction fails rollback to <date>"),
370 N_(
"Exclude Transaction I.D. from rollback"),
373 N_(
"don't install, but tell if it would work or not"), NULL},
374 {
"upgrade",
'U', POPT_BIT_SET,
376 N_(
"upgrade package(s)"),
377 N_(
"<packagefile>+") },