GNOME Bugzilla – Bug 757570
core: Do not crash if the plugins folder is missing
Last modified: 2015-11-21 12:15:34 UTC
Created attachment 314794 [details] [review] core-do-not-crash-if-plugins-folder-is-missing.patch Hi, Currently, Rygel crashes if the "lib/rygel-X.Y/plugins" folder is not found at startup. Please consider the attached patch, which permits Rygel to issue an appropriate warning and exit gracefully instead.
Created attachment 314796 [details] [review] core-do-not-crash-if-plugins-folder-is-missing.patch
Hi, thank you for up streaming this patch. As you know I have also experienced it :) Btw several days ago I did a fix to the generated by Vala code in my Yocto/OE recipes: https://github.com/konsulko/tizen-distro/blob/master/meta-tizen/meta-open-ivi/recipes-connectivity/rygel/files/exit-if-plugins-directory-is-not-found.patch Best regards, Leon
Review of attachment 314796 [details] [review]: +1 ::: src/librygel-core/rygel-recursive-module-loader.vala @@ +70,3 @@ + warning ("Failed to open plugins folder: '%s'", + this.base_path); + return; Missing newline before return and the warning should be marked translatable but otherwise it's fine.
Review of attachment 314796 [details] [review]: +1
(In reply to Leon Anavi from comment #2) > Hi, thank you for up streaming this patch. As you know I have also > experienced it :) > > Btw several days ago I did a fix to the generated by Vala code in my > Yocto/OE recipes: > https://github.com/konsulko/tizen-distro/blob/master/meta-tizen/meta-open- > ivi/recipes-connectivity/rygel/files/exit-if-plugins-directory-is-not-found. > patch > > Best regards, > Leon Exiting there is about as harsh as aborting I think. As tarnyko pointed out on IRC, rygel will exit anyway if it can't find any plugins.
(In reply to Jens Georg from comment #5) > (In reply to Leon Anavi from comment #2) > > Hi, thank you for up streaming this patch. As you know I have also > > experienced it :) > > > > Btw several days ago I did a fix to the generated by Vala code in my > > Yocto/OE recipes: > > https://github.com/konsulko/tizen-distro/blob/master/meta-tizen/meta-open- > > ivi/recipes-connectivity/rygel/files/exit-if-plugins-directory-is-not-found. > > patch > > > > Best regards, > > Leon > > Exiting there is about as harsh as aborting I think. As tarnyko pointed out > on IRC, rygel will exit anyway if it can't find any plugins. Yes, but in my opinion it is important to notify the user that rygel exits because it cannot find any plugins. Therefore I believe tarnyko's patch will be useful. Best regards, Leon
(In reply to Jens Georg from comment #5) > Exiting there is about as harsh as aborting I think. As tarnyko pointed out > on IRC, rygel will exit anyway if it can't find any plugins. Hi Jens, IMHO, as Rygel already has the logic required to detect that no plugins have been loaded and exit gracefully (in "rygel-main.vala"), requiring an empty "plugins" folder sorts of defeats the purpose of this logic (because if you have a "plugins" folder, you generally have at least one plugin inside, and the logic is never used). Regards, Manuel
Created attachment 314917 [details] [review] core-do-not-crash-if-plugins-folder-is-missing.patch Updated patch with regards to Jens's comment #3. @Jens: thanks for the +1 !