X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 79A05DC0E44 for ; Thu, 27 Jun 2013 19:29:11 +0000 (UTC) Received: from compute2.internal (compute2.nyi.mail.srv.osa [10.202.2.42]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 020D520EF0 for ; Thu, 27 Jun 2013 15:29:09 -0400 (EDT) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute2.internal (MEProxy); Thu, 27 Jun 2013 15:29:09 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=from:to:subject:date:message-id :in-reply-to:references; s=smtpout; bh=aBYpAA27ovaK87r6NQyzY5XCz ZY=; b=FNTKt1Y5getVb8tpTtMSQGygMN2oraSn81EZY+NvUEICjwFyboidXNxIK nkLcGtsY3kHS323JWNRwqF85CglnjGGBnOPK0Ha5pi2en8vvJantc6wF0FC8UyfM PCHHIWasTB62DmrEoHZPTWk12tR3sAYOzRDYvuUTiyPSmZyC4Q= X-Sasl-enc: nT+pBBNp9OO4+PKOdQv5EjE+is5dMqJ0r0ytn1wLJOKc 1372361347 Received: from localhost (unknown [69.86.161.244]) by mail.messagingengine.com (Postfix) with ESMTPA id 07B69680486 for ; Thu, 27 Jun 2013 15:29:06 -0400 (EDT) From: Dubiousjim To: alpine-devel@lists.alpinelinux.org Subject: [alpine-devel] [PATCH 14/15] move --purge from generic options to applets that use it Date: Thu, 27 Jun 2013 15:28:59 -0400 Message-Id: X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: --- src/add.c | 5 +++++ src/apk.c | 5 ----- src/del.c | 5 +++++ src/fix.c | 5 +++++ src/upgrade.c | 5 +++++ 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/add.c b/src/add.c index 021b878..ea4bd47 100644 --- a/src/add.c +++ b/src/add.c @@ -30,6 +30,9 @@ static int add_parse(void *ctx, struct apk_db_options *dbopts, case 0x10000: dbopts->open_flags |= APK_OPENF_CREATE; break; + case 0x10002: + apk_flags |= APK_PURGE; + break; case 'u': actx->solver_flags |= APK_SOLVERF_UPGRADE; break; @@ -160,6 +163,8 @@ static struct apk_option add_options[] = { "package with the listed dependencies and add that to 'world'; the " "actions of the command are easily reverted by deleting the virtual " "package", required_argument, "NAME" }, + { 0x10002, "purge", "Delete also modified configuration files on " + "package removal" }, { 0x10000, "initdb", "Initialize database" }, }; diff --git a/src/apk.c b/src/apk.c index 604378c..8c05d9f 100644 --- a/src/apk.c +++ b/src/apk.c @@ -51,8 +51,6 @@ static struct apk_option generic_options[] = { { 0x110, "no-progress", "Disable progress bar even for TTYs" }, { 0x102, "clean-protected", "Do not create .apk-new files to " "configuration dirs" }, - { 0x106, "purge", "Delete also modified configuration files on " - "package removal" }, { 0x103, "allow-untrusted", "Blindly install packages with untrusted " "signatures or no signature at all" }, { 0x104, "simulate", "Show what would be done without actually " @@ -396,9 +394,6 @@ int main(int argc, char **argv) case 0x104: apk_flags |= APK_SIMULATE; break; - case 0x106: - apk_flags |= APK_PURGE; - break; case 0x105: dbopts.lock_wait = atoi(optarg); break; diff --git a/src/del.c b/src/del.c index f268b33..bbf4080 100644 --- a/src/del.c +++ b/src/del.c @@ -30,6 +30,9 @@ static int del_parse(void *pctx, struct apk_db_options *db, case 'R': ctx->recursive_delete = 1; break; + case 0x10002: + apk_flags |= APK_PURGE; + break; default: return -1; } @@ -133,6 +136,8 @@ static struct apk_option del_options[] = { { 'R', "rdepends", "Recursively delete all top-level reverse " "dependencies too" }, { 'r', NULL, "Synonym for -R (deprecated)" }, + { 0x10002, "purge", "Delete also modified configuration files on " + "package removal" }, }; static struct apk_applet apk_del = { diff --git a/src/fix.c b/src/fix.c index b59af0b..da08b73 100644 --- a/src/fix.c +++ b/src/fix.c @@ -43,6 +43,9 @@ static int fix_parse(void *pctx, struct apk_db_options *dbopts, case 0x10000: ctx->fix_directory_permissions = 1; break; + case 0x10002: + apk_flags |= APK_PURGE; + break; default: return -1; } @@ -95,6 +98,8 @@ static struct apk_option fix_options[] = { { 'r', "reinstall", "Reinstall the package (default)" }, { 'u', "upgrade", "Prefer to upgrade package" }, { 0x10000, "directory-permissions", "Reset all directory permissions" }, + { 0x10002, "purge", "Delete also modified configuration files on " + "package removal" }, }; static struct apk_applet apk_fix = { diff --git a/src/upgrade.c b/src/upgrade.c index 020fda0..28ce020 100644 --- a/src/upgrade.c +++ b/src/upgrade.c @@ -41,6 +41,9 @@ static int upgrade_parse(void *ctx, struct apk_db_options *dbopts, case 'l': uctx->solver_flags |= APK_SOLVERF_LATEST; break; + case 0x10002: + apk_flags |= APK_PURGE; + break; default: return -1; } @@ -141,6 +144,8 @@ static struct apk_option upgrade_options[] = { { 'l', "latest", "Select latest version of package (if it is not pinned), and " "print error if it cannot be installed due to other dependencies" }, + { 0x10002, "purge", "Delete also modified configuration files on " + "package removal" }, { 0x10000, "no-self-upgrade", "Do not do early upgrade of 'apk-tools' package" }, }; -- 1.8.3.1 --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---