summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/Add.pm
AgeCommit message (Collapse)Author
2008-03-08rename forced to definesMarc Espie
2007-06-25typoMarc Espie
2007-06-18add tag no shadow, to allow us to specify that we do NOT want tempfilesMarc Espie
into some directories. a few minor style tweaks, such as using a nice join(map()) to build some strings.
2007-06-16Add variation on exec/unexec:Marc Espie
@exec-always @unexec-always @exec-add @unexec-delete @exec-update @unexec-update with the obvious semantics that *update are only run during updates, and *add/delete are only run during `pure' additions/removals. This should solve the problem of those packages that `lose' manual configuration when you update them (e.g., all the mod_xxx apache stuff and postfix). caveat: you will need to go through one finaly broken update before the new stuff kicks in.
2007-06-16use OpenBSD::Paths contentsMarc Espie
2007-06-12tidy error messages: uses $! more consistently, do not append \n on die,Marc Espie
do append \n on warn. Fix the two cases where the temp dir vanished too soon: not copying +DESC should have been apparent. Not finding a +DISPLAY file is not a reason for burping all over the place.
2007-06-09tag user installed packages.Marc Espie
- record what's on the command line. - adjust option depending on -a / !-a - report `manual-install' status when replacing stuff.
2007-06-06finish moving the size computations out of validate_plist.Marc Espie
2007-06-06separate the size computation from other operations in `prepare_for_addition'Marc Espie
`prepare_for_deletion' -> move that to Vstat, as it is common code. Do the splitting of libraries through a deep copy and shallow copy, so that we keep any State information related to libraries (like special group/owners).
2007-06-06tweak how copies happen: rename make_copy into make_shallow_copy,Marc Espie
make_deep_copy. tweak keep_old_files so that we set the pkgname later, when it won't cause any error to have duplicates in there.
2007-06-04a few missed $' / $`Marc Espie
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-01apply the same checks on extraction that are done during pkg_createMarc Espie
(modes and owners without annotation WILL be refused). Somewhat pedantic: skip archive entry during extraction of links/symlinks. Doesn't change a thing, except in the very rare case where a package would end with a link in the packing-list. Now we're able to detect a premature end of the tarball. (okay, it's an obscure bug, I haven't even met it for real. So what ?)
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-31kill REQ script directly. I'm pretty sure it doesn't quite work anyways.Marc Espie
Deprecate INSTALL and DEINSTALL, write out warnings in pkg_create. Clean up some more old cruft
2007-05-31fix the saving of partial installs in case destdir is used.Marc Espie
2007-05-30simplify script handling a bit (they're going to disappear probably anyways).Marc Espie
Remove two passes visitors, we don't use them.
2007-05-30simplify really_add to use real visitors for extraction and installation.Marc Espie
Just do one single try {} catchall {} per-method, as this is enough. New methods: extract_and_progress, install_and_progress, that catch interrupts (die) deal with fake, and handle the progress meter. One single method: mark_progress, can be used for extraction, installation and deletion.
2007-05-30avoid setting partial directly when we can, use inheritance instead.Marc Espie
2007-05-30simplify the way partial installations get recorded: store elementsMarc Espie
already installed in a hash, and do a shallow copy of the list when necessary, using make_copy. This removes a lot of action-at-a-distance in packing-list elements.
2007-05-30slightly better control over partial installations (still preparing forMarc Espie
bigger sets)
2007-05-30separate the creation of the borked package and the Fatal.Marc Espie
2007-05-29rely on packing-lists knowing where they live, much saner.Marc Espie
2007-05-29don't bypass add_object to create special files, otherwise infodir won'tMarc Espie
get defined. Simplify and clean-up register_installation: everything is in the packing-list so don't pass other arguments. Do not copy arbitrary info_names objects, but use a copy_info visitor which copies exactly what files are around. Use the stored infodir to locate DISPLAY and INSTALL files.
2007-05-28delay error reporting a bit more: try installing and deinstalling everythingMarc Espie
and report more issues.
2007-05-28lift up more of the dev checking code into Vstat.Marc Espie
un-special case SpecialFiles on deletion. Now that CONTENTS is part of the plist, it's checked as well on addition.
2007-05-28clean up packing-list validation, call the methods `prepare_for_addition'Marc Espie
and `prepare_for_deletion', that's clearer...
2007-05-27move packing-list validation to the UpdateSet level.Marc Espie
2007-05-22zap references to pkgdep. Packing-Lists no longer even record it, anyways.Marc Espie
2007-05-02$o->method() becomes $o->methodMarc Espie
2007-04-29replace $p->visit('method') calls with $p->methodMarc Espie
now that it works.
2007-04-15update copyright years, standardize licence.Marc Espie
reword the introduction to the stuff originally from FreeBSD to clarify slightly.
2007-02-24UI improvement: in case the disk overflows, let tally give informationMarc Espie
about the extra size needed. In validate, mark the overflow and call tally later. .e.g., Error: /dev/wd0f is not large enough (/usr/local/lib/libkparts.so.4.0.0) Error: /dev/wd0f is not large enough (/usr/local/lib/libkrosscore.so.4.0.0) Error: /dev/wd0f is not large enough (/usr/local/lib/libktexteditor.so.4.0.0) Error: ... more files do not fit on /dev/wd0f /dev/wd0h: 97 bytes /dev/wd0f: 337090852 bytes (missing 78473 blocks)
2006-12-05use lstat for symbolic links; fixes uninitialized uid/gid.Steven Mestdagh
ok espie@
2006-02-16validate() can also take sample files into account.Marc Espie
2006-02-09Turn validate_plist() into a real visitor that calls validate() for eachMarc Espie
object in the packing-list. Move some checks earlier, so that update of packages fails before deleting the old package. Add more checks, like verifying that install/deinstall scripts are indeed located on exec'able partitions.
2005-12-05make sure set_modes always get called for a `real' extraction.Marc Espie
Problem noticed by sturm@
2005-11-02In case we are pretending, make sure we skip to the next archive member.Marc Espie
Otherwise, we might miss a truncated archive that's missing its last file, and PKG_CACHE won't work, since it hits a SIGPIPE too soon. Nice testcase from sturm@
2005-11-02Simplify OpenBSD::PackingElement::Sysctl::install().Bernd Ahlers
okay espie@
2005-10-19mark links being extracted with `zap', so that they do not get recordedMarc Espie
into partial plists until they've gone through an actual install. Prevents partial replacements from destroying genuine links in packages when they get uninstalled.
2005-09-24pass actual items to prepare_long and check_name so that we can alsoMarc Espie
verify that modes/groups/owners are correct (code to come)
2005-09-04zap duplicate codeMarc Espie
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-22maintain a counter of problems encountered per-filesystem.Marc Espie
Do not report more than 3 problems per filesystem unless -v -v.
2005-08-16in case we're pretending to install, there's no borked package to create.Marc Espie
2005-08-13symlinks and hardlinks do not have an md5Marc Espie
2005-08-13don't set $file->{cwd} until *after* we're sure it's defined.Marc Espie
Allows pkg_add to properly report truncated archives, instead of weird can't call method check_name() on an unblessed reference messages. problem reported by brad@, somewhat difficult to reproduce. as usual, the most obvious bugs take the longest time...
2005-08-07wrapper around Ustar that replaces long names/links with LongName#/LongLink#.Marc Espie
The archive will unpack correctly with tar, except that those names won't be preserved. The wrapper checks names against the packing-list to restore the correct names on the fly. Put into a separate file, as it is an extension of Ustar proper, and we're going to do more archive checking in the future. Lots of tests by Bernd Ahlers. Comments by Tom Cosgrove.
2005-08-05Make sure $totsize != 0, even if the package does not contain any actualMarc Espie
files, so that the progress meter will work.
2005-06-21move Arch->check() up to Packingelement, so that it can be called anywhere,Marc Espie
not only while adding packages. Add FatOnly filter, which will be used to get information from packing-lists to select the correct packing-list from a fat package (e.g., @arch and @name).