summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/Add.pm
AgeCommit message (Collapse)Author
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).
2005-06-12test that archive->next() worked, and explicitly throw a `truncated archive'Marc Espie
message if it didn't work. Replaces messages like: Use of uninitialized value in string ne at /usr/libdata/perl5/OpenBSD/Add.pm lin e 344. Use of uninitialized value in join or string at /usr/libdata/perl5/OpenBSD/Error .pm line 67. Error: archive does not match != share/autoconf-2.13/acheaders with: Error: truncated archive
2005-02-07take size of metainfo into account when checking if the file system isMarc Espie
large enough before installing a package.
2005-01-13let collision reports give the name of the package they're trying toMarc Espie
install. When you add 2000 packages, this can be *real* confusing otherwise.
2004-12-20don't display some details in -n mode unless very verbose.Marc Espie
2004-12-18display something when files ought to get moved in -n.Marc Espie
2004-12-18ignore size issues in kitchensink pretend mode.Marc Espie
Be consistent: show added files and deleted files if pretending.
2004-12-17better collision reports.Marc Espie
- 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.
2004-12-16renamed borked_installation from borked.n to partial-<pkgname> ...Marc Espie
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.
2004-12-12add somewhat more regular error catching code.Marc Espie
2004-12-02Vstat API changed slightly. Found out by fries@Marc Espie
2004-11-22implement global repository for shared libraries.Marc Espie
2004-11-18support depend (similar to libdepend and newdepend) and wantlib:Marc Espie
put lookup_library code in a separate routine, and add a `harder' mode for wantlib, that will also look in system libraries, and in the full tree of dependent packages.
2004-11-14pass full item to CollisionReport, so that it can compute md5 for filesMarc Espie
not registered with any package, and tell you if the file differs or not.
2004-11-13look for available registered libraries, not other stuff.Marc Espie
2004-11-13use lastname as I should.Marc Espie
2004-11-13cwd() function so that further changes to internal storage won't matterMarc Espie
that much.
2004-11-13move borked_installation over to common routines, prepare it forMarc Espie
Update.
2004-11-12be saner wrt directory creation during pkg updates:Marc Espie
don't disturb existing objects if they're not directories, create them better if they don't exist.
2004-11-11move collision reporter to a separate file, so that it doesn't get loadedMarc Espie
all the time.
2004-11-11File::Copy use moves as well.Marc Espie
2004-11-11need to move collision_report over as well, and use PackageInfo routines.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-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-06oops. Thanks krw.Marc Espie
2004-11-06die if moving tempfiles doesn't work.Marc Espie
pkg_delete should remove tempnames, since files actually live there.
2004-11-06zap tempname once we've moved the file.Marc Espie
2004-11-06mark whole state for `replacing' so that only file entries get tempnameMarc Espie
markers. Explain about tempname to PackingElement, so that we become able to save temporary packing-lists (e.g, borking during replace will now work).
2004-11-01pkg_add may need to clean up shared items now that it can delete old stuff.Marc Espie
let very verbose mode show moving files around.
2004-11-01move all the checking prior to extraction to a `prepare_to_extract' function.Marc Espie
check that linknames match while we're at it.
2004-11-01handle the case of symlinks.Marc Espie
Let pkg_add -r do extraction first, and finish installation later.
2004-11-01separate `extract' routine that can put an archive in temporary filesMarc Espie
next to their final locations. XXX: doesn't work with hard links, yet.
2004-11-01reorg pkg_add slightly, put all options into state so that we don't needMarc Espie
to use local variables.