diff options
author | jbj <devnull@localhost> | 2001-07-06 20:37:42 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2001-07-06 20:37:42 +0000 |
commit | 9df3fc957f97511ce04123f3cbebdf9dc543cebb (patch) | |
tree | 4e2ad67cd32464a7360d686be8b848cdb03e2195 /lib/poptI.c | |
parent | 20c2a42d4f18fe324c3bc06cc106136130f44c9b (diff) | |
download | rpm-9df3fc957f97511ce04123f3cbebdf9dc543cebb.tar.gz rpm-9df3fc957f97511ce04123f3cbebdf9dc543cebb.tar.bz2 rpm-9df3fc957f97511ce04123f3cbebdf9dc543cebb.zip |
- expose rpmShowProgress() and rpmVerifyDigest() in rpmcli.h.
- portability: avoid st_mtime, gendiff uses basename, etc (#47497).
- glibc-2.0.x has not __va_copy().
- popthelp.c: static copy of stpcpy/stpncpy for the deprived (#47500).
CVS patchset: 4921
CVS date: 2001/07/06 20:37:42
Diffstat (limited to 'lib/poptI.c')
-rw-r--r-- | lib/poptI.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/poptI.c b/lib/poptI.c index 1b411a65e..eca9ad502 100644 --- a/lib/poptI.c +++ b/lib/poptI.c @@ -9,10 +9,15 @@ #include "debug.h" +/*@-redecl@*/ +extern time_t get_date(const char * p, void * now); /* XXX expedient lies */ +/*@=redecl@*/ + struct rpmInstallArguments_s rpmIArgs; #define POPT_RELOCATE 1016 #define POPT_EXCLUDEPATH 1019 +#define POPT_ROLLBACK 1024 /*@exits@*/ static void argerror(const char * desc) /*@modifies fileSystem @*/ @@ -21,6 +26,7 @@ struct rpmInstallArguments_s rpmIArgs; exit(EXIT_FAILURE); } + /** */ static void installArgCallback( /*@unused@*/ poptContext con, @@ -62,6 +68,13 @@ static void installArgCallback( /*@unused@*/ poptContext con, /*@=kepttrans@*/ ia->numRelocations++; } break; + case POPT_ROLLBACK: + { time_t tid; + tid = get_date(arg, NULL); + if (tid == (time_t)-1) + argerror(_("malformed rollback time")); + ia->rbtid = tid; + } break; } } @@ -185,6 +198,9 @@ struct poptOption rpmInstallPoptTable[] = { { "replacepkgs", '\0', POPT_BIT_SET, &rpmIArgs.probFilter, RPMPROB_FILTER_REPLACEPKG, N_("reinstall if the package is already present"), NULL}, + { "rollback", '\0', POPT_ARG_STRING|POPT_ARGFLAG_DOC_HIDDEN, 0, POPT_ROLLBACK, + N_("deinstall new package(s), reinstall old package(s), back to date"), + N_("<date>") }, { "test", '\0', POPT_BIT_SET, &rpmIArgs.transFlags, RPMTRANS_FLAG_TEST, N_("don't install, but tell if it would work or not"), NULL}, { "upgrade", 'U', POPT_BIT_SET, |