Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 351606 Details for
Bug 461410
app-admin/webapp-config: webapp-config -C ignores package version
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Adds check for package name and version prior to uninstalling a webapp
Webappconfig-config.py-Adds-check-for-pn-and-pvr.patch (text/plain), 2.50 KB, created by
Devan Franchini (RETIRED)
on 2013-06-21 20:52:19 UTC
(
hide
)
Description:
Adds check for package name and version prior to uninstalling a webapp
Filename:
MIME Type:
Creator:
Devan Franchini (RETIRED)
Created:
2013-06-21 20:52:19 UTC
Size:
2.50 KB
patch
obsolete
>From 1045b28226eb3e471de9c8768e1e8a48fe7f7d48 Mon Sep 17 00:00:00 2001 >From: Devan Franchini <twitch153@hotmail.com> >Date: Fri, 21 Jun 2013 02:06:29 -0400 >Subject: [PATCH] Webappconfig/config.py: Adds check for package name and version > This check is done in the run() function if self.work == "clean" to avoid > uninstalling a webapp if the package name and version being listed exist, > but aren't the ones located in the .webapp in the specified directory taken > from the -d flag. >X-Gentoo-Bug: 461410 >X-Gentoo-Bug-URL: https://bugs.gentoo.org/461410 > >--- > WebappConfig/config.py | 17 +++++++++++++++-- > 1 file changed, 15 insertions(+), 2 deletions(-) > >diff --git a/WebappConfig/config.py b/WebappConfig/config.py >index fd106c5..b39e2eb 100644 >--- a/WebappConfig/config.py >+++ b/WebappConfig/config.py >@@ -937,12 +937,16 @@ class Config: > self.parser.print_help() > OUT.die('You need to specify at least the application you' > ' would like to handle!') >+ else: >+ return self.config.get('USER', 'pn') > > def check_version_set(self): > if not self.config.has_option('USER', 'pvr'): > OUT.die('You did not specify which version to handle.\n Use "' > + self.config.get('USER','g_myname') + > ' --help" for usage') >+ else: >+ return self.config.get('USER', 'pvr') > > def split_hostname(self): > >@@ -1225,10 +1229,12 @@ class Config: > > self.__r = wrapper.get_root(self) > wrapper.want_category(self) >- self.check_package_set() >- self.check_version_set() >+ package = self.check_package_set() >+ version = self.check_version_set() > self.set_vars() > >+ webapp = package + ' ' + version >+ > # special case > # > # if a package has been specified, then chances are that they forgot >@@ -1260,6 +1266,13 @@ class Config: > self.config.set('USER', 'pn', old['WEB_PN']) > self.config.set('USER', 'pvr', old['WEB_PVR']) > >+ old_webapp = old['WEB_PN'] + ' ' + old['WEB_PVR'] >+ >+ if not webapp == old_webapp: >+ OUT.die(webapp + ' does not match ' + >+ old_webapp + ' found in .webapp file at ' + >+ self.installdir() + '.') >+ > # we don't want to read the .webapp file if we're upgrading, > # because we've just written the *new* app's details into the file!! > # >-- >1.8.1.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 461410
:
351506
| 351606