summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Minor rephrasing of the question asked by -Sc.Chantry Xavier2007-11-18
| | | | | | | | | Suggested by stonecrest on irc : 'I think "uninstalled" would be better, as it implies that the package was once installed and since removed. Otherwise a user might wonder why there are non-installed pkgs in cache' Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
* Extend the -Sc operation to also clean up unused sync databases.Chantry Xavier2007-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | We discussed this with stonecrest on IRC : 20:46 stonecrest >> someone brings up a good point.. why aren't repos that aren't in the pacman.conf removed from /var/lib/pacman? 20:46 stonecrest >> i have 118mb and 24 dirs in there, but only 5 repos at present 21:26 stonecrest >> shining: i guess you could prompt the user on deleting every dir in /var/lib/pacman.. since it shouldn't happen that often except for the first time 21:30 stonecrest >> could be part of pacman -Sc.. what else were you thinking? I already heard about this before, but it sounded dangerous to me. I didn't even think about a simple prompt. I also didn't know where this code would fit. And it fits well with -Sc, I borrowed most of the code from sync_cleancache. Example session : Cache directory: /var/cache/pacman/pkg/ Do you want to remove non-installed packages from cache? [Y/n] n Database directory: /var/lib/pacman/ Do you want to remove unused repositories? [Y/n] Do you want to remove /var/lib/pacman/sync/pacman-git? [Y/n] Do you want to remove /var/lib/pacman/sync/deltatest? [Y/n] Database directory cleaned up Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Don't filter package files output based on dir/file statusDan McGee2007-11-18
| | | | | | | This caused more problems than it solved, especially with -Qlp output and files that are new to the new package. Signed-off-by: Dan McGee <dan@archlinux.org>
* pacman/sync.c : remove duplicated fallback on providers.Chantry Xavier2007-11-17
| | | | | | | | | | | The fallback on providers when a target is not found was already made in the backend : libalpm/sync.c , _alpm_sync_addtarget . So I removed it from the frontend. The sync500 pactest proves this fallback still works correctly. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Two memleak fixes in pacman.Nagy Gabor2007-11-17
| | | | | | Both memleak was an unfreed alpm_db_whatprovides list. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
* War on whitespaceDan McGee2007-11-16
| | | | | | Run the kernel's cleanfile script on all of our source files. Signed-off-by: Dan McGee <dan@archlinux.org>
* Ensure -Si and -Qi output show correct dependenciesDan McGee2007-11-14
| | | | | | | | Because alpm_pkg_get_depends() no longer returns strings as the data, we need to first convert the returned structures to printable strings before we can print the list. Signed-off-by: Dan McGee <dan@archlinux.org>
* testdb: remove requiredby checkingDan McGee2007-11-14
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove REQUIREDBY usage from libalpmDan McGee2007-11-14
| | | | | | | | | | | | 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>
* Make it easier to ignore multiple packages.Nathan Jones2007-11-13
| | | | | | | | | | | | 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>
* Add help for --ignoregroup.Nathan Jones2007-11-13
| | | | | | 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>
* Fix display of -Qip output when a package file is givenDan McGee2007-11-13
| | | | | | | 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>
* Remove 'Total Package Size'Dan McGee2007-11-11
| | | | | | | Having 'Total Installed Size' and 'Total Download Size' makes this size unnecessary. Signed-off-by: Dan McGee <dan@archlinux.org>
* Typo fix (sepArately)Aaron Griffin2007-11-11
| | | | | | Found by Giovanni Scafora <linuxmania@gmail.com> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
* Missing quote in outputAaron Griffin2007-11-11
| | | | | | Found by Giovanni Scafora <linuxmania@gmail.com> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
* Add a missing newline in sync confirmation outputDan McGee2007-11-11
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* pacman: remove leftover help string for -RhDan McGee2007-11-11
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Implement TotalDownload option.Nathan Jones2007-11-11
| | | | | | | | | | | | | | 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>
* Add TotalDownload option.Nathan Jones2007-11-11
| | | | | | | This will be used in the next commit. Signed-off-by: Nathan Jones <nathanj@insightbb.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Implement IgnoreGroup.Nathan Jones2007-11-11
| | | | | | | | | 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>
* Add IgnoreGroup and --ignoregroup option.Nathan Jones2007-11-11
| | | | | | | This will be used in the next commit. Signed-off-by: Nathan Jones <nathanj@insightbb.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Simplify callback DONE event handlingDan McGee2007-11-08
| | | | | | | Move them all to a single fallthrough case statement since they all print "done". Signed-off-by: Dan McGee <dan@archlinux.org>
* Add missing 'done' printoutDan McGee2007-11-08
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix some issues with localized dates/epoch usageDan McGee2007-11-08
| | | | | | | | | | | | | 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>
* Add LOGFILE as a define at compile time for pacmanDan McGee2007-11-05
| | | | | | | | | 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>
* Remove the newline automatically added by alpm_logaction.Chantry Xavier2007-11-04
| | | | | | This way, _alpm_logaction behaves like _alpm_log, and gives more control. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
* Clean up usage of extern variablesDan McGee2007-11-04
| | | | | | | | 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>
* Readd scriptlet logging that got lost in an earlier commitDan McGee2007-11-04
| | | | | | | | | 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>
* vercmp: add some usage instructionsDan McGee2007-11-04
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Make building of pacman.static optionalDan McGee2007-11-04
| | | | | | | | 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>
* Fix basename usage in pacman and utilitiesDan McGee2007-11-04
| | | | | | | | | 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>
* Remove final use of the math library from pacmanDan McGee2007-11-04
| | | | | | To round a value, we don't need floorf- we can just cast to an int. Signed-off-by: Dan McGee <dan@archlinux.org>
* When printing size_t, use %zdDan McGee2007-10-29
| | | | | | | | %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>
* pacman/query.c: add missing free()Dan McGee2007-10-29
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Clean up LDADD usageDan McGee2007-10-26
| | | | | | | | 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>
* Fix mcheck detection and usageDan McGee2007-10-26
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Dependency error/log messages fixNagy Gabor2007-10-26
| | | | | | | | | 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>
* Add alpm_dep_get_string methodNagy Gabor2007-10-25
| | | | | | | | 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>
* Add strndup implemention for environments that are missing itDan McGee2007-10-24
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* One more added include to help compilation elsewhereDan McGee2007-10-23
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Ensure all localization stuff is correctly guardedDan McGee2007-10-22
| | | | | | | 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>
* Fix broken or missing includesDan McGee2007-10-22
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Add download size to target list.Nathan Jones2007-10-19
| | | | | | | | | | 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>
* Download delta files if UseDelta is set.Nathan Jones2007-10-19
| | | | | | | | 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>
* Remove rounding on package size totalsDan McGee2007-10-16
| | | | | | | | 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>
* pacman/pacman.c : put back root check even if -r is specified.Chantry Xavier2007-10-14
| | | | | | | 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>
* util/testdb: fix up function namingDan McGee2007-10-10
| | | | | | We shouldn't use the _alpm prefix (copy-paste issue, no big deal). Signed-off-by: Dan McGee <dan@archlinux.org>
* pacman/pacman.c : add --logfile option.Chantry Xavier2007-10-08
| | | | Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
* Update usage of gcc __attribute__ flagsDan McGee2007-10-08
| | | | | | | | | | | | 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>
* Remove the non-user friendly --ask optionDan McGee2007-10-08
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>