summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2007-12-10popen does NOT require /bin/sh in a subchrootAaron Griffin1-3/+3
I appears that when chrooted, the /bin/sh used by popen is that of the parent process. This is true until the process forks once chrooted, which we do not want to do. As such, this actually makes things nicer. We don't need a /bin/sh in a chroot to run install scriptlets, and don't need to check for it in the root directory Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-10Fail sanely on OUTPUT rules when --nolog is passedAaron Griffin1-2/+6
Check for existence of the logfile first, and output an error if not found Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-10Correct scriptlet usage patternAaron Griffin2-9/+2
The new pattern is as follows: . /path/to/scriptlet post_upgrade X Y This requires less frameworking in the install scripts (the three lines that shift and eval a function are nasty) Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-10Update GNU GPL boilerplate and copyright datesDan McGee80-290/+134
Update the GPL boilerplate to direct people to the GNU website for a copy of the license, as well as bump all of Judd's copyrights to 2007. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-10pactest: if we are root, don't use fakerootDan McGee1-1/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-10Updates to PKGBUILD manpageDan McGee1-6/+11
Make the manpage a little more distro agnostic by referring to ABS in the context of Arch Linux, and saying that prototype files are also available with the pacman source. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-10Rename prototype install fileDan McGee1-0/+0
Most (sane) people name their install file pkgname.install, and this move of the prototype reflects that. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-09Improve changelog handling through addition of open/read/close functionsDan McGee5-26/+137
Thanks to Allan for inspiring all this work on what was one little TODO item in the codebase. :) Change changelog handling so we can now dump a changelog from both installed packages and package files (fixes FS#7371). We do this by moving all of the machinery to the backend where it should have been in the first place. The changelog reading is now done through a open/read/close interface similar to the fopen/fread/fclose functions (can you guess how it is done?). It is buffered by the frontend, so programs using the library can read as much or as little as they want at a time. Unfortunately, I could not implement a changelog_feof function due to some shortcomings of libarchive. However, I left the stub code in there, commented out, in case it becomes possible later or anyone wants to take a stab at it. Original-work-by: Allan McRae <mcrae_allan@hotmail.com> Improved-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-09Updated Italian TranslationGiovanni Scafora1-227/+251
Signed-off-by: Giovanni Scafora <linuxmania@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-08src/pacman/: use the FREELIST macro when possible.Chantry Xavier4-9/+4
Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-08testdb.c : add vim modeline according to HACKING, and reindent the file.Chantry Xavier1-98/+100
Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-08_alpm_unpack: return 1 when the file is not found.Chantry Xavier1-1/+2
If _alpm_unpack has a specific file to extract (not NULL), but doesn't find it, it'll now return 1, for indicating the failure. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-07libalpm/server.c : fix segfault when downloading failed.Chantry Xavier1-1/+1
The alpm_list_free(complete) needs to be done OUTSIDE the loop walking through the server list. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-05Update pacman manpage with description of --clean optionDan McGee1-7/+12
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-05pacman/sync.c : improve the sync db cleanup feature.Chantry Xavier1-10/+14
This feature (introduced by b118ce55bd01c7ebd42b5b6d4a0f34aa925701d8 as a part of -Sc) could actually be helpful in the 3.0 -> 3.1 transition, because all sync dbs will be left in /var/lib/pacman/, while the updated ones will go to /var/lib/pacman/sync/. So it'll now clean everything in /var/lib/pacman/, and only the unused databases in /var/lib/pacman/sync/ (with the exception of local/ and sync/ in both cases). Note: This feature is undocumented. I wonder if moving it to another option, something like -S --dbclean, wouldn't help for documenting it. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-05Remove duplicated PM_TRANS_CONV_INSTALL_IGNOREPKG messageNagy Gabor1-1/+3
Now alpm_checkdeps first search for literals, then search for no-literal satisfiers Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> [Dan: fix spelling of INTALL, fix line wrapping] Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-05Update zsh completion.Nathan Jones1-21/+64
Update zsh completion file to version 0.5-2 from AUR and add the new options in pacman 3.1. Signed-off-by: Nathan Jones <nathanj@insightbb.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-04Compress hard linked man pagesAllan McRae1-12/+28
This fixes FS#5392. If hard links are present for a man page, all other hard linked files are removed, the man page is zipped and the hard links are updated to the newly compress man page. Signed-off-by: Allan McRae <mcrae_allan@hotmail.com> [Dan: use find -samefile option, don't fail if one of mandirs is nonexistent] Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-04libalpm/backup.c : simple refactoring.Chantry Xavier2-14/+53
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-12-04Updated Italian translation for pacman 3.1Giovanni Scafora1-30/+30
Signed-off-by: Giovanni Scafora <linuxmania@gmail.com> modified: po/it.po Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-04Update some errors in messages found during localizationDan McGee10-23/+23
Also perform the updates in the message files so we don't break translations. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-04Updated Hungarian translationNagy Gabor1-91/+75
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-03pacman/sync.c: mark sync_trans as staticDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-03Oops- forgot to ever set init to 1 in setlibpaths()Dan McGee1-0/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-03Delay output during progress barChantry Xavier3-3/+65
This fixes the output issue related to the progress bar by delaying the output. We can decide later (post-release) if we like this method or we want to switch to something else. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> [Dan: just some minor cleanups] Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-03Update it translation for 3.1Giovanni Scafora2-115/+96
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-02Merge branch 'maint' into workingDan McGee0-0/+0
2007-12-02Update en_GB translation for 3.1Jeff Bailes2-401/+438
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-02Update all translation files in anticipation of 3.1 releaseDan McGee20-7248/+16894
Update all of the pot and po files with the latest messages available. Translators- you are encouraged to do this as well every time you update the translation, and the directions in 'translation-help' should help. Also feel free to delete all the old translations that end up at the bottom of these files and only clutter things up. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-02alpm_list : change the alpm_list_find* to return the matching item.Chantry Xavier4-14/+16
alpm_list_find and alpm_list_find_ptr will now return a void *, and alpm_list_find_str will return a char *, instead of an int. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-02Add a lot more tests (and some pactest fixes) to -Si and -Qi testsDan McGee3-8/+33
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-02Add more pactests to increase code coverageDan McGee9-1/+96
These new tests test the following ops at least once: -Ss, -Si, -Sl, -Sp, -Qs, -Qi, -T Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-02Remove _alpm_depmiss_isinDan McGee2-20/+0
This is unneeded now that commit 2ed6b482d2fce916466e44e37930f0b0c0d928bb has eliminated the last user of this function. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-02Add 4 new pactests to get better code coverage by pactestDan McGee6-2/+22
I started playing around with gcov today and it showed a few places in the code that we don't test at all. This is the start of ensuring that we execute most of the code in our codebase. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-02parseconfig: refactor duplicate code out into a functionDan McGee1-66/+39
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-02Remove "done" messages from frontend callback functionDan McGee1-31/+16
This should simplify our output a bit when it comes to determining whether or not we need a newline in our output. A "done" message was almost always immediately followed by another start message anyway (or some other output), so it really isn't necessary. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-02Add --ignoregroup to completion filesDan McGee2-0/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-02Fixes for the ineptitude of libalpm DB registrationDan McGee1-45/+61
When a DB is "registered" in libalpm, it goes and tries to create paths and other BS which is stupid, but a pain in the butt to fix. For now, work around this terrible behavior by ensuring our paths are always set before we call any alpm_db_register function. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-02Make pacman path handling (hopefully) a bit more intuitiveDan McGee3-41/+62
I made pacman path handling a bit odd with my rootdir changes a while back in order to increase flexability. However, it had a bit of a drawback in that dbpath/logfile/etc. would not default to being under the rootdir if that was the only parameter you specified in the config file or on the command line. (Note: logfile handling was always broken due to the explicit logfile line required in config files) Pacman now works as follows: if a rootdir is specified but not dbpath or logfile: attempt to place the logfile and dbpath in their default locations under root if an explicit dbpath/logfile is specified: interpret these as absolute paths, regardless of the rootdir setting if nothing is specified: fall back to configured defaults Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-02Add new --needed option for -S.Chantry Xavier6-27/+23
During a pacman operation such as a group install, pacman can ask several questions such as "local version is up to date. Upgrade anyway?". They are usually all answered either by yes or by no: * yes when you want to reinstall all the targets. * no when you only want to install the missing ones (either because you are installing a group, or because you are copying a pacman -S line from wiki or whatever). So instead of asking this question for each target, it is now now configured with a flag. Yes will be the default -S behavior, No will be achieved with the --needed flag. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-01Unify dump_pkg_full in pacman [-Si, -Qip, -Qi and -Qii]Nagy Gabor4-62/+58
dump_pkg_sync is now a trivial wrapper for dump_pkg_full Some smaller changes: * string_display function added to util.c [prints None in case of empty string] * Filename field added to -Qip * rename License to Licenses * 'Compressed Size' used instead of 'Download Size' for -Qip Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> [Dan: fix whitespace errors, spacing issues, const modifiers] Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-01New sync1005 and sync1006 pactestsNagy Gabor2-0/+28
This pactest checks what happens if a package exists in two sync repos. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> [Dan: added sync1006, same test with different versions] Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-01Minor fixes in sync.c and deps.c.Chantry Xavier2-5/+4
* memleak found by Nagy in checkdeps * an useless line found by Nagy in resolvedeps * data wasn't set to the missing dependencies in sync_prepare * use the MALLOC macro in resolvedeps Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-01Ensure 0644 permissions for install and changelog filesAaron Griffin1-0/+2
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-30Remove alpm_depcmp DEBUG outputDan McGee1-4/+0
alpm_depcmp is simple enough that we shouldn't need constant debug logging, and the logging we do have in there negatively impacts our speed regardless of whether we actually are seeing it or not. If it ever needs debugging, it would be trivial to reimplement it by just temporarily reverting this commit. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-30Remove some null checks in _alpm_checkdepsDan McGee1-10/+2
Hopefully these are unnecessary, as they were probably added originally to cover up a problem instead of finding the root cause. I'd rather fail hard in these cases anyway. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-30alpm_checkdeps clean-upNagy Gabor1-117/+34
No bugfixes, just makes the code human-readable Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-29Move requiredby computation before any display startsDan McGee1-2/+6
This should reduce the chances of people thinking pacman hung during the middle of something. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-25_alpm_checkconflicts splitNagy Gabor3-40/+39
_alpm_innerconflicts: check for target<->target conflicts _alpm_outerconflicts: check for target<->localpkg conflicts This will be useful in sync.c clean-up and in testdb.c As an application the patch also fixes a misleading message (and a memleak) in add.c Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-25pacman/query.c : -Qo optimization.Chantry Xavier1-0/+8
I didn't understand why realpath was called on every files of every filelist in query_fileowner : ppath = resolve_path(path); It turns out this is needed for the diverted files. For example, cddb_get installs /usr/lib/perl5/site_perl/5.8.8/CDDB_get.pm which actually ends in /usr/lib/perl5/site_perl/current/CDDB_get.pm . And for making pacman -Qo /usr/lib/perl5/site_perl/current/CDDB_get.pm , realpath has to be called on both the target, and the file in the filelist. However, realpath is costly, and calling it on every single file resulted in a poor -Qo performance. Worst case : pacman -Qo /lib/libz.so.1 0.35s user 1.51s system 99% cpu 1.864 total So I did a little optimization to avoid calling realpath as much as possible: first compare the basename of each file. Result: src/pacman/pacman -Qo /lib/libz.so.1 0.24s user 0.05s system 99% cpu 0.298 total Obviously, the difference will be even bigger at the first run (no fs cache), though it's quite scary on my system : 1.7s vs 40s previously. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>