When created via "git submodules add", a submodules may have the
"/.git" path be a file rather than a directory. The bundlebuilder
previously thought that all submodules had "/.git" as a directory.
This will allow .desktops for all of the activities to be
packaged. In the future, we could ship a special launcher script
so that the user can choose the jobject to run, but for now
we just open the activity using the command specified in the
activity.info file.
Git submodules are only listed by their root directory in the
output of "git ls-files". Therefore, we must handle this case
so that the files from the module are included in the install
and dist_xo commands.
To reproduce the issue, you could do something like the following:
cd pippy
git clone https://github.com/samdroid-apps/collabwrapper
git add collabwrapper
python setup.py install # or just osbuild run
When is used to clone a activity from sugar,
the options parameter is set to None.
The other uses of no_fail have False as default value
but this case was missing.
The effect of this error is that a .xo is not created in the Journal,
when the user select 'Duplicate' in the View Source window.
Historically, distro packagers have been using bunblebuilder, via
"setup.py install", to populate packages directories and files.
The install procedure uses ActivityBundle.install_mime_type to install
custom mime types, by creating symlinks and updating the system mime
types database via the update-mime-database tool.
When ActivityBundle.install_mime_type is executed during packages
creation, the symlinks end-up broken in the final package and the use
of update-mime-database populates the final packages with a new copy
of the database files which could clash with the system copy.
This patch adds a new option, called --skip-install-mime to "setup.py
install" to skip the execution of ActivityBundle.install_mime_type and
avoid the issues mentioned above.
Activity packagers should use this new option. The creation of symlinks
and the execution of update-mime-database should be done in post install
packaging steps.
Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
After add the directory to the IGNORE_DIRS array,
we need make the standard procedure to get the list off files
for the bundle, get_files_in_git honor the configured ignored
files and dirs. That was not a problem until now,
because that files was already not added to git,
but in the case of the screenshots, are included in git,
but we don't want include them in our bundles.
If a translator add a '\n' char in the summary translation
ConfigParser can't parse the linfo file.
Remove them when the file is created and show a message to warning
to the developer.
The BundleBuilder currently crashes on a malformed translation file. This is
good for humans (makes them fix their issues) but crashes bots who need it
compiled and don't care about that single translation file.
This patch adds a --no-fail option which stops the builder from crashing
git version 1.9.3, in a activity directory created inside sugar-build/activities
return a empty string when the command "git ls-files" is executed,
and no repository is configured.
We need verify that condition, and process a file list from the filesystem.
./setup.py check now invokes tests in tests/ directory. tests directory should
have integration(UI tests) and unit(unit tests) sub directories, but it isn't
necessary to have any dir. of the above.
Probably this code was not included in the initial port from gtk2 to
gtk3, because is only used by Sugar, but now we need it.
I changed the way the parameter dist_name is used,
then a complementary patch in sugar is needed
Fixes#4608
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
This summary is translatable as the Activity name and will be displayed
in the Activity list in the Home View.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
When git is installed, it will return non-zero if it gets asked to list
the files in a non-git-repository. The subprocess.Popen instantiation is
successful in this case and the returncode attribute will contain the
error code from git. The current code handles this fine and does fall
back to our own source file listing facility.
If git isn't installed, however, trying to instantiate subprocess.Popen
will fail with OSError. We need to catch this and fall back to our own
source file listing facility like we do for the non-repository case.
Signed-off-by: Simon Schampijer <simon at laptop.org>
Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
8f1a821d68 only changed imports starting with
"import", but not those using "from ... import ...".
[replaced description]
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
The old gtk-2 based module will be present in
the 0.94 branch in the sugar-toolkit.
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Sascha Silbe <silbe@activitycentral.com>