Lines 161-180
Link Here
|
161 |
|
161 |
|
162 |
This lists the database: |
162 |
This lists the database: |
163 |
>>> a.listinstalls() |
163 |
>>> a.listinstalls() |
164 |
/var/www/localhost/htdocs/gallery |
164 |
@GENTOO_PORTAGE_EPREFIX@/var/www/localhost/htdocs/gallery |
165 |
/var/www/localhost/htdocs/horde |
165 |
@GENTOO_PORTAGE_EPREFIX@/var/www/localhost/htdocs/horde |
166 |
/var/www/localhost/htdocs/phpldapadmin |
166 |
@GENTOO_PORTAGE_EPREFIX@/var/www/localhost/htdocs/phpldapadmin |
167 |
|
167 |
|
168 |
Which is also possible in a more user friendly way: |
168 |
Which is also possible in a more user friendly way: |
169 |
|
169 |
|
170 |
>>> b = WebappDB(here + '/tests/testfiles/webapps', verbose = True) |
170 |
>>> b = WebappDB(here + '/tests/testfiles/webapps', verbose = True) |
171 |
>>> b.listinstalls() |
171 |
>>> b.listinstalls() |
172 |
* Installs for gallery-1.4.4_p6 |
172 |
* Installs for gallery-1.4.4_p6 |
173 |
* /var/www/localhost/htdocs/gallery |
173 |
* @GENTOO_PORTAGE_EPREFIX@/var/www/localhost/htdocs/gallery |
174 |
* Installs for horde-3.0.5 |
174 |
* Installs for horde-3.0.5 |
175 |
* /var/www/localhost/htdocs/horde |
175 |
* @GENTOO_PORTAGE_EPREFIX@/var/www/localhost/htdocs/horde |
176 |
* Installs for phpldapadmin-0.9.7_alpha4 |
176 |
* Installs for phpldapadmin-0.9.7_alpha4 |
177 |
* /var/www/localhost/htdocs/phpldapadmin |
177 |
* @GENTOO_PORTAGE_EPREFIX@/var/www/localhost/htdocs/phpldapadmin |
178 |
|
178 |
|
179 |
The function 'get_inst_files' handles the file locations within the |
179 |
The function 'get_inst_files' handles the file locations within the |
180 |
database. If no package has been specified while initializing |
180 |
database. If no package has been specified while initializing |
Lines 225-232
Link Here
|
225 |
* Entry: |
225 |
* Entry: |
226 |
* ... me me /my/really/weird/hierarchy/for/horde |
226 |
* ... me me /my/really/weird/hierarchy/for/horde |
227 |
* |
227 |
* |
228 |
>>> d.remove('/var/www/localhost/htdocs/horde') |
228 |
>>> d.remove('@GENTOO_PORTAGE_EPREFIX@/var/www/localhost/htdocs/horde') |
229 |
* Pretended to remove installation /var/www/localhost/htdocs/horde |
229 |
* Pretended to remove installation @GENTOO_PORTAGE_EPREFIX@/var/www/localhost/htdocs/horde |
230 |
* Final DB content: |
230 |
* Final DB content: |
231 |
* |
231 |
* |
232 |
* |
232 |
* |
Lines 235-247
Link Here
|
235 |
* Installation at "/my/really/weird/hierarchy/for/horde" could not be found in the database file. Check the entries in ".../tests/testfiles/webapps/horde/3.0.5/installs"! |
235 |
* Installation at "/my/really/weird/hierarchy/for/horde" could not be found in the database file. Check the entries in ".../tests/testfiles/webapps/horde/3.0.5/installs"! |
236 |
* Pretended to remove installation /my/really/weird/hierarchy/for/horde |
236 |
* Pretended to remove installation /my/really/weird/hierarchy/for/horde |
237 |
* Final DB content: |
237 |
* Final DB content: |
238 |
* 1124612110 root root /var/www/localhost/htdocs/horde |
238 |
* 1124612110 root root @GENTOO_PORTAGE_EPREFIX@/var/www/localhost/htdocs/horde |
239 |
* |
239 |
* |
240 |
|
240 |
|
241 |
''' |
241 |
''' |
242 |
|
242 |
|
243 |
def __init__(self, |
243 |
def __init__(self, |
244 |
root = '/var/db/webapps', |
244 |
root = '@GENTOO_PORTAGE_EPREFIX@/var/db/webapps', |
245 |
package = '', |
245 |
package = '', |
246 |
version = '', |
246 |
version = '', |
247 |
installs = 'installs', |
247 |
installs = 'installs', |
Lines 437-443
Link Here
|
437 |
class WebappSource(AppHierarchy): |
437 |
class WebappSource(AppHierarchy): |
438 |
''' |
438 |
''' |
439 |
The WebappSource class handles a web application hierarchy under |
439 |
The WebappSource class handles a web application hierarchy under |
440 |
/usr/share/webapps. |
440 |
@GENTOO_PORTAGE_EPREFIX@/usr/share/webapps. |
441 |
|
441 |
|
442 |
Some test files are needed to test the functionality. This localizes |
442 |
Some test files are needed to test the functionality. This localizes |
443 |
the current position: |
443 |
the current position: |
Lines 461-467
Link Here
|
461 |
''' |
461 |
''' |
462 |
|
462 |
|
463 |
def __init__(self, |
463 |
def __init__(self, |
464 |
root = '/usr/share/webapps', |
464 |
root = '@GENTOO_PORTAGE_EPREFIX@/usr/share/webapps', |
465 |
package = '', |
465 |
package = '', |
466 |
version = '', |
466 |
version = '', |
467 |
installed = 'installed_by_webapp_eclass'): |
467 |
installed = 'installed_by_webapp_eclass'): |