summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2007-09-18libalpm/add.c : newline fix.Chantry Xavier1-2/+2
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-09-18Avoid segfaults whet calling alpm_option_get_* before initializationStefano Esposito1-19/+164
When calling a function of the alpm_option_get_* group, you get a segfault if you don't call alpm_initialize() first. With this patch those functions set pm_errno to PM_ERR_HANDLE_NULL and return an error value if handle == NULL. (Dan: modified to meet pacman coding standards) Signed-off-by: Stefano Esposito <stefano.esposito87@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-18Update British English translationJeff Bailes1-562/+1557
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-18Allow rankmirrors to read from stdinPeter Johnson1-2/+6
Feature Request #8043 and provided patch. Thanks! Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-18Add Australian mirrorDan McGee1-0/+1
Thanks to Jeff Bailes <thepizzaking@gmail.com> for pointing this out. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-18rankmirrors : add support for the $repo var in url.Chantry Xavier1-3/+7
To keep working correctly with url like : ftp://ftp.archlinux.org/$repo/os/i686 rankmirrors will now replace $repo by core. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-17Merge branch 'asciidoc' into workingDan McGee19-1085/+1281
We're getting close to release, so might as well do this now so people can actually update some of our documentation.
2007-09-17trans.c : reworking of transaction interruptionsChantry Xavier6-26/+39
My two previous hacks related to this part (8038190c7c4786e1c49494eea1b40cdddcbd5136 and b15a5194d1a8485a2769560e49e6ff03e1862533) were caused by the lack of understanding of a feature introduced a while ago: Better control over CTRL-C interruptions -- do not leave the DB in an inconsistent state (54008798efcc9646f622f6b052ecd83281d57cda). Now I have been looking at this commit, and the added feature is indeed interesting. The main problem I had with it is that it does a rather unusual use of alpm_trans_release, which caused a few problems that I tried to fix in a weird way. I think these problems were caused by the fact that there weren't any difference between "interrupt transaction" and "release a transaction which failed" actions from the alpm_trans_release POV. So I decided to add a new function instead, alpm_trans_interrupt, which is called on Ctrl+C, and which only sets trans->state to STATE_INTERRUPTED so that remove_commit and add_commit can exit cleanly at a safe moment. This allowed me to revert my two previous hacks as well. Also ensure we handle SIGINT correctly in all cases- if a transaction is not ongoing, then we can free the transaction and exit quickly. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-17Remove the DB consistency check from pacman and libalpm.Chantry Xavier10-94/+23
This reverts commit dfc85cb5f516ffbcff557522e9703c5c7d88b047 and b6f3fe6957d0206485eac98fb2120578b75d0058. This DB check is already in testdb (among others). Also testdb now uses the db path set at make time by default, so specifying the db path is optional. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-17Remove a dead mirror, update contrib/pacsearch for core changeDan McGee2-2/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-16Add new Russian mirrorDan McGee1-0/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-16Make changes for Arch Linux current -> core changeDan McGee5-7/+7
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-12Add testdb util for finding inconsistencies in the database.Chantry Xavier3-1/+194
Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-12make alpm_strerror binding friendlyStefano Esposito8-33/+39
I'm currently working on python bindings for alpm written in pyrex. While working i found that declaring alpm_strerror as char * alpm_strerror (void) instead of char * alpm_strerror (int err) and then using pm_errno in the implementation instead of err, could make it more bindings-friendly. Dan: cleaned up and added void to declaration. Instead of replacing existing function, add a new function called 'alpm_strerrorlast(void)'. Signed-off-by: Stefano Esposito <stefano.esposito87@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-12libalpm/deps.c : export _alpm_checkdeps (-> alpm_checkdeps).Chantry Xavier2-1/+10
Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-12libalpm/package.c : add new alpm_pkg_compute_requiredby function.Chantry Xavier2-38/+48
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-09-12Make some small changes recommended by splintDan McGee4-22/+24
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-07Fix sync db location in pactest so new location is acceptableDan McGee1-1/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-07libalpm/trans.c : remove the lock even on interrupted transactions.Chantry Xavier1-2/+3
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-09-07Add a few pactests collected over time.Chantry Xavier6-0/+128
remove047 : Remove a package required by other packages conflict004 : a package conflicts with itself http://www.archlinux.org/pipermail/pacman-dev/2007-August/009077.html sync400 : Install package with dep that conflicts with older version of package sync401 : Ensure we choose provider already in target list http://www.archlinux.org/pipermail/pacman-dev/2007-July/009041.html sync402/sync403 (failing) : Choice between two providers http://www.archlinux.org/pipermail/pacman-dev/2007-July/008787.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-09-07scripts/*.sh.in: Clean up and fix a few bugsAndrew Fyfe4-234/+237
repo-add, repo-remove: 'bsdtar -c * | ...' doesn't work (you need '-f -'). Code clean up eliminated this bug. Removed the multiple checksum support, pacman now only supports MD5, so there's no need for the database to contain multiple checksums. Quote all variables containing file/dir names to prevent paths containing spaces from causing problems. Add msg, warning and error functions. General code clean up. pacman-optimize: Use a sub-directory in /tmp for working files to make it easier to clean up at the end. Add quotes round $@ in die and die_r, otherwise printf can't display the message correctly. makepkg: Disable colour output if stderr is not a tty. Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
2007-09-07Add a few missing includes, caught while compiling on cygwinDan McGee2-0/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-06contrib : update zsh and bash completion to reflect the new sync dbs location.Chantry Xavier2-4/+4
I wonder how many tools / scripts deal directly with the sync databases under /var/lib/pacman/ , I doubt these are the only ones. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-09-04libalpm: remove outdated files from POTFILES.inDan McGee2-3/+0
Fixes 'make dist' target as sha1.c and md5driver.c no longer exist. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-04Fix compile-time error with de.po, runtime error with db.cTravis Willard2-2/+6
One string in de.po differed pretty strongly with its translated version. It may still be totally wrong as far as translations go, but it compiles now. Get translater to check. Also, ensure the proper dbpath gets set in the db when it's created. Signed-off-by: Travis Willard <travis@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-03Add new mirrorDan McGee1-0/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-02Update German translationMatthias Gorissen2-97/+37
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-02libalpm/remove.c : avoid duplicated packages in removal list.Chantry Xavier1-3/+5
Suppose a package foo depends on foo1, foo2, ..., foon. Doing pacman -Rc foo1 foo2 ... foon added foo n times to the removal list, because what checkdeps return is something like : foo1 is requiredby foo foo2 is requiredby foo ... foon is requiredby foo Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-30Update po/hu.poNagy Gabor1-392/+380
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-27separate local from sync dbs on filesystemTravis Willard4-46/+90
Introduce two new methods into the API - alpm_db_register_sync and alpm_db_register_local, which replace the functionality of alpm_db_register. db_register_local always returns the local DB, and db_register_sync will always try to register a sync DB. This conceptually separates the local DB from sync DBs in the code. Also updated the pacman frontend to use the new functions. In addition, this changes the location of all sync DBs in the filesystem from $DBPATH/$REPO to $DBPATH/sync/$REPO, This removes the silly limitation that a sync DB couldn't be named 'local', along with structurally separating sync DBs and the local DB in the filesystem. Signed-off-by: Travis Willard <travis@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-26libalpm/add.c : fix backup handling.Chantry Xavier1-1/+1
During last refactoring, a "continue" somehow became a "return(0)" :) Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-08-26pacman/sync.c : kill extra newline with groups on -Ss operation.Chantry Xavier1-1/+1
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-08-26scripts/makepkg.sh.in: Add missing [Andrew Fyfe1-1/+1
Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
2007-08-24libalpm: add newlines to all strings passed to log callbackDan McGee15-303/+302
This allows us to remove the hack in the frontend where we added a newline to everything coming out of the pm_printf functions, and instead let the developer put newlines where they want them. This should be the last hangover of that auto-newline stuff. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-24libalpm/remove.c: check for ability to unlink is wrongDan McGee1-1/+2
As reported by JGC in FS #7652, the check for EACCES is not exactly correct. We need to check for the ETXTBSY error as well. This is necessary on FreeBSD. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-23makepkg : add -L (--dereference) to file.Chantry Xavier1-1/+1
makepkg didn't correctly detect the type of the archive since it didn't dereference symlinks, and so failed to extract the source tarball. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-22pacman.c: clarify reason for doing 2 strcmp operationsDan McGee1-0/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-22configure.ac: Remove the hyphen from the version suffixDan McGee1-2/+2
Also switch out outdated PACKAGE_STRING variable for pacman_display_version. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-22Various valgrind mem leak fixesDan McGee5-29/+43
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-22Add a default cachedir if one wasn't specifiedDan McGee2-0/+7
Use the default cachedir (specified at compile time) if one wasn't specified on the command line or in the config file. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-22Post trial install changes, round oneDan McGee14-140/+208
A bunch of changes related to my first "real" install of pacman-git into /usr/local and trying to use it. * Shift some uses of free -> FREE in libalpm. * Move stat and sanity checks of config paths into libalpm from the config and argument parsing in pacman.c. * Fix issue where dbpath still was not defined early enough due to its requirement for being used in alpm_db_register. This should be rewritten so it doesn't have this dependency, but this will work for now. Signed-off-by: Dan McGee <dan@archlinux.org>
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>