When uninstalling packages try to remove even any rc files created by packages.
When uninstalling a service actually stop it first.
Remove comment since the service is not started anymore after installation in 2.0
Be smart and remove the needs package sync toggle since the begining otherwise not behaving packages might mess up the whole thing.
Ensure the pkg staging area exists on nanobsd before trying to use it.
Move this code up a bit and also use /root/tmp to fetch packages instead of /tmp so it won't fill up.
If we're on nanobsd, pass -t to pkg_add to specify a different "staging area" path.
Set PKG_TMPDIR here too, to help nanobsd pkg installs.
Use a better method to determine the FTP URL for FreeBSD based on the version being used. The old method worked with 8.1-RELEASE-p2 but failed with just 8.1-RELEASE.
Comment what this variable does
Adding $builder_package_install variable. When set to true ignore library fixups and sync_package() directives.
Fix references to what was apparently supposed to be $g['booting'] and not $bootup.
Add a description to this write_config() so it's a little more obvious what it's doing in the logs.
Bail on reinstalling all packages if we can't contact the package repo.
Ticket #875. While ldconfig should be called by pkg code itself do it explicitly to have the cache file rebuilt with correct list.
Need to use Unlink in tar
Shorten english
Ensure $pkg is defined. Send pkg_delete errors to /tmp/pkg-delete_errors.txt
Fix package dependency check code now that we no longer nuke /var/db/pkg/ before operating on packages
Strip off the space between @depend and the package name. Otherwise it will return a space in front of the pkgname
Do not unlink file, it's handled by behind the scenes pkg-utils.inc code
Shorten repo download message
Do not show already installed messages which fill up the textarea too many times
Do not nuke /var/db/pkg now that 2.0 has better handling
Reinstall packages on bootup during console. Ticket #1156
Nuke newline
Unlink needs_package_sync after one pkg has installed OK which means that our internet connection is up.
More misc pkg install txt fixups
Add newline after restoring libs
backup and restore libs in correct location
misc text formatting fixes (tabs)
Only backup libraries at the beginning of the deinstall cycle.
Add tab
Add newline after installation aborted
s/Trying to download/Downloading
Backup system libraries and restore during pkg deinstall.
nuke trailing carriage returns
When we supply a version number, it should be under All/ and not Latest/ (which has names but no version numbers)
Make $rel lowercase, since that's how it is on FreeBSD's package servers.
Show the full URL used to download package files, to aid in tracking down packages that do not install correctly.
Do not atempt to start a service during installation.
Correct binaries needed.
Do not try to be smart on the package name and also use a better resulting condition testing.
Do not output blank pkg names
Mount rw so we can have the packages processing correctly.
Nuke trailing c/r
Remove this since it does not make anymore sense after code arrangements.
Do not output done. because it does not related overall to the output messages.
Add newlines
Disable this test, it was causing some package file downloads to be skipped for me, and nothing else seems to set/use this variable anywhere.
Cleanup some code and properly handle failure of pkg_fetch_recursive.
Clarify message.
Use correct extension of tgz rather than tgz for automatically discovered dependencies.
Honor the config parsed var if set.
globals.inc is better first.
More safety belts.
Fix fetching of package list.
Add myself to the copyright. Have modified enough the file.
Fix problem with syslog adding/removing for pacakges. Fix sync pacakges to call the right functions. Optimizations and code cleanup along the way.
Clear up some code.
Ticket #1017. Move the fwrite and fd_log initializing to a function. Name the function pkg_debug to properly show what is its purpose and also make it write something only when $debug is set.
Ticket #1017. Put a @ before each fwrite to silence errors. Also setup the log file in the beginning rather than on each individual function.
Fix typo
Make the pkg_fetch_recursive code stronger and try also to fetch from freebsd repo when fails to fetch from pfSense one.
Correctly form the url from where to fetch packages if a base is not specified. This unbreaks packages on amd64! Also do no remove a package which is required by other installations.
Correct variable name.
Remove trailing carriage return
Cosmetic issue, add space before 'done', otherwise package XML name and done are combined.
Spelling fix.
Ticket #950. Correctly handle failures while installing packages which might leave stale information behind. Also do not try to startup services twice. Rename uninstall_package_from_name to uninstall_package because the operation on packages is only done through package names.
Ticket #873. Call write_config() before including file to avoid loosing already done modifications. While here do some code cleanup and formating to make it more readble.
Remove useless code which might even abort package deletion process.
Use global to not cause breakage if path changes.
Avoid duplicate service tags when reinstalling packages
Pass name instead of config_file for start_service
If packages are reinstalled during bootup than there is no need to reinstall them again during GUI login.
Don't delete these additional files until the end of the package uninstall process. Otherwise files needed in some steps will be missing. Should fix some outstanding package issues (especially uninstall/reinstall issues). At the very least this fixes uninstall/reinstall of OpenVPN Client Export.
Do not process items in which we cannot resolve the config file
Missed curly.
Do not error out when trying to delete an unexisting package. Just display an error message.
get_pkg_depends must return the whole paths of dependency files in orderto enable sync_package to check for files which are not installed in thestandard pkg location (i.e. outside of /usr/local/pkg).
Ticket #431Submitted-by: Lorenz Schori
Place conf_mount_ro() calls where supposed too.
Silence errors.
Ensure prefix directory exists before downloading and installing additional file
Ticket #396. Try to fix issues with missing include files or filesystem being in ro mode during operations.
More cleanup and code flow simplification.
When removing a package delete its underlying FreeBSD pacakges.Correct checks for avioding as much as possible errors.Simplify logic in some cases.Remove package include files when uninstalling packages.
NOTE: Some work is needed to have more error reporting. Espescially when failing to retrieve files or add them locally.
Ticket #309. Fix it for packages.
Reactivate the hack for packages to show as installed. Untill php decides to behave.
Ticket #309. Correctly fix the problems of intermediate config lost because of inclusion of config.inc. This might have speed impacts to be measured.
Resolves #309. Seems that including config.inc has bad habits on packages. Workaround this for now until the package config include is fixed.
Fix some package uninstall bits on nano
Replace some occurrence of /tmp with the propper global variable in attempt to minimize the search for what changes /tmp permissions.
Nuke pkg_build_filter_rules(). It is not called anywhere in the code and adds complexity that I do not wish to see in the codebase
Transmit freebsd machine (uname -m) so that we can be begin offering multi platform packages
Check to see if syslogd is running before killing
Move newer xmlreader code to xmlreader.inc. Restore old xmlparse code to xmlparse.inc. Default to the older xmlparse.inc but add a flag check if /cf/conf/use_xmlreader is present the newer code will be included instead until the remaining bugs can be resolved with it (see rcs for many).
Add a new (unlinked) page which allows entering a custom pkg repo URL