summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2007-08-20Add sync1003 pactest.Nagy Gabor1-0/+26
The sync package pkg3 depends on the sync package pkg2, but pkg1 replaces pkg2. So pkg2 is added to the remove list. When checkdeps checks if pkg2 can be removed, it looks at the packages that require pkg2 (with the RequiredBy field of pkg2), but this doesn't contain pkg3 at this point. RequiredBy fields are only updated after the packages are installed. Proposed solution : checkdeps should know both the remove and upgrade list to decide properly. Reference: http://www.archlinux.org/pipermail/pacman-dev/2007-July/008972.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-08-20libalpm/add.c,trans.c : cleanup of requiredby handling.Nagy Gabor4-98/+16
This patch cleans up and fix the _alpm_trans_update_depends function and ensure that all requiredby fields are filled in case of multiple satisfiers (previously, the handling of mutliple satisfiers in that function was inconsistent). This makes a special case handling of requiredby in commit_single_pkg() obsolete, and so allows cleaning that code as well. Also fixed upgrade056 pactest because : 1) the requiredby fields were wrong, and this wouldn't happen with the fixed _alpm_trans_update_depends(). 2) this is a very unusual case anyway (and handling all corner cases combined to a broken database seems nearly impossible to achieve). References : http://www.archlinux.org/pipermail/pacman-dev/2007-July/008919.html http://www.archlinux.org/pipermail/pacman-dev/2007-July/008920.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-08-20Fix for FS 6404 and functionalize some cachedir handling stuffDan McGee6-143/+137
In order to best resolve bug 6404, move some cachedir handling stuff out of sync.c and into util.c and create two new functions: filecache_find and filecache_setup. sync.c was rewritten to use these, and alpm_fetch_pkgurl now also uses these routines. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-20Add const qualifier to md5_file and alpm_get_md5sumDan McGee4-6/+8
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-20Clean up architecture handling in configure.acDan McGee2-20/+15
Remove the need for two variables for the architecture-specific switches (things like "-march=i686") by combining it into one variable. Also allow configure to proceed with only a warning if we don't have presets for the detected architecture- it is kind of stupid to restrict ourselves like we had been. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-17libalpm/sync.c : don't go back on STATE_PREPARED when committing fails.Chantry Xavier1-2/+0
In my opinion, a commiting transaction that failed isn't equivalent to a prepared transaction. Some things could have been done in the meantime. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-08-16Fix some errors spit out by -WextraDan McGee7-16/+15
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-16configure.ac: Clean up and document version number incrementsDan McGee1-10/+60
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-16Clean up MD5 code.Andrew Fyfe8-412/+422
* Move alpm md5 functions to lib/libalpm/util.c * Remove unneeded includes for md5.h * Replace md5 implementation with one from http://www.xyssl.org Dan: clean up XySSL code by removing parts we don't use, and add a note saying what changed. Dan: fix alpm_get_md5sum, off by one error on the malloc call and other small things. Signed-off-by: Andrew Fyfe <andrew@neptune-one.net> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-16Remove support for SHA1 from pacman.Andrew Fyfe13-650/+22
There's no need for a second hashing algorithm. MD5 serves the purpose of verifying that a package file hasn't been corrupted during download. Signed-off-by: Andrew Fyfe <andrew@neptune-one.net> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-16libalpm/db.c : add alpm_db_unregister_all.Chantry Xavier4-25/+56
This basically moves the code from alpm_release, which was mostly about unregistering all databases, to a safer alpm_db_unregister_all. This allows to avoid modifying the dbs_sync list while iterating over it, and and also prevent alpm_release from looping infinitely when a database can't be unregistered. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-08-16pacman.c: Alphabetize listing of query optionsDan McGee1-3/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-15libalpm/db.c : allow unregistering db for interrupted transaction.Chantry Xavier1-1/+2
This prevents alpm_release to loop infinitely in case of an interrupted transaction, where the database wasn't unregistered. alpm_release should probably also be fixed, as it can still loop if db_unregister fails for another reason. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-08-15new query options : explicit (-Qe) and deps (-Qd).Chantry Xavier3-8/+29
The t shortcut for --test was removed, the orphan option (previously -Qe) was renamed to -Qt, -Qe lists all packages installed explictly, and -Qd lists all packages installed as dependencies. Besides, t can be combined with either e or d. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-08-15libalpm/query.c : makes orphans and foreign options as filters.Chantry Xavier1-129/+76
The --foreign and --orphans functions now behave as a filter for the other options. This cleans the code a bit, and will make easier the adding of new filter options, like explicit (show only explictly installed packages) or depends (show only packages installed as dependencies). Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-08-15src/util: Clean up headers and a few fixesDan McGee3-19/+14
Remove some unnecessary headers in the two utilities as well as fix a possible non-null termination issue in vercmp. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-14package.h: implement origin_data union in pmpkg_t structDan McGee7-47/+55
We were using a void *data element in pmpkg_t before, which is unsafe by its nature of being untyped. Reimplement data as origin_data being a union that can hold either a path to a package file or a pointer to a cache database, and make the other necesary updates in the code to reflect this. See package.h for details. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-14Code cleanupDan McGee8-61/+1
Remove the commented desc_localized stuff, we can find it later in version control. Also remove some unnecessary includes of the stat header and use -fstack-protector-all which is a bit more broad. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-12scripts/makepkg.sh.in: Fix 2 bugsAndrew Fyfe1-0/+3
- Downloaded files weren't being copied to $srcdir - Counter wasn't being incremented for checksum checks Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
2007-08-12pacman/sync.c : return 0 on succesful search, 1 otherwise.Chantry Xavier1-1/+4
Closes FS#7690. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-08-12libalpm/conflict.c : small speed-up and fix.Nagy Gabor1-6/+5
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-08-12libalpm/conflict.c : small memleak fix.Nagy Gabor1-0/+1
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-08-12Add two pactest for versioned conflicts.Nagy Gabor3-9/+27
A side effect of the previous commit ( ea9a756eeaca7398c0860b55f8abe2932ad195bd ) is that it's now possible to use versioned conflicts. Add two new conflict pactests for showing it. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-30Update mtune/mcpu/march comments in makepkg.confDan McGee1-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-26Fix re-pacman locale issuesDan McGee1-0/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-26Update Spanish translationJuan Pablo González Tognarelli1-12/+11
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-26Fix gettext output in repo-{add,remove}Andrew Fyfe2-26/+24
Signed-off-by: Andrew Fyfe <andrew@neptune-one.net> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-23Cleanup of pacman.c and addition of default paths to frontendDan McGee2-40/+54
Instead of barfing when the root path and db path haven't been defined, have pacman set them to some sane defaults when they aren't specified on either the command line or the config file. Also do some cleaning of error output and Doxygen comments. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-20libalpm/conflict.c : cleanup + fix for conflict001.Chantry Xavier1-167/+82
Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-20add conflict001 pactest.Nagy Gabor1-0/+19
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-20libalpm/sync.c : two memleak fixes in _alpm_sync_prepare.Nagy Gabor1-8/+3
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-20libalpm/sync.c : fix DEPENDSONLY flag handling.Chantry Xavier1-16/+9
I didn't like the patch proposed by Nagy for the sync1002 pactest here: http://www.archlinux.org/pipermail/pacman-dev/2007-July/008971.html So here is another attempt of fixing it. In case of the DEPENDSONLY flag : 1) pass an empty list to resolvedeps instead of the list of targets 2) empty the trans->packages targets list before adding the resolved deps. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-20Add sync1002 pactest.Nagy Gabor1-0/+19
Reference: http://www.archlinux.org/pipermail/pacman-dev/2007-July/008971.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-20libalpm/alpm_list.c : add SYMEXPORT to all alpm_list_ functions.Chantry Xavier1-11/+11
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-18Reorder functions in libalpm/package.c for Doxygen purposesDan McGee1-414/+413
Put all of the public functions at the top and inside the Doxygen packages group. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-18Hungarian translation updatesNagy Gabor1-3/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-17libalpm/deps.c : split alpm_depcmp.Chantry Xavier1-16/+29
That function wasn't big, but this might be useful for later refactoring of the search for satisfier code. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-17libalpm/deps.c : split sortbydeps function.Chantry Xavier1-27/+41
The _alpm_sortbydeps function has two main part : 1) initialization of the graph structure 2) the sorting itself So it didn't seem bad to move the first part to a second function. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-16Remove unnecessary entries from .gitignore filesDan McGee10-21/+0
.gitignore works recursively, so we don't need Makefile and Makefile.in in all of the subdirectory .gitignore files. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-16Use only one mirror list for all reposChantry Xavier4-64/+53
Fully implement what this commit allows: ebad1996149d72cf4a1fe15fe8326f2b4996f585 Dan: update .gitignore as well. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-16new pmdepend_t / pmdepmissing_t accessors.Chantry Xavier6-40/+45
Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-16Add remove046 pactest for FS#7622.Chantry Xavier1-0/+10
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-15makepkg: Add note with some required programs for executionDan McGee1-0/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-15Clean up libalpm/add.c and revise file extraction codeDan McGee1-547/+633
This is a full refactoring of _alpm_add_commit into multiple functions and a better layout for later. Some highlights: * No regressions in pactest performance. * Much cleaner layout. add_commit is split into four functions: upgrade_remove, extract_single_file, commit_single_pkg, _alpm_add_commit * No more super-functions, the heaviest (extract_single_file) is finally under 400 lines, with much improved commenting as well. * Incorporation of Andrew Fyfe's ideas for fixing FS #7484. Try to handle all possible cases of extraction combinations with files, symlinks, dirs, and non-existant entries on the filesystem. This should make our dealings with libarchive fall more into our control. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-15Add new sync012 pactest.Chantry Xavier1-0/+20
This test installs three packages with a circular dependency, to check everything still goes fine in that case. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-15Update AUTHORS file, change encoding to UTF-8Dan McGee1-3/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-15Add --asdeps option to pacmanDan McGee8-20/+59
This replaces the former -D operation that was undocumented and rather hacky. It can be used with add, upgrade, or sync transactions and will affect all packages installed. Should close FS #7193. Also tell makepkg to use this new flag. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-15libalpm/deps.c : cleanup + little fix for resolvedeps.Nagy Gabor4-68/+69
The resolvedeps function was a bit negligent, as showed by the sync011 pactest. Reference : http://www.archlinux.org/pipermail/pacman-dev/2007-July/008782.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-15Switch repo-add, repo-remove, and pacman-optimize to bsdtarDan McGee3-15/+15
Relatively straightforward fixes (s/tar/bsdtar/g, add hyphens to options). Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-14Ensure requiredby entries are removed during an upgradeDan McGee4-23/+47
This fixes the failure of the requiredby004 pactest in a not so pretty way, but it gets the job done. I purposely used the extremely long name of PM_TRANS_TYPE_REMOVEUPGRADE to be both clear and in the hope that someone else will figure out a better solution. Original idea from Nagy Gabor, patch updated and cleaned for current code. Signed-off-by: Dan McGee <dan@archlinux.org>