#39 Better defaults in wsgi comments
Closed: Fixed None Opened 9 years ago by mooninite.

The commented code in the pkgdb2.wsgi file made it a little confusing on how to get a fresh install running.

Do you need all of it commented?

I think it would make sense to, by default, leave the code that is required uncommented. This would mean uncommenting the "os" lines and "from" line.


The wsgi file given in the utility folder is an example file, admins might use it as basis but I expect that they might/will tune it for their needs.

I do not will uncomment it as I certainly do not want a running pkgdb2 once you installed it (ie: the rpm version) :)

The idea being, you can install the rpm, configure it (configuration file, apache configuration and wsgi) and then you have a working pkgdb2 :)

That being said, if you feel the comments in the current wsgi are misleading or confusing, I'm certainly in favor of adjusting them.

Do you have a version of the text in mind that would make things clearer?

What about the text in the attached patch?

The line 16: {{{ ## Uncomment the lines below to get wsgi working }}} isn't technically true, if you run pkgdb2 from a clone of the git, you will have to uncomment the lines above :)

Plus that line is just above the section setting the configuration file, we may want to give it more space as otherwise it might be understood that only that section is needed.

Replying to [comment:3 pingou]:

The line 16: {{{ ## Uncomment the lines below to get wsgi working }}} isn't technically true, if you run pkgdb2 from a clone of the git, you will have to uncomment the lines above :)

Plus that line is just above the section setting the configuration file, we may want to give it more space as otherwise it might be understood that only that section is needed.

OK, pedantic, but correct. What about my second patch?

In any case, I want revisit your first comment:

I do not will uncomment it as I certainly do not want a running pkgdb2 once you installed it (ie: the rpm version) :)

Since the apache config is commented out by default, pkgdb will not be running out of the box. Commenting the lines in the wsgi are not required. Could the "Required" lines I commented be uncommented by default?

Looks, good, I'll take that but I'll drop the {{{Required:}}} and will just un-comment them :)

Could you submit it as {{{git format-patch}}}? It would be easier to give you attribution for the change this way :)

Patch attached. I went ahead and uncommented those lines.

hm, looks like it doesn't apply on my master... Damn me, I forgot to push your previous changes. Sorry about that, I'll fix the patch

Merged and pushed :)

Btw, I don't know if you saw, but in the Fedora infra we're not using that wsgi file, we use a similar one in /var/www/ to avoid the file being overwritten when we update the rpm.

Login to comment on this ticket.

Metadata