summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/pkg_delete
AgeCommit message (Collapse)Author
2007-06-30move the UpdateSet stuff into its separate file, leaving Vstat much cleaner.Marc Espie
2007-06-16use OpenBSD::Paths contentsMarc Espie
2007-06-04I am on drugs, I don't know where I found split can take strings asMarc Espie
arguments. Repair...
2007-06-04some minor systematic changes.Marc Espie
- mark all regexps I can with /o if they can be compiled once. - turn $o->method() into $o->method - remove unneeded prototypes - reduce split /re/ into split "string" where possible.
2007-06-01refactor ProgressMeter code to create objects, put these into state.Marc Espie
Create a common state class for delete and add, put the progressmeter creation in there. neat effect: we don't have a progressmeter, we use a stub class instead and *never* pull the code in at all.
2007-05-31move set validation earlier (in fact, it probably doesn't belong inMarc Espie
really_add). move common delete_installed() code inside Delete.pm
2007-05-30fix verbosity.Marc Espie
2007-05-22cleanup shared state a bit earlier. Shouldn't change much, but may helpMarc Espie
ensuring we don't reload fontdirs twice with weird fontdirs case.
2007-05-22introduce a SharedItemsRecorder (put it into Vstat, since that's a fileMarc Espie
common to Add and Delete, for now). Use it to have common code that records items to remove / items remaining. Stash it into pkg_add/pkg_delete state, and abstract the cleaning up operation into the SharedItemsRecorder (so that pkg_add and pkg_delete no longer have to know about the internals of SharedItems at all).
2007-05-20create specific `state' objects for pkg_add and pkg_delete, so that I canMarc Espie
write shortcuts for common behavior, and start hiding some details.
2007-05-20placeholders for UpdateSet, once we have it.Marc Espie
2007-05-20both pkg_add and pkg_delete use Vstat, make it explicit.Marc Espie
2007-05-14tidyMarc Espie
2007-05-01move the old elements into PackingElements, since the code is nowMarc Espie
much shorter.
2007-04-15update copyright years, standardize licence.Marc Espie
reword the introduction to the stuff originally from FreeBSD to clarify slightly.
2007-02-22Problem noticed by Henrik Hellerstedt <henrik@kohina.net>Marc Espie
Fix a really fun bug in pkg_delete: solve_installed_names has to normalize the list of names so that comparing its size vs. its transitive closure is meaningful. Use the classical hash + list to preserve the order. While we're there, use the hash to avoid asking the same questions again and again. After some back&forth with bernd. okay bernd@
2006-08-01If pkg_delete is trying to remove more than one package at the same time andBernd Ahlers
is finding some dependency problems, explain which package depend on what. (with -v, -i or '-F verbosedeps') idea & ok espie@
2005-09-07use `pkg-name' rather than `pkgname' here, for consistency with otherJason McIntyre
pkg_* bits; ok espie@
2005-09-07sort options and sync usage();Jason McIntyre
2005-09-04* New -i interactive option, that can ask obnoxious questions.Marc Espie
* move the signature code to a packing-list method, prepend the pkgname. * depend on distant listings, cache these systematically. * cut the PKG_PATH at :/ systematically, much simpler than parsing URLs. People should get used to trailing /s. * let pkg_add -u actually run the update. * check for signature in more places, for instance, let pkg_add installed_stuff be a void operation. * grab enough stuff during updates to check signatures, so that pkg_add -u can report updates that are not needed right away, instead of waiting for the more confusing `trying to update' * beginning of @module support. * @pkgpath support, including updates. * systematically expand stems when applicable. * use visitors systematically in pkg_info. * pkg_info -S reports signature. * remove hardcoding of categories in PackingList, so that future modules will be able to expand them. * add @updateset and @incompatibility keywords.
2005-08-17reuse compute_closureMarc Espie
2005-08-17we have a much more accurate image of stuff in -n mode, so we canMarc Espie
ditch this test, pkg_delete -n should no longer loop indefinitely.
2005-08-17restore $main::not that is needed by OpenBSD::RequiredBy,Marc Espie
put an # XXX comment so I won't be tempted to clean it again.
2005-01-22do not clean-up shared items in pretend mode (for now, need extra logicMarc Espie
to pretend cleaning it up).
2005-01-14`big lock' model: lock the whole db for reading/writing.Marc Espie
design checked with millert@, relying on process termination for unlock at his suggestion. Perf optimization: don't try to reinstall installed packages in kitchensink mode if !-r.
2005-01-03rename -f -> -FMarc Espie
okay pvalchev@, naddy@, marco@, deraadt@ (keep -f around for the transition, will scrap it soon)
2004-12-27recover from a nasty problem, allow people to delete package even ifMarc Espie
some dependency got badly adjusted.
2004-12-27better messageMarc Espie
2004-12-15move -n down into RequiredBy and PackingList (as $main::not, since weMarc Espie
don't want to load RequiredBy all the time). Remove a few $state->{not} tests that are no longer needed. pkg_add -n / pkg_delete -n should work much better when they need to handle multiple dependencies. (todo: kill plist caches, finish replacing with specialized caches like libraries).
2004-12-12add somewhat more regular error catching code.Marc Espie
2004-12-06UsageMarc Espie
2004-11-15clean-up: pull all option parsing together.Marc Espie
2004-11-14allows for several -f options, since OpenBSD::Getopt makes this possibleMarc Espie
2004-11-14turn on progress meter by default, use -x to disable it.Marc Espie
document the new stuff, partial reorder of options.
2004-11-14let RequiredBy generate lists directly, use hashes to trim down duplicates ↵Marc Espie
directly. Optimize for !wantarray, by telling whether the list is empty or not. prepare for a second similar list (REQUIRING) that will replace pkgdep, since pkg_add -r spends a hell of a lot of its time reading/writing long packing-lists... Use the simplified interface. Remove quite a few tests that the RequiredBy list is non-empty that do nothing but obfuscate the code: just deal with the damn list already.
2004-11-11reversed test.Marc Espie
2004-11-11store a ref to %forced in $state, for access anywhere.Marc Espie
2004-11-11move some code from pkg_add to OpenBSD/Add.pm, for symetry with pkg_delete.Marc Espie
change prototype of validate_plist, ditch globals cdrom_only and ftp_only (stash this into state). Use Warn properly.
2004-11-11don't touch font directories if -n either...Marc Espie
2004-11-11introduce shortcuts to read/write contents from_installation/to_installationMarc Espie
use these to simplify all those packing lists manipulations. demote non-root detection to a warning in -n mode: fix a couple of minor bugs, of stuff that was run in -n mode and should not. Namely, manpages were indexed/unindexed (ouch) and tempfiles were creating during updates.
2004-11-11fix interaction of -n -v -r.Marc Espie
don't enable the progress meter if a very verbose mode is on.
2004-11-09kill old Logger interface, use $state->print() to report problems atMarc Espie
end exclusively now.
2004-11-07show tally in verbose mode as well, why not ?Marc Espie
2004-10-31Simplify ldconfig handling: one single ensure_ldconfig routine thatMarc Espie
reruns ldconfig -R (okay, we don't check that -m would be enough, so what ?) First hooks for -r: check that replacement should work.
2004-10-31Move most of the code of pkg_delete into a separate module so that it willMarc Espie
be usable by pkg_add -r.
2004-10-31Erase old codeMarc Espie
2004-10-26kill old duplicate code.Marc Espie
2004-10-26move the code that handles shared items into a separate Module.Marc Espie
- It will be used after deletion/adding during updates. - We might avoid loading it if a package contains no new directories. Actually a lot of packages don't use it.
2004-10-23store pkgname in shared items, so that delayed printing can be usedMarc Espie
(and use it). Optimisation: don't clone() directories
2004-10-20basic framework for delayed messages.Marc Espie