Merge lp:~alexeftimie/software-center/fix-runlocal-appinstall into lp:software-center

Proposed by Alex Eftimie on 2011-05-27
Status: Merged
Merged at revision: 1799
Proposed branch: lp:~alexeftimie/software-center/fix-runlocal-appinstall
Merge into: lp:software-center
Diff against target: 70 lines (+12/-4)
4 files modified
.bzrignore (+1/-0)
run_local.sh (+5/-0)
software-center (+2/-0)
softwarecenter/db/update.py (+4/-4)
To merge this branch: bzr merge lp:~alexeftimie/software-center/fix-runlocal-appinstall
Reviewer Review Type Date Requested Status
software-store-developers 2011-05-27 Pending
Review via email: mp+62625@code.launchpad.net

Description of the change

set APP_INSTALL_PATH to build/share/app-install, so that run_local works without installing u-s-c in /usr/share

To post a comment you must log in.
1799. By Michael Vogt on 2011-05-27

merged from lp:~alexeftimie/software-center/fix-runlocal-appinstall

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2011-03-02 23:27:46 +0000
3+++ .bzrignore 2011-05-27 08:33:32 +0000
4@@ -16,3 +16,4 @@
5 data/xapian/spelling.DB
6 data/xapian/spelling.baseA
7 data/xapian/spelling.baseB
8+build/
9
10=== modified file 'run_local.sh'
11--- run_local.sh 2011-03-14 10:59:35 +0000
12+++ run_local.sh 2011-05-27 08:33:32 +0000
13@@ -10,4 +10,9 @@
14
15 # s-c
16 export PYTHONPATH=$(pwd)
17+
18+if [ ! -d "./build" ]; then
19+ echo "Please run: 'python setup.py build' before $0"
20+fi
21+
22 ./software-center $@
23
24=== modified file 'software-center'
25--- software-center 2011-04-11 09:51:39 +0000
26+++ software-center 2011-05-27 08:33:32 +0000
27@@ -100,6 +100,8 @@
28 xapian_base_path = datadir
29 # set new global datadir
30 softwarecenter.paths.datadir = datadir
31+ # also alter the app-install path
32+ softwarecenter.paths.APP_INSTALL_PATH = './build/share/app-install'
33 else:
34 datadir = softwarecenter.paths.datadir
35 xapian_base_path = XAPIAN_BASE_PATH
36
37=== modified file 'softwarecenter/db/update.py'
38--- softwarecenter/db/update.py 2011-05-23 13:52:44 +0000
39+++ softwarecenter/db/update.py 2011-05-27 08:33:32 +0000
40@@ -57,7 +57,7 @@
41 PURCHASED_NEEDS_REINSTALL_MAGIC_CHANNEL_NAME,
42 )
43 from softwarecenter.paths import (SOFTWARE_CENTER_ICON_CACHE_DIR,
44- APP_INSTALL_PATH)
45+ APP_INSTALL_DESKTOP_PATH)
46 from softwarecenter.db.database import parse_axi_values_file
47
48 from locale import getdefaultlocale
49@@ -343,7 +343,7 @@
50 w = globals()["WEIGHT_DESKTOP_NAME"]
51 term_generator.index_text_without_positions(name, w)
52
53-def update(db, cache, datadir=APP_INSTALL_PATH):
54+def update(db, cache, datadir=APP_INSTALL_DESKTOP_PATH):
55 update_from_app_install_data(db, cache, datadir)
56 update_from_var_lib_apt_lists(db, cache)
57 # add db global meta-data
58@@ -392,10 +392,10 @@
59 index_app_info_from_parser(parser, db, cache)
60 return True
61
62-def update_from_app_install_data(db, cache, datadir=APP_INSTALL_PATH):
63+def update_from_app_install_data(db, cache, datadir=APP_INSTALL_DESKTOP_PATH):
64 """ index the desktop files in $datadir/desktop/*.desktop """
65 context = glib.main_context_default()
66- for desktopf in glob(datadir+"/desktop/*.desktop"):
67+ for desktopf in glob(datadir+"/*.desktop"):
68 LOG.debug("processing %s" % desktopf)
69 # process events
70 while context.pending():