summaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2010-09-06Fix libfetch configure checkingDan McGee3-8/+8
I don't know what I tested in commit 3e7b90ff6950, but it definitely wasn't working as advertised. Fix the checks in the source code itself to match the right define (HAVE_LIBFETCH), as well as make sure the configure check defaults to looking for the library but not bailing if it could not be found. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-04Merge branch 'maint'Dan McGee1-12/+12
2010-09-04libalpm Swedish translation updatev3.4.1Tobias Eriksson1-12/+12
Signed-off by: Tobias Eriksson <tobier@tobier.se> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-02Clean up libfetch checking in configureDan McGee3-8/+8
Model it after the new OpenSSL check, and have it be a bit more useful. If you do not explicitly pass a command line option, it will be linked if available but will not error out if it is missing. Also bump the version to that where connection caching was introduced as we use these new features in the codebase. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-02Use OpenSSL MD5 crypto functions if availableDan McGee2-2/+48
I've noticed my Atom-powered laptop is dog-slow when doing integrity checks on packages, and it turns out our MD5 implementation isn't near as good as that provided by OpenSSL. Using their routines instead provided anywhere from a 1.4x up to a 1.8x performance benefit over our built-in MD5 function. This does not remove the MD5 code from our codebase, but it does enable linking against OpenSSL to get their much faster implementation if it is available on whatever platform you are using. At configure-time, we will default to using it if it is available, but this can be easily changed by using the `--with-openssl` or `--without-openssl` arguments to configure. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-02libalpm md5: use larger and dynamic bufferDan McGee1-2/+11
This gave at least a 10% improvement on a few tested platforms due to the reduced number of read calls from files when computing the md5sum. It really is just a precursor to another patch to come which is to use MD5 functions that do the job a lot better than anything we can do. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-02Merge branch 'maint'Dan McGee2-0/+618
2010-09-02Add new European Portuguese translationGaspar Santos2-0/+618
This is being checked in as 'pt' rather than 'pt_PT' as that is what Transifex seems to want, and it is also the dominant choice of packages already installed on my system when doing a count of the files located in the /usr/share/locale translation directories. Thanks for the new translation! Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-27use execv to avoid using sh just to run ldconfigJonathan Conder3-7/+11
Signed-off-by: Jonathan Conder <j@skurvy.no-ip.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-27redirect scriptlet stderr synchronously through alpmJonathan Conder1-36/+55
Fixes FS#18770, and hopefully an occasional deadlock in my frontend as well. For simplicity it redirects all scriptlet output through SCRIPTLET_INFO, and all callbacks in the child process have been replaced for thread-safety. Signed-off-by: Jonathan Conder <j@skurvy.no-ip.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-24Merge branch 'maint'Dan McGee3-88/+530
2010-08-24Fix some whitespace issuesAllan McRae3-5/+5
The combination of tabs and spaces is annoying in any editor that does not use a tab width of 2 spaces. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-24fgets invocation cleanupDan McGee2-32/+32
From the fgets manpage: fgets() reads in at most one less than size characters from stream and stores them into the buffer pointed to by s. Reading stops after an EOF or a newline. If a newline is read, it is stored into the buffer. A '\0' is stored after the last character in the buffer. This means there is no need at all to do 'size - 1' math. Remove all of that and just use sizeof() for simplicity on the buffer we plan on reading into. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-24Add Slovak translationJozef Riha2-0/+519
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-24Enable libfetch connection cachingDan McGee1-0/+13
This will allow downloads to reuse connections if possible, which could make big differences on perceived FTP speed as the connection won't have to be reestablished each time. For the most part, HTTP requests wouldn't be using keep alive anyway so this won't have an effect there. I'm not enthused about having to do this with the library initialization, but there isn't a much better place due to the fact that the loop over databases occurs on the frontend and not the backend. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-18Updates for Polish translationsMateusz Herych1-88/+11
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-27Merge branch 'maint'Dan McGee2-8/+12
2010-07-27Small fix to Kazakh translationBaurzhan Muftakhidinov1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-27Mark sync_pkg and sync_target as static functionsDan McGee1-6/+6
We no longer use these anywhere outside of sync.c, so do the rename and add static to their definition to meet our coding standards. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-27Maintain a list of seen packages when installing a groupDan McGee1-4/+8
As reported in FS#20221, we don't always do the right thing when installing a group and using the --needed option. This was due to the code pulling packages based on what was already in the transaction's add list, but completely ignoring the fact that we may have already seen and skipped this same package in an earlier repository. Add a list to the private _alpm_sync_pkg() function that allows us to have this extra information so we don't mistakenly downgrade a package when using --needed. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-07Download sync db into DBPath/syncAllan McRae1-4/+8
The sync db should be stored in the sync/ folder. This cleans up DBPath to only have local/ and sync/ directories in it. A nice side effect is that the db are now in the right place so we can implement directly reading from them. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-07Remove DBEXT usageAllan McRae1-4/+4
With commit 5dffef78, the repo database always has a symlink of the form reponame.db. Use that filename and let libarchive determine the compression type. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-07Check return value of fgets callsAllan McRae2-4/+7
Prevents compiler warnings with -D_FORTIFY_SOURCE=2 Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-01Check return value of chdir and getcwdAllan McRae2-9/+15
Prevents compiler warnings when building with -D_FORTIFY_SOURCE=2 Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-01Check return value of fwrite when copying filesAllan McRae2-1/+10
Check that writing to destination file actually occurs in _alpm_copyfile. Required adding a new error (PM_ERR_WRITE) as none of the others appeared appropriate. Prevents compiler warning when using -D_FORTIFY_SOURCE=2. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-30Do not compare signed and unsigned typesAllan McRae1-1/+1
The casting of nread is safe as it is tested to be >0 when it is initally assigned. It is also being implicitly cast in the fwrite call in the line above. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-21Merge branch 'maint'Dan McGee1-1/+5
2010-06-20Handle sync target + ignore properlyDan McGee1-1/+5
Rather than say we can't find the target after saying "No, I guess I don't want to install this", we should make sure the ignored status gets passed all the way through. This fixes FS#19866. Pactest is also included that failed before due to the fact that we normally treat an unfound package as a reason to exit with a non-zero status. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-20Clarify testing within conditional statementsAllan McRae5-23/+23
Follow the HACKING guidelines and always use != 0 or == 0 rather than negation within conditional statements to improve clarity. Most of these are !strcmp usages which is the example of what not to do in the HACKING document. Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-20libalpm: compare pkgname with strcollAndres P1-1/+1
Use strcoll to compare package names to provide output sorted according to a users LC_COLLATE settings. Signed-off-by: Andres P <aepd87@gmail.com> [Allan: added commit message] Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-14Update Romanian translationIonuț Bîru1-10/+10
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-14Revise Portuguese (Brazil) translationLeandro Inácio1-1/+0
Fix the '\t' characters that got introduced by the last update of this translation that should not have been there. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-14Updating Catalan translationManuel Tortosa1-12/+12
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-14Update Spanish translationJuan Pablo González T1-12/+13
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-14Update Ukrainian translationRoman Kyrylych1-15/+14
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-12Update Portuguese (Brazil) translationLeandro Inácio1-26/+26
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-11translations: rename Norwegian translation from nb_NO to nbDan McGee2-1/+1
This puts us more in line with other projects that don't attach the country code to the language code. $ du -sh /usr/share/locale/nb*/LC_MESSAGES 3.5M /usr/share/locale/nb/LC_MESSAGES 132K /usr/share/locale/nb_NO/LC_MESSAGES Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-11translations: rename Swedish translation from sv_SE to svDan McGee2-3/+3
This puts us more in line with other projects that don't attach the country code to the language code. $ du -sh /usr/share/locale/sv*/LC_MESSAGES 7.2M /usr/share/locale/sv/LC_MESSAGES 60K /usr/share/locale/sv_SE/LC_MESSAGES Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-09Revise Greek translationChristos Nouskas1-12/+13
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-08Update English (British) translationDan McGee1-95/+10
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-07Update German translationMatthias Gorissen1-52/+11
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-07Update Russian translationSergey Tereschenko1-11/+11
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-07Add note about XySSL/PolarSSL name changeDan McGee1-0/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-07Update Kazakh translationBaurzhan Muftakhidinov1-11/+11
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-06Update French translationXavier Chantry1-53/+12
Thanks to CalimeroTeknik <calimeroteknik@free.fr> for providing many corrections ! Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-06Update Greek translationChristos Nouskas1-48/+49
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-05Update Czech translationVojtěch Gondžala1-13/+12
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-05Update Hungarian translationNagy Gabor1-50/+11
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-05Update Italian translationGiovanni Scafora1-57/+13
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-05Update Chinese translation甘露(Gan Lu)1-12/+12
Signed-off-by: Dan McGee <dan@archlinux.org>