summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2007-11-15Remove REQUIREDBY usage from libalpmDan McGee3-6/+10
Instead of using the often-busted REQUIREDBY entries in the pacman database, compute them each time they are required. This should help many things: 1. Simplify the codebase 2. Prevent future database corruption 3. Ensure when we do use requiredby, it is always correct 4. Shrink the pmpkg_t memory overhead Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-14Make it easier to ignore multiple packages.Nathan Jones3-2/+51
This makes --ignore and --ignoregroup able to accept multiple packages/groups by separating each with a comma. For instance: pacman -Su --ignore kernel26,udev,glibc This was requested in the comments of FS#8054. Signed-off-by: Nathan Jones <nathanj@insightbb.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-14Add help for --ignoregroup.Nathan Jones1-0/+2
Signed-off-by: Nathan Jones <nathanj@insightbb.com> [Dan: split usage line into two lines for clarity] Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-13Fix display of -Qip output when a package file is givenDan McGee2-2/+8
Too many fields were being shown on -Qip output, and sizes were not always correct (-Qi and -Qip output on the same package did not agree). Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-11Remove 'Total Package Size'Dan McGee1-7/+3
Having 'Total Installed Size' and 'Total Download Size' makes this size unnecessary. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-11Typo fix (sepArately)Aaron Griffin1-1/+1
Found by Giovanni Scafora <linuxmania@gmail.com> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-11-11Missing quote in outputAaron Griffin1-1/+1
Found by Giovanni Scafora <linuxmania@gmail.com> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-11-11Add a missing newline in sync confirmation outputDan McGee1-0/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-11pacman: remove leftover help string for -RhDan McGee1-1/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-11Implement TotalDownload option.Nathan Jones2-21/+46
Setting this option will change the download progress to show the amount downloaded, download rate, ETA, and download percent of the entire download list rather than per each individual file. The progress bar is still based on the completion of the current file regardless if the TotalDownload option is set. This closes FS#7205. Signed-off-by: Nathan Jones <nathanj@insightbb.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-11Add TotalDownload option.Nathan Jones2-0/+6
This will be used in the next commit. Signed-off-by: Nathan Jones <nathanj@insightbb.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-11Implement IgnoreGroup.Nathan Jones1-2/+2
This option acts as if IgnorePkg was set on each package in the group. This closes FS#1592. Signed-off-by: Nathan Jones <nathanj@insightbb.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-11Add IgnoreGroup and --ignoregroup option.Nathan Jones1-0/+15
This will be used in the next commit. Signed-off-by: Nathan Jones <nathanj@insightbb.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-09Simplify callback DONE event handlingDan McGee1-15/+11
Move them all to a single fallthrough case statement since they all print "done". Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-09Add missing 'done' printoutDan McGee1-0/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-09Fix some issues with localized dates/epoch usageDan McGee1-2/+5
Commit 47622eef4dd8fd86a0aa0e3ebdb7b33f7c9d6804 introduced localized times in the metadata by way of storing the UNIX epoch value instead of a hard coded date string. However, it missed a few things: * If we weren't in the C/POSIX/en_US locale, the date parsing would fail as it tried to use the abbreviations of the locale being used. Fix this by switching the LC_TIME value before we parse a date. * We used ctime to print the date value, which is always the C locale string. Instead, use strftime to print a localized date string. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-06Add LOGFILE as a define at compile time for pacmanDan McGee2-1/+4
It has always been a bit odd that logfile had to be specified in the config file, but no other paths did. Add LOGFILE as a preprocessor definition, and make a call to alpm_option_set_logfile() to set the default location so no logfile parameter is necessary in pacman.conf. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-05Remove the newline automatically added by alpm_logaction.Chantry Xavier2-5/+5
This way, _alpm_logaction behaves like _alpm_log, and gives more control. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-11-04Clean up usage of extern variablesDan McGee10-14/+6
Instead of declaring the extern variable in every *.c file, include it in the header file that makes sense. This means handle.h for the handle, and conf.h for the pacman side config object. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04Readd scriptlet logging that got lost in an earlier commitDan McGee1-0/+3
I broke scriptlet logging with ad691001e20272b794d2ed574b556f520e3555c0. Readd more or less what was there before, although it still needs a lot of work including hopefully rewriting it to a new event subsystem and having it log to a seperate file. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04vercmp: add some usage instructionsDan McGee1-0/+21
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04Make building of pacman.static optionalDan McGee1-1/+5
Because building of pacman.static fails on some platforms, we should make it optional. It is enabled by default but can be disabled with the use of the --disable-pacman-static flag. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04Fix basename usage in pacman and utilitiesDan McGee3-9/+35
basename() is a rather untrusty function call on a lot of platforms as it does some weird and different things. To solve this, I added a mbasename fuction to pacman to take its place, and simply removed its usage in the utilities (it isn't worth dealing with there). Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04Remove final use of the math library from pacmanDan McGee1-2/+1
To round a value, we don't need floorf- we can just cast to an int. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-30When printing size_t, use %zdDan McGee2-2/+4
%d was used, which worked for Linux and FreeBSD. Not so for Darwin. The warning was probably spat out when compiling on x68_64 as well, but no developers use this architecture as their primary one. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-30pacman/query.c: add missing free()Dan McGee1-2/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-27Clean up LDADD usageDan McGee1-4/+2
We had a lot of unnecessary overstatements of libraries to include on linking, and autoconf/automake takes care of this for us. This also helps some compilation issues on other platforms. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-27Fix mcheck detection and usageDan McGee1-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-27Dependency error/log messages fixNagy Gabor1-1/+3
The old code used only the depend.name in messages, which might have not been informative. The new code uses the whole dependency string in %DEPENDS% format. (Dan: slight English clarification in one of the messages) Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-25Add alpm_dep_get_string methodNagy Gabor3-31/+9
Public alpm_dep_get_string function is introduced, which converts a pmdepend_t structure to printable string in %DEPENDS% format. This function is now used in pacman to print dependency error messages. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-24Add strndup implemention for environments that are missing itDan McGee2-0/+26
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-24One more added include to help compilation elsewhereDan McGee1-0/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-23Ensure all localization stuff is correctly guardedDan McGee2-6/+9
Anything dealing with libintl and localization should be correctly guarded inside an ENABLE_NLS block on both the pacman and libalpm sides. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-23Fix broken or missing includesDan McGee2-0/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-20Add download size to target list.Nathan Jones4-7/+11
This displays the download size, taking into account delta files and cached files. This closes FS#4182. Signed-off-by: Nathan Jones <nathanj@insightbb.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-20Download delta files if UseDelta is set.Nathan Jones2-1/+25
Delta files will be used if the size is smaller than a percent (MAX_DELTA_RATIO) of the package size. Signed-off-by: Nathan Jones <nathanj@insightbb.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-16Remove rounding on package size totalsDan McGee1-14/+2
We print the total to two decimal places, so there is no real need for rounding of the values. Remove the rounding and switch all output to two decimal places. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-15pacman/pacman.c : put back root check even if -r is specified.Chantry Xavier1-3/+1
Root is needed for most install / remove operation, because it's needed for chrooting, for running scriptlets. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-10-10util/testdb: fix up function namingDan McGee1-4/+4
We shouldn't use the _alpm prefix (copy-paste issue, no big deal). Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-09pacman/pacman.c : add --logfile option.Chantry Xavier1-0/+10
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-10-09Update usage of gcc __attribute__ flagsDan McGee1-3/+3
Change the default visibility of libalpm functions to internal instead of hidden- this allows for slightly better optimization because it tells GCC that the function can never be called outside of the current module (see http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html). Also added some attributes to the pacman print functions so that they check the format strings being passed to them. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-09Remove the non-user friendly --ask optionDan McGee3-93/+35
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-05Fix -Sy and -Sp operations.Chantry Xavier2-3/+3
When the -Sy operation failed, the lock wasn't removed because alpm_trans_release wasn't called. This is fixed now. Also, after my last change in commit 52e7e6d74733f7a431376a9e528c4fe4d3732068 , Sp didn't do anything anymore. That's because needs_transaction returned false for -Sp, so the sync transaction wasn't run. However, the current implementation of -Sp requires a sync transaction. Also, since a transaction creates the lock file at the beginning, and releases it at the end, this mean that -Sp requires root access anyway.. I think I understand now why Aaron found that the current -Sp implementation is hackish :) Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-10-04needs_transaction adjustmentsChantry Xavier3-55/+69
I just moved the root path check out of needs_transaction, and put it directly in pacman.c . I think this part is alright. For the other problems, I thought about doing the transaction first, in a new sync trans function, which will init and release a transaction. And then doing the commands like -Ss / -Sl / -Sg / -Si. The problem is that for commands like -Sys / -Syl / etc, only the refresh part of the transaction should be done. So I had to introduce an ugly sync_only hack. Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-09-28Allow --refresh specified for most -S optionsAaron Griffin1-24/+27
Included options are -g, -i, -s, and -l All of these will sync the DB if -y is specified and permissions are appropriate. Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-09-28Break out transaction test to a separate functionAaron Griffin3-15/+23
Added needs_transaction, putting out "hey do we need root?" tests in one place. Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-09-28OMG a space!Aaron Griffin1-1/+1
Yeah, I added a space. It deserves its own commit. Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-09-28Support for localized times in metadataAaron Griffin1-3/+4
Packages and DBs now support using the UNIX epoch (seconds since Jan 1, 1970) for use in builddate and installdate. This will only affect newly built packages. Old existing packages with the text format are still supported, but this is deprecated. In the case of removal of text time support, this code will fail gracefully, returning the start of the epoch for broken packages. Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-09-28Add 'full' parameter to alpm_pkg_loadDan McGee3-4/+5
In most cases, we want to fully scan a package when we load it, which serves as a integrity verification check. However, there are times when it is only desired to read the metadata and nothing else, so allow the caller of pkg_load to choose the behavior they need. This pays big dividends in speeding up pacman cache cleaning functionality. Old (729 packages): real 1m43.717s user 1m20.785s sys 0m2.993s New (729 packages): real 0m25.607s user 0m19.389s sys 0m0.543s Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-28Update comments dealing with pkgext/dbext strippingDan McGee1-2/+1
pacman/callback.c already did the work I set out to do with this commit, so update the comments accordingly in the frontend and backend. Signed-off-by: Dan McGee <dan@archlinux.org>