summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2007-06-05Clean up unnecessary headers and macros from alpm.cDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-05Fix compilation with GCC 4.2.0Dan McGee
'inline' keyword in C99 is not correctly recognized, so compilation fails on the warning it spits. This fixes this. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-04Merge branch 'alpm.c_cleanup' into frontend_configDan McGee
Conflicts: lib/libalpm/alpm.c
2007-06-04Fix up outstanding parseconfig issuesDan McGee
The db variable was left unset when calling alpm_db_register, leading to a failure to ever register a sync db. Also added a check to ensure DBPath was set when trying to register a database. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-04Rip alpm_parse_config out of libalpmDan McGee
Switch over to the new frontend parseconfig. * Fix a few issues in parseconfig * Remove unused callback upon database registration * Remove conf file related errors from error.c/alpm.h Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-04Add a parseconfig to the pacman frontend that compilesDan McGee
Warning: this compiles but may not work as intended quite yet. :) Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-04Move functions out of alpm.c to where they belongDan McGee
alpm.h is the only "publically viewable" file, so there is no reason to have functions in alpm.c that belong in package.c, db.c, etc. Move the functions where they belong and leave only the library init functions in alpm.c. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-04Autotool clean up.Andrew Fyfe
* Add vim modeline to Makefile.am and configure.ac * Fix white space in Makefile.am and configure.ac * Add contrib/wget-xdelta.sh to EXTRA_DIST in Makefile.am Signed-off-by: Andrew Fyfe <andrew@neptune-one.net> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-04Remove hardcoded defines from libalpmDan McGee
Remove any use of the former path variables defined by the Makefiles or config.h. These are now runtime configurable only with pacman.conf (or by using flags on the command line). Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-04Start moving hardcoded paths out of libalpmDan McGee
Move the defaults for RootDir, CacheDir, DBPath, and LockFile into pacman.conf, just as LogFile was done before. Add a section to alpm_parse_config to look for a LockFile directive. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-02Remove freespace checking codeDan McGee
This code depends on /etc/mtab existance, which is not very reliable in all cases, especially in a chroot or non-Linux environment. Dump it for now until we can find a better way. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-01Change -z|--showsize flag to ShowSize pacman.conf optionNathan Jones
Also cleaned up some duplicate printf lines related to the ShowSize option. Signed-off-by: Nathan Jones <nathanj@insightbb.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-05-31alpm_parse_config(): ignore #.*$, not just ^#.*$VMiklos
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-05-31Move DB and cache dirs away from there dependence on ROOTDIRDan McGee
This change allows us to use all autoconf specified paths, most notably $(localstatedir). It is quite a change and touches a lot of files, as all references to the DB and cache were done with the ROOTDIR as a prefix. * add --lock command-line option to pacman to specify the location of the lockfile (this can now be specified at configure time by setting the $localstatedir path). * Rip quite a few settings out of configure.ac as they are now picked by setting the paths during configure or make. * Fix bug with /tmp fallback for sync downloads not working correctly (related to root location, now the system tmp dir is used). * Simplified the parameters to some libalpm functions, and added get/set for the new lockfile option. * Renamed several of the DEFS to names without the PM_ prefix. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-05-18Allow $repo expansion in 'Server' config linesAaron Griffin
Small change (addition of a 'strreplace' function) which replaces any $repo tokens found in a server line with the name of the repo or section being processed. While this is more simplistic than suggestions on flyspray, it works and I think it is cleaner. Merits can be discussed further. Ref: FS#6389 Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-05-18Fix extraneous "ignoring upgrade" output on Ignore'd packagesChantry Xavier
Reorder package version checking so there is no output when a package is listed in IgnorePkg. Closes FS#7111 Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-05-18Continue scanning when an invalid DB entry is foundAaron Griffin
Fix for FS#7133 - when DB scanning finds an invalid named entry, scanning is currently aborted. Instead we will simply skip it and find the next valid package. Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-05-18Remove trailing slashes from Server URLsAaron Griffin
Simple clean up for the rest of the code, which also prevents a little libdownload bug relating to '//' appearing in URLs. Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-05-18Fix libarchive permission extractionAaron Griffin
Hackish fix to ensure libarchive extracts files and dirs with the right permissions. For some reason extracting /tmp on install wasn't handled properly by librachive, so an explicit chmod will fix this. Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-05-14Use alpm_depcmp in _alpm_pkg_update_requiredbyNagy Gabor
The old function did too much on its own; let alpm_depcmp do the hard work. This will allow for future versioned provisions if necessary. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-05-14Remove unnecessary casts on malloc and elsewhereDan McGee
We had many unnecessary casts, most of them dealing with malloc and other memory allocations. The variable type should take care of it; no need to do it explicitly. In addition, I caught a const error while removing the casts. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-05-09Fix IgnorePkg handling with replacement packagesAaron Griffin
Allow IgnorePkg (or --ignore) to work for _either_ side of a replacement. For example, if 'foo' is set to replace 'bar', ignoring either package will skip this replacement. Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-04-29libalpm util.c and util.h cleanupDan McGee
* Remove some unnecessary conditional compiling in util.h- move the functions tha required it to trans.c (along with a bunch of new header includes). * Clean up util.h a bit- remove some header includes, remove universal libarchive include and only put it in the files that need it. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-29Remove STRNCPY macro from libalpmDan McGee
Replaced calls to the STRNCPY macro with the actual strncpy function, and pacman passes all pactests. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-28Remove 'removes' array from libalpmDan McGee
We don't use this functionality for now, so get rid of it and the functions associated with it. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-28Remove FREELISTPTR macroDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-28Remove FREEPKG macro and correctly type _alpm_pkg_freeDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-28Remove FREEHANDLE macro and correctly type _alpm_handle_freeDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-27Remove FREESERVER macro and correctly type _alpm_server_freeDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-27Remove FREEGRP macro and correctly type _alpm_grp_freeDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-27Remove FREESYNC macro and correctly type _alpm_sync_freeDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-27Remove FREETRANS macro and correctly type _alpm_trans_freeDan McGee
Remove an unnecessary macro, and get rid of the void pointer. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-26Clean up gettext on the libalpm sideDan McGee
Remove inclusion of libintl.h from all files, because we can do it once in util.c where the _() macro is defined. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-26Set the correct type on the log callback functionDan McGee
Somehow missed this earlier when changing everything to types. unsigned short -> pmloglevel_t wherever necessary. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-25Update Doxyfile for v1.5.2Dan McGee
Ran a doxygen -s -u as recommended on the Doxyfile. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-25add.c and remove.c cleanupDan McGee
Unification and cleanup of the add.c and remove.c code. It looks remarkably similar, so this may be a candidate for functionalization at a later time. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-25Update the pot language filesDan McGee
It looks like it is easier if these get updated too, so lets do it for now. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-25Update all translation po filesDan McGee
In order to get more reliable message statistics, I updated all of the po files by first doing a make *.pot-update followed by a make. I am holding off on committing the pot files as this causes issues with make constantly wanting to rebuild them. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-25Updated French TranslationNam
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-23Updating German TranslationPierre Schmitz
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-22Using wrong variable for depend lookup in sortbydepsNagy Gabor
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-04-22Let IgnorePkg superceed the FORCE package flagChantry Xavier
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-04-22Added Spanish translationJuan Pablo González T
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-16Update German translationMatthias Gorissen
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-16Add Polish language translationMateusz Jędrasik
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-16ldconfig changes from CVSAaron Griffin
forward-porting some 3.0.2 changes * Nagy's ldconfig fix * 3 new pactests to check if ldconfig runs Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-04-05Really run scriptlet on pre_remove and post_removeRoman Kyrylych
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-04Backport changes from 3.0.1Aaron Griffin
* Align makepkg -g checksums (Tom Killian <tom@archlinux.org>) * Use additional case-sensitive string compare to defeat locale issues (tr_TR) * Added Russian mirror * Fix a -R failure when trying to remove the same target twice * Bump configure.ac version to 3.0.1 Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-04-01Move the 100% progress bar call before remove scriptlet for output reasonsVMiklos
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-03-30Make all paths and file locations configurableDan McGee
Several important paths, file locations, and extensions were #define-d in the source code instead of being configurable. This moves all of these to the configure script where they can be picked upon running ./configure. We may later want to make some of these even more visible and move them to pacman.conf. Signed-off-by: Dan McGee <dan@archlinux.org>