summaryrefslogtreecommitdiff
path: root/rpmqv.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2001-07-06 20:37:42 +0000
committerjbj <devnull@localhost>2001-07-06 20:37:42 +0000
commit9df3fc957f97511ce04123f3cbebdf9dc543cebb (patch)
tree4e2ad67cd32464a7360d686be8b848cdb03e2195 /rpmqv.c
parent20c2a42d4f18fe324c3bc06cc106136130f44c9b (diff)
downloadrpm-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 'rpmqv.c')
-rwxr-xr-xrpmqv.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/rpmqv.c b/rpmqv.c
index 1c78425f4..6b0d883c0 100755
--- a/rpmqv.c
+++ b/rpmqv.c
@@ -42,7 +42,8 @@ enum modes {
MODE_INSTALL = (1 << 1),
MODE_ERASE = (1 << 2),
-#define MODES_IE (MODE_INSTALL | MODE_ERASE)
+ MODE_ROLLBACK = (1 << 14),
+#define MODES_IE (MODE_INSTALL | MODE_ERASE | MODE_ROLLBACK)
MODE_BUILD = (1 << 4),
MODE_REBUILD = (1 << 5),
@@ -59,6 +60,7 @@ enum modes {
MODE_VERIFYDB = (1 << 13),
#define MODES_DB (MODE_INITDB | MODE_REBUILDDB | MODE_VERIFYDB)
+
MODE_UNKNOWN = 0
};
@@ -916,6 +918,9 @@ int main(int argc, const char ** argv)
case MODE_INSTALL:
+ if (!poptPeekArg(optCon))
+ argerror(_("no packages given for install"));
+
/* RPMTRANS_FLAG_BUILD_PROBS */
/* RPMTRANS_FLAG_KEEPOBSOLETE */
@@ -928,9 +933,6 @@ int main(int argc, const char ** argv)
if (ia->noDeps) ia->installInterfaceFlags |= INSTALL_NODEPS;
- if (!poptPeekArg(optCon))
- argerror(_("no packages given for install"));
-
/* we've already ensured !(!ia->prefix && !ia->relocations) */
if (ia->prefix) {
ia->relocations = xmalloc(2 * sizeof(*ia->relocations));
@@ -948,6 +950,12 @@ int main(int argc, const char ** argv)
ia->transFlags, ia->installInterfaceFlags, ia->probFilter,
ia->relocations);
break;
+
+ case MODE_ROLLBACK:
+ ia->rootdir = rootdir;
+ ec += rpmRollback(ia, (const char **)poptGetArgs(optCon));
+ break;
+
#endif /* IAM_RPMEIU */
#ifdef IAM_RPMQV
@@ -1044,6 +1052,7 @@ int main(int argc, const char ** argv)
#if !defined(IAM_RPMEIU)
case MODE_INSTALL:
case MODE_ERASE:
+ case MODE_ROLLBACK:
#endif
case MODE_UNKNOWN:
if (!showVersion && !help && !noUsageMsg) printUsage();