News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Where are package installations stored?

Started by tjbalon, January 15, 2021, 06:36:07 AM

Previous topic - Next topic

tjbalon

Are package installations (that are visible via index.php?action=admin;area=packages) stored somewhere in the database or populated via the Packages/ directory?

I have moved to using git and have a dev and main website, if I install a mod on the dev branch then merge to main and pull, things are OK.. however the changes the mod(s) potentially makes to the DB, I then need to make manually. I am wondering if in that manual portion I need to also include in the DB somehow information that a new mod was installed?


Aleksi "Lex" Kilpinen

#1
I believe at least the install status of mod packages is held in log_packages, the actual packages are kept as files.
Also, hooks are stored in the DB - Can't remember exactly where, but I'd look at settings

Edit: Of course, some mods may do their own DB changes as well.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

tjbalon

Quote from: Aleksi "Lex" Kilpinen on January 15, 2021, 06:49:36 AM
I believe at least the install status of mod packages is held in log_packages, the actual packages are kept as files.
Also, hooks are stored in the DB - Can't remember exactly where, but I'd look at settings

Edit: Of course, some mods may do their own DB changes as well.

Does log_packages do anything more than log? From the looks of the DB it does not?

Incase anyone is wondering, I found a workaround for DB changes to prevent manual changes, which I am pleased with.
dev:
commit to dev branch

main:
create a local update branch, install package (even if the files do not install properly, this wont matter as the files will be irrelevant, all we care of is DB changes)
checkout to dev, confirm it is working
merge dev with master


Aleksi "Lex" Kilpinen

Quote from: tjbalon on January 15, 2021, 07:58:21 AM
Does log_packages do anything more than log? From the looks of the DB it does not?
It's basically just a log, but I think pacman does use the log when determining the appropriate actions available for a package. In other words, is the next option to present "Install" or "Uninstall".
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

tjbalon

Quote from: Aleksi "Lex" Kilpinen on January 15, 2021, 08:04:04 AM
Quote from: tjbalon on January 15, 2021, 07:58:21 AM
Does log_packages do anything more than log? From the looks of the DB it does not?
It's basically just a log, but I think pacman does use the log when determining the appropriate actions available for a package. In other words, is the next option to present "Install" or "Uninstall".

I supposed I'll have to manually control a lot of this then, unless I copy over the log_packages regularly or find some other solution (or follow what I said above each time).

Thanks for the reply, helps a lot.

shawnb61

I use one of two methods:
- Install the mod in both places, identically
- Backups/restores of files & dbs
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Advertisement: