Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 340816 Details for
Bug 231482
app-admin/webapp-config-1.50.16-r1: command line options to copy instead of hard links
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Adds --copy flag and copying of files for webapp installation
0001-webapp-config-copyflag-whitespace_fix.patch (text/plain), 4.57 KB, created by
Devan Franchini (RETIRED)
on 2013-03-03 00:33:45 UTC
(
hide
)
Description:
Adds --copy flag and copying of files for webapp installation
Filename:
MIME Type:
Creator:
Devan Franchini (RETIRED)
Created:
2013-03-03 00:33:45 UTC
Size:
4.57 KB
patch
obsolete
>--- config.py 2013-03-02 19:22:06.796069508 -0500 >+++ cpconfig.py 2013-03-02 19:22:06.796069508 -0500 >@@ -486,10 +486,17 @@ > > group.add_option('--soft', > action='store_true', >- help = 'Use symbolic links instead of hard links' >+ help = 'Use symbolic links instead of hard links' > ' when creating virtual files. <NOTE>: some pack' > 'ages will not work if you use this option') > >+ group.add_option('--cp', >+ '--copy', >+ action='store_true', >+ help = 'Directly copy the webapp files from' >+ ' the /usr/share/webapps/ directory when installing' >+ ' the webapp.') >+ > group.add_option('--virtual-files', > '--vf', > type = 'choice', >@@ -845,6 +852,7 @@ > 'user' : 'vhost_config_uid', > 'group' : 'vhost_config_gid', > 'soft' : 'g_soft', >+ 'copy' : 'g_copy', > 'virtual_files': 'vhost_config_virtual_files', > 'default_dirs' : 'vhost_config_default_dirs', > 'pretend' : 'g_pretend', >@@ -990,6 +998,14 @@ > OUT.debug('Selecting soft links' , 7) > > self.config.set('USER', 'g_link_type', 'soft') >+ >+ elif (self.config.has_option('USER', 'g_copy') and >+ self.config.getboolean('USER', 'g_copy')): >+ >+ OUT.debug('Selecting copying of links', 7) >+ >+ self.config.set('USER', 'g_link_type', 'clone') >+ > else: > > OUT.debug('Selecting hard links' , 7) > >--- worker.py 2013-03-02 19:22:05.164069341 -0500 >+++ cpworker.py 2013-03-02 19:22:05.164069341 -0500 >@@ -493,8 +493,12 @@ > OUT.debug('Trying to softlink', 8) > > if not self.__p: >+ if self.__v: >+ print("\n>>> SOFTLINKING FILE: ") >+ print(">>> Source: " + src_name + >+ "\n>>> Destination: " + dst_name + "\n") > os.symlink(src_name, dst_name) >- >+ > my_contenttype = 'sym' > > except Exception as e: >@@ -502,12 +506,35 @@ > if self.__v: > OUT.warn('Failed to softlink (' + str(e) + ')') > >+ elif self.__link_type == 'clone': >+ try: >+ >+ OUT.debug('Trying to copy files directly', 8) >+ >+ if not self.__p: >+ if self.__v: >+ print("\n>>> COPYING FILE: ") >+ print(">>> Source: " + src_name + >+ "\n>>> Destination: " + dst_name + "\n") >+ shutil.copy(src_name, dst_name) >+ >+ my_contenttype = 'file' >+ >+ except Exception as e: >+ >+ if self.__v: >+ OUT.warn('Failed to copy (' + str(e) + ')') >+ > elif os.path.islink(src_name): > try: > > OUT.debug('Trying to copy symlink', 8) > > if not self.__p: >+ if self.__v: >+ print("\n>>> SYMLINK COPY: ") >+ print(">>> Source: " + src_name + >+ "\n>>> Destination: " + dst_name + "\n") > os.symlink(os.readlink(src_name), dst_name) > > my_contenttype = 'sym' >@@ -523,6 +550,10 @@ > OUT.debug('Trying to hardlink', 8) > > if not self.__p: >+ if self.__v: >+ print("\n>>> HARDLINKING FILE: ") >+ print(">>> Source: " + src_name + >+ "\n>>> Destination: " + dst_name + "\n") > os.link(src_name, dst_name) > > my_contenttype = 'file' >@@ -533,7 +564,12 @@ > OUT.warn('Failed to hardlink (' + str(e) + ')') > > if not my_contenttype: >+ > if not self.__p: >+ if self.__v: >+ print("\n>>> COPYING FILE: ") >+ print(">>> Source: " + src_name + >+ "\n>>> Destination: " + dst_name + "\n") > shutil.copy(src_name, dst_name) > my_contenttype = 'file'
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 231482
:
340810
|
340812
|
340816
|
343568
|
343574
|
343688
|
349180
|
351592
|
351602