summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_add/OpenBSD/CollisionReport.pm (follow)
Commit message (Collapse)AuthorAgeFilesLines
* let collisionreport work better with FETCH_PACKAGESespie2019-09-041-1/+4
|
* sanitize say/print output furtherespie2018-02-271-2/+3
| | | | | | | | | | | | | | | - have confirm go thru f() every time (adding confirm_defaults_to_no/confirm_defaults_to_yes apis... verbose but effective) - check DESCR in pkg_create, as suggested by sthen@ - don't do the whole safe dance when not needed (optimization) - misnamed allowed -> forbidden (schwarze@) This effectively prevents DESCR from using diacritics. Sorry! Ingo makes a compelling argument that using UTF8 while installing a new box is currently fairly dangerous, considering tty setups. This affects about 10 ports at the moment, all of which were fixed before this commit.
* zap extra parenthesis after recent rewriteespie2014-12-021-2/+2
| | | | from Mark Patruck
* simplify the interactive code into its own little object with simplerespie2014-11-291-8/+3
| | | | | interface, so that most is it interactive tests vanish from the main program.
* zap blank spacesespie2012-04-281-2/+2
|
* simplify/generalizeespie2011-12-031-8/+4
|
* In a collision, retrofit storage for 2nd pkgname.espie2011-12-031-2/+8
| | | | | (in large updatesets, it may not be obvious where the 2nd copy comes from, as exemplified by ajacoutot@).
* kill very old idiom, I don't actually want to go thru items directly.espie2011-01-021-9/+18
|
* handle failures from ports tree with more care.espie2010-12-241-1/+1
| | | | | this does avoid infinite loops in case of wrong plists. necessary since print-plist-with-depends CAN fail...
* initial scaffolding for @rcscript: for now, acts like normal files,espie2010-10-271-1/+1
| | | | but allow absolute pathnames (treat that as an implicit @cwd).
* display updateset name alongside collisionreport (turns out it's notespie2010-07-111-4/+5
| | | | always obvious)
* allow say and errsay to work without parameters, as it's ways common.espie2010-06-301-2/+2
| | | | create verbose_system up in state, because it makes sense without verbose.
* whitespace cleanupespie2010-06-301-1/+1
|
* ui changes: go thru a state object for most printoutsespie2010-06-091-12/+12
|
* move code around, so that commands can be used as modules.espie2010-06-041-4/+4
| | | | | | pkg becomes the start hub, which does nothing except require the correct module. Saner code wrt Add/Delete, and more sharing.
* whitespace fixesespie2010-05-101-4/+4
|
* use Carp directly, it it very inexpensive actually, since it's been rewrittenespie2010-01-171-3/+3
| | | | | | | to be just a very small stub that loads Carp::Heavy on demand. Also, stop wrapping messages in "Expected", doesn't give us anything. Finally, make RequiredBy calls be carp, so that we actually know where they fail...
* fix new vstat, and make it useful, for instance for -n.espie2010-01-141-9/+10
|
* stat objects with more than value (store symlinks eventually)espie2010-01-081-3/+3
|
* change verbosity handling: be silent by default, turn on the first level if -v.espie2009-12-201-3/+3
| | | | | | | | | | | Add more levels, specifically, lots of info regarding individual files only visible if -vvvvv. Make -n display the same stuff as normal (need -n -v to display more stuff). Introduce -s, "size-only", turns on -n and does skip any extraction. Sprinkle handlers for SIG_INFO, not really nice yet. Note that -n is non functional for complex updates, because of caching issues I have to fix.
* revamp interactive stuff: simplify (just one always for everything, perespie2009-11-171-4/+2
| | | | | theo suggestion. Also go through the "state" object which simplifies code a great deal)
* create a pseudo vstat object inside state, so that we can modify Vstatespie2009-11-161-3/+2
| | | | | | interface very locally... model hints objects like Locations, to uniformize further treatment.
* start categorizing stuff as error messages that should be error messagesespie2009-11-151-8/+8
|
* ouch, collision handling must take destdir into accountespie2009-11-141-4/+5
|
* remove stupid extraneous return...espie2009-11-141-2/+1
|
* fix. noticed by sthen@espie2009-11-141-3/+4
|
* vsystem, system, unlink can mostly go through state, and do the ->clear partespie2009-11-111-4/+3
| | | | as well.
* progressmeter puts STDOUT in autoflush if -t, so that it can display to it instead of piping a lot of stuff to STDERR.espie2009-11-111-15/+15
| | | | | | Go through state->print for most messages, so they will NOT do weird things with the progressmeter. Use a ->say shortcut which does the same thing that perl 5.10 say does...
* bad espie: use strict/warnings consistently, and fix two nits and twoespie2009-11-101-1/+2
| | | | actual errors !
* turn the checksums stored in packing elements into real objects, so thatespie2008-10-061-7/+7
| | | | | | | | pkg_add becomes mostly independent of the type of checksum stored. separate md5 into an abstract OpenBSD::digest class and an md5 subclass with specific methods to compute checksums and serialize results, and create an sha class that does the same thing with sha256 (with a base64 serializer)
* rework collisionreport to allow some limited repair capabilities:espie2008-06-211-41/+76
| | | | | | | | | | assuming none of the files is registered, we can assume that the package registration fails, and then we remove the files, and install the package. Then we also walk installed packages to restore dependencies that would have been erased (this is fairly simple-minded and may fail in weird cases).
* use autovivificationespie2008-06-211-7/+5
|
* rename forced to definesespie2008-03-081-2/+2
|
* sprinkle code to deal gracefully with absent packing-lists.espie2007-06-201-1/+2
| | | | | makes it easier for people to recover after a disk crash that leaves /var/db/pkg half-empty.
* rework `special' package names a bit.espie2007-06-091-2/+2
| | | | | | | | | | | - do a test to create partial-foo-1.0.1 instead of partial-partial-foo-1.0 when removing partial-foo fails. - have .libs name generation, e.g., .libs-foo, then .libs1-foo, then .libs2-foo instead of .libs-.libs-foo.... extend the pkgspec pattern slightly, so that all these are more or less equivalent for dependencies and conflicts. With this, we can do practically any scenario of shared libs updates and downgrades.
* some minor systematic changes.espie2007-06-041-3/+3
| | | | | | | - 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.
* allow for removing colliding files... very dangerous.espie2007-05-301-1/+9
|
* $o->method() becomes $o->methodespie2007-05-021-4/+4
|
* update copyright years, standardize licence.espie2007-04-151-2/+2
| | | | | reword the introduction to the stuff originally from FreeBSD to clarify slightly.
* more clues for people who update their system.espie2006-05-041-1/+11
|
* tell user about collision much earlier, so that they do not wonder whatespie2006-02-061-2/+2
| | | | is taking so long...
* better collision reports.espie2004-12-171-15/+27
| | | | | | | | | | | - in validate_plist, don't re-add a file that exists. - allows the virtual file system to put marks on existing files - use a \$pkgname the first time a file is added (space constraints: don't duplicate the pkgname). - in CollisionReport, first check the vfs, so that we don't look at installed packages when the collision only concerns newly added pkgs. Makes pkg_add -n report collision reports correctly.
* both borked.* and partial-* are recognized.espie2004-12-161-3/+3
| | | | give the right pkg_delete command
* renamed borked_installation from borked.n to partial-<pkgname> ...espie2004-12-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | partial-<pkgname>.n if needed. Make borked_installation take a message, to show installation/deinstallation issues correctly. Fix handling of ^C: this may lead some system calls to return early, thus registering as errors: so always mark the last file as done, so that borked installation will register it correctly. Kill packing-list cache for anything but depends: we've got a global cache of libraries now (use it in pkg_add). Make almost everyone look at $main::not, so that we can call register_installation to_installation RequirementList->add/delete safely. Simplify $not logic accordingly, do thing much more closely to what would happen without -n. This should allow pkg_add/pkg_delete -n to handle most nasty cases correctly now, since all the relevant information is kept internally in a compact format: - register of shared libraries - global register of conflicts - cache of depends.
* hit the clueless...espie2004-11-151-5/+19
|
* pass full item to CollisionReport, so that it can compute md5 for filesespie2004-11-141-4/+14
| | | | not registered with any package, and tell you if the file differs or not.
* fix loop label. reported by naddy@espie2004-11-131-2/+2
|
* move collision reporter to a separate file, so that it doesn't get loadedespie2004-11-111-0/+60
all the time.