summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* alpm_list : add new alpm_list_diff_sorted functionXavier Chantry2009-10-11
| | | | | | | | | | | | This is more efficient than alpm_list_diff since it assumes the two lists are sorted. And also we get the two sides of the diff. Even sorting should more efficient than the current list_diff. Sorting the two lists should be O(n*log(n)+m*log(m)) while the current list_diff is O(n*m). So I also reimplemented list_diff using list_diff_sorted. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Rework the alpm_unpack functionsXavier Chantry2009-10-11
| | | | | | | Add support to extract a list of entries Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* update sync200 pactestXavier Chantry2009-10-11
| | | | | | | | | | update download -> fetch This just meant that we used XferCommand even if internal download was available, no big deal. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* cygwin fix : use unsigned char for ctype functionXavier Chantry2009-10-11
| | | | | | | | | | | | See http://www.nabble.com/-PATCH-RFA--Distinguish-between-EOF-and-character-with-value-0xff-td23161772.html#a23188494 cygwin 1.7 actually displays a warning when using signed char with the ctype function, so that compilation fails when using -Wall -Werror. So we just cast all arguments to unsigned char. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* replace rankmirrors by bash cloneXavier Chantry2009-10-11
| | | | | | | | | This removes python optdepends in pacman package This bash clone is a courtesy of Matthew Bruenig <matthewbruenig@gmail.com> Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* Minor scope/typing cleanupsDan McGee2009-10-11
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* libalpm: clean up lock functionDan McGee2009-10-11
| | | | | | | We were doing a lot of manual work; leverage the standard library a bit to do more for us. Signed-off-by: Dan McGee <dan@archlinux.org>
* Reduce calls to list_count() in removing packageDan McGee2009-10-11
| | | | | | | | We don't need to count the number of packages left once per file when removing; we only need to do it once per package. Also move a variable into the correct scope. Signed-off-by: Dan McGee <dan@archlinux.org>
* Add missing get_usedelta() methodDan McGee2009-10-11
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* typing: a few more fixes for special int typesDan McGee2009-10-11
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* int typing: s/unsigned short/int/ in libalpmDan McGee2009-10-11
| | | | | | | | | | After our recent screwup with size_t and ssize_t in the download code, I found the `-Wsign-conversion` flag to GCC to see if we were doing anything else boneheaded. I didn't find anything quite as bad, but we did have some goofups- most of our public unsigned methods would return -1 on error, which is a bit odd in an unsigned context. Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'maint'Dan McGee2009-10-11
|\
| * alpm_list : fix a bug in alpm_list_removeXavier Chantry2009-10-11
| | | | | | | | | | | | | | A NULL list element triggered an infinite loop. Not cool :) Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Minor fix to Greek translationChristos Nouskas2009-10-11
| | | | | | | | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update Chinese translation甘露(Lu.Gan)2009-10-11
| | | | | | | | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update Swedish translationChristian Larsson2009-10-07
| | | | | | | | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update chinese translation甘露(Lu.Gan)2009-10-07
| | | | | | | | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
| * New Greek translationXavier Chantry2009-10-07
| | | | | | | | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update translationsXavier Chantry2009-10-07
| | | | | | | | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update all pot and po files for 3.3.2 releaseXavier Chantry2009-10-07
| | | | | | | | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
| * 3.2.2 release changesDan McGee2009-10-04
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * doc: Add HACKING to html targetDan McGee2009-10-04
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * doc: ensure SyncFirst behavior with flags is clearDan McGee2009-10-04
| | | | | | | | | | | | | | | | When a SyncFirst transaction kicks in, no flags like '--force' are honored. This is for good reason, as honoring something like '--asdeps' could be quite unintentional. Document this fact and a possible workaround. Signed-off-by: Dan McGee <dan@archlinux.org>
| * callback.c : fallback to normal download with bogus sizeXavier Chantry2009-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using totaldownload, we might get into some weird situations where xfered>total because of bogus CSIZE database entries. This code adds a sanity check and fallbacks to normal download progress if needed. Here is an example using totaldownload on a database with wrong CSIZE, for a total download of ~26 MB. Before : gnome-desktop-2.28.... 1144,3K 678,3K/s 00:00:02 [#################] 4% gnome-panel-2.28.0-... 4,2M 887,7K/s 00:00:05 [#################] 16% gnome-applets-2.28.... 13,6M 1083,0K/s 00:00:13 [#################] 52% gnome-backgrounds-2... 22,9M 964,0K/s 00:00:24 [#################] 87% gnome-settings-daem... 23,6M 938,5K/s 00:00:26 [#################] 90% gnome-control-cente... 26,1M 946,1K/s 00:00:28 [#################] 100% gnome-icon-theme-2.... 27,7M 1465,0K/s 1193046:28:15 [#######----------] gnome-icon-theme-2.... 28,0M 1502,2K/s 1193046:28:15 [########---------] gnome-icon-theme-2.... 28,4M 1582,2K/s 1193046:28:15 [##########-------] gnome-icon-theme-2.... 28,7M 1603,4K/s 1193046:28:15 [############-----] gnome-icon-theme-2.... 29,0M 1604,5K/s 1193046:28:15 [##############---] gnome-icon-theme-2.... 29,3M 1621,0K/s 1193046:28:14 [################-] gnome-icon-theme-2.... 29,6M 1434,8K/s 1193046:28:14 [#################] gnome-icon-theme-2.... 29,6M 974,2K/s 00:00:31 [#################] 113% After : gnome-desktop-2.28.... 1144,3K 1038,7K/s 00:00:01 [#################] 4% gnome-panel-2.28.0-... 4,2M 988,4K/s 00:00:04 [#################] 16% gnome-applets-2.28.... 13,6M 1190,4K/s 00:00:12 [#################] 52% gnome-backgrounds-2... 22,9M 1242,9K/s 00:00:19 [#################] 87% gnome-settings-daem... 23,6M 1193,9K/s 00:00:20 [#################] 90% gnome-control-cente... 2,5M 1347,4K/s 00:00:02 [#################] 100% gnome-icon-theme-2.... 3,5M 1205,4K/s 00:00:03 [#################] 100% Note that gnome-control-center resetted to normal progress mode (2,5M is the package size, not the total size) Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2009-09-29
|\| | | | | | | | | Conflicts: lib/libalpm/dload.c
| * dload : fix infinite download (big type mistake)Xavier Chantry2009-09-29
| | | | | | | | | | | | | | | | | | | | | | fetchIO_read returns -1 in case of error, and the return type is ssize_t, not size_t ! So we converted -1 to an unsigned, which led to huge file write. The rest is just changing the error return a bit. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
| * repo-remove: create empty DB when all packages are removedDan McGee2009-09-23
| | | | | | | | | | | | | | | | | | | | | | | | Rather than creating no database at all, create an empty zipped tar archive in its place. This keeps the download side of repositories a bit more sane as a DB will always exist, and pacman handles this empty case just fine. For this to be fully transparent, we also need to make sure repo-add and repo-remove accept an empty "DB" as an argument, which in reality is a completely void of files .tar.{gz,bz2,xz} archive. Signed-off-by: Dan McGee <dan@archlinux.org>
| * repo-add: make sure we get size of target fileDan McGee2009-09-23
| | | | | | | | | | | | | | If the package we were adding was a symlink, we stuck the symlink size in the database rather than the size of the file it referred to. Whoops! Signed-off-by: Dan McGee <dan@archlinux.org>
* | repo-add: clean up options parsingDan McGee2009-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | -f/--force has been dead for a while, so kill it off. In addition, the check for > 2 args is pretty useless when you do something like: repo-add -q -q or a more legit: repo-add -q /path/to/mine.db.tar.gz So instead make repo-add just return 1 when it doesn't do anything with the database which seems to make more sense. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2009-09-22
|\|
| * Update index.txt with new releaseDan McGee2009-09-22
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Clean up translation file headersDan McGee2009-09-22
| | | | | | | | | | | | | | Get them a bit more standardized across the board, as they were quite a mess. Also note the two new translations we received for 3.3.1. Signed-off-by: Dan McGee <dan@archlinux.org>
| * Add Swedish translationLaszlo Papp2009-09-22
| | | | | | | | | | | | | | | | | | | | This is for 3.3.0, not for 3.3.1. But since there are only like 10 messages missing, it seems worth including now. Signed-off-by: Christian Larsson <congacx@gmail.com> Signed-off-by: Laszlo Papp <djszapi2@archlinux.us> [Dan: fix some busted translation strings] Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update Czech translationOndrej Kucera2009-09-23
| | | | | | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
| * Update Brazilian translationRodrigo Flores2009-09-22
| | | | | | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
| * Add Norwegian translationLaszlo Papp2009-09-21
| | | | | | | | | | | | Signed-off-by: Hans-Kristian Arntzen <maister@archlinux.us> Signed-off-by: Laszlo Papp <djszapi@archlinux.us> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update Polish translationMateusz Herych2009-09-20
| | | | | | | | Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
* | makepkg: tidy usage outputAllan McRae2009-09-22
| | | | | | | | | | | | | | | | | | | | | | Various tidying to the usage output - change "--config <config>" to "--config <file>" to prevent wrapping in a 80 character wide terminal - re-alphabetise options, including moving all long only opts to the end - use same indentation for additional pacman options - remove useless comment Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | testdb : fix many memleaksXavier Chantry2009-09-22
| | | | | | | | | | | | | | | | | | | | Yes, it was that bad :P We still have memleaks left because we cannot free the error data returned by libalpm, but pacman has the same issue. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Allow cache cleaning to process all cache directoriesDan McGee2009-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously we only looked at the first cache directory returned by the library. This allows us to look at all cache directories for cleaning. In addition, change the way we do a full (-Scc) cache cleaning operation. Instead of removing the parent directory, remove each package one-by-one as in the -Sc case. This would be ideal for someone mounting a cache directory over NFS, as it ensures we don't wipe out the mountpoint from underneath the directory. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Propagate return status up in DB cleaning codeDan McGee2009-09-21
| | | | | | | | | | | | | | We didn't look at the return status of sync_cleandb() in sync_cleandb_all(). Make it do so and return it up the call chain. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add missing closedir calls in cache cleanupDan McGee2009-09-21
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Fully implement database lazy loadingDan McGee2009-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 34e1413d75 attempted to implement lazy loading of package databases. Although it took care of my main complaint (creating the database directory if it didn't exist), it didn't allow sync repos to be registered before alpm_option_set_dbpath() had been called. With this patch, we no longer compute the individual repository DB paths until necessary, allowing full lazy loading to work as intended, and allowing us to drop the extra setlibpath() calls from the frontend. This allows the changes introduced in a2cd48960 (but later reverted) to be added back in again. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2009-09-20
|\| | | | | | | | | | | | | | | Message updates made this one a bit messy, but nothing too bad. Conflicts: lib/libalpm/add.c lib/libalpm/remove.c
| * Merge branch 'xav/trans' into maintDan McGee2009-09-20
| |\
| | * Update Italian translationGiovanni Scafora2009-09-18
| | | | | | | | | | | | Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
| | * Update Ukrainian translationRoman Kyrylych2009-09-18
| | | | | | | | | | | | Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
| | * Update Turkish translationSamed Beyribey2009-09-18
| | | | | | | | | | | | Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
| | * Update Spanish translationJuan Pablo González Tognarelli2009-09-18
| | | | | | | | | | | | Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
| | * Update Russian translationSergey Tereschenko2009-09-18
| | | | | | | | | | | | Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>