Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| revised_pkg_install [2010/04/02 07:04] – EnjiCooper | revised_pkg_install [2018/04/15 17:29] (current) – MarkLinimon | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | :!: MarkLinimon' | ||
| + | |||
| The goal of improving the package installation experience is multi-fold: | The goal of improving the package installation experience is multi-fold: | ||
| Line 7: | Line 9: | ||
| * For instance, add libarchive support to make pkg_install more responsive to failures, and thus reduce wasted time waiting for tar to complete, and also reduce the number of shell calls. | * For instance, add libarchive support to make pkg_install more responsive to failures, and thus reduce wasted time waiting for tar to complete, and also reduce the number of shell calls. | ||
| * Add locking so that multiple copies of pkg_add / pkg_delete can be run in parallel, thus avoiding (or at the very least reducing) potential race conditions as far as modifying installed packages is concerned. | * Add locking so that multiple copies of pkg_add / pkg_delete can be run in parallel, thus avoiding (or at the very least reducing) potential race conditions as far as modifying installed packages is concerned. | ||
| + | * Remove the custom Boolean data type with C99 standard '' | ||
| - Write extensive tests so that we can ensure that the code makes functional sense; many BSD implementations sadly lack tests, and thus we can't be sure that the code actually meets requirements and reacts in meaningful ways. | - Write extensive tests so that we can ensure that the code makes functional sense; many BSD implementations sadly lack tests, and thus we can't be sure that the code actually meets requirements and reacts in meaningful ways. | ||
| Line 28: | Line 31: | ||
| * An idea that was kicked around before by jilles@ was a potential rewrite of pkg_install with a scripting language (of some flavor) as the top-level frontend, and then use a C backend to do the actual maintenance tasks. Take for instance apt vs dpkg, or yum vs rpm. This seems to be a good idea, but again -- requires some rewrites and fudging around. | * An idea that was kicked around before by jilles@ was a potential rewrite of pkg_install with a scripting language (of some flavor) as the top-level frontend, and then use a C backend to do the actual maintenance tasks. Take for instance apt vs dpkg, or yum vs rpm. This seems to be a good idea, but again -- requires some rewrites and fudging around. | ||
| * pkg_install for instance has been completely rewritten (for the most part) in %%NetBSD%% to use a seemingly more logical structure: http:// | * pkg_install for instance has been completely rewritten (for the most part) in %%NetBSD%% to use a seemingly more logical structure: http:// | ||
| + | * libpkg (started during the 2009 %%GSoC%%) takes advantage of libarchive and is another possibility for base: http:// | ||
| * libpkg (which I was originally looking at for the 2007 %%GSoC%% and abandoned due to time) is another possibility for the base, but the project has been dead for over a year now (maybe because the code was contributed back to %%DragonflyBSD%%? | * libpkg (which I was originally looking at for the 2007 %%GSoC%% and abandoned due to time) is another possibility for the base, but the project has been dead for over a year now (maybe because the code was contributed back to %%DragonflyBSD%%? | ||
| + | |||
| + | ====== Bugs ====== | ||
| + | |||
| + | - pkg_delete -f needs fine tuning. | ||
| + | * -f should overwrite only the dependency checks | ||
| + | * an new option should be used for removing files which checksum does not match. - didn't reach consensus on this. | ||
| + | * " | ||
| + | |||
| + | - pkg_add should by default skip already existing files, and override them only with an option similar to pkg_delete above. | ||
| ====== Proposals for Phase 2 ====== | ====== Proposals for Phase 2 ====== | ||
| + | |||
| + | - Replace @exec and @unexec for config. | ||
| + | |||
| + | Packing lists are clobbered with lines like : | ||
| + | |||
| + | @exec [ ! -f %B/foo ] && cp %B/%f %B/ | ||
| + | @unexec cmp -s %D/etc/foo %D/ | ||
| + | @unexec rmdir %D/ | ||
| + | |||
| + | Suggestion by flz: http:// | ||
| + | \\ | ||
| + | \\ | ||
| + | @cpin name : copy if non-existent, | ||
| + | @rmiu name : remove if unchanged, remove name if name and name-dist are no different.\\ | ||
| + | \\ | ||
| + | Maybe consider it with only on instruction: | ||
| + | @config etc/foo etc/ | ||
| + | \\ | ||
| + | Pkg_add will copy if non-existent " | ||
| + | Pkg_delete will remove " | ||
| + | \\ | ||
| + | Support may be extened to have macros in bsd.port.mk: | ||
| + | http:// | ||
| + | \\ | ||
| + | \\ | ||
| - Replace @exec and @unexec with script infrastructure code and deprecate existing callers. | - Replace @exec and @unexec with script infrastructure code and deprecate existing callers. | ||
| * Need to produce prototype to demonstrate effectiveness of the following items: | * Need to produce prototype to demonstrate effectiveness of the following items: | ||
| - | - Quantifiable performance results stating statistically what the difference is on average processing plists without @exec and @unexec in the following cases, with the parsing code enabled and disabled. | + | - Quantifiable performance results stating statistically what the difference is on average processing plists without @exec and @unexec in the following cases, with the parsing code enabled and disabled. |
| + | - Provide an implementation that makes absolute justifiable sense. | ||
| * Need to write up an official proposal noting the change. Reference thread: http:// | * Need to write up an official proposal noting the change. Reference thread: http:// | ||
| Line 42: | Line 81: | ||
| * Need to produce prototype to demonstrate effectiveness of the following items: | * Need to produce prototype to demonstrate effectiveness of the following items: | ||
| - | - Quantifiable performance results stating statistically what the difference between polymorphic packages and non-polymorphic packages. | + | - Quantifiable performance results stating statistically what the difference between polymorphic packages and non-polymorphic packages. |
| + | - Provide an implementation that makes absolute justifiable sense. | ||
| * Need to write up an official proposal noting the change. | * Need to write up an official proposal noting the change. | ||
| Reference thread: http:// | Reference thread: http:// | ||
| - | Author' | + | Author' |
| + | |||
| + | ---- | ||
| + | |||
| + | {{tag> | ||