summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAge
* redirect scriptlet stderr synchronously through alpmJonathan Conder2010-08-27
| | | | | | | | | 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>
* Merge branch 'maint'Dan McGee2010-08-23
|\
| * Add Slovak translationJozef Riha2010-08-23
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Updates for Polish translationsMateusz Herych2010-08-18
| | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Fix some whitespace issuesAllan McRae2010-08-23
| | | | | | | | | | | | | | | | 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>
* | fgets invocation cleanupDan McGee2010-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Enable libfetch connection cachingDan McGee2010-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'maint'Dan McGee2010-07-27
|\|
| * Small fix to Kazakh translationBaurzhan Muftakhidinov2010-07-27
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Mark sync_pkg and sync_target as static functionsDan McGee2010-07-27
| | | | | | | | | | | | | | 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>
| * Maintain a list of seen packages when installing a groupDan McGee2010-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Download sync db into DBPath/syncAllan McRae2010-07-07
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Remove DBEXT usageAllan McRae2010-07-07
| | | | | | | | | | | | | | | | | | 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>
* | Check return value of fgets callsAllan McRae2010-07-07
| | | | | | | | | | | | | | Prevents compiler warnings with -D_FORTIFY_SOURCE=2 Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Check return value of chdir and getcwdAllan McRae2010-07-01
| | | | | | | | | | | | | | 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>
* | Check return value of fwrite when copying filesAllan McRae2010-06-30
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Do not compare signed and unsigned typesAllan McRae2010-06-30
| | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'maint'Dan McGee2010-06-20
|\|
| * Handle sync target + ignore properlyDan McGee2010-06-20
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Clarify testing within conditional statementsAllan McRae2010-06-21
| | | | | | | | | | | | | | | | | | 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>
* | libalpm: compare pkgname with strcollAndres P2010-06-21
|/ | | | | | | | | 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>
* Update Romanian translationIonuț Bîru2010-06-14
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Revise Portuguese (Brazil) translationLeandro Inácio2010-06-14
| | | | | | | 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>
* Updating Catalan translationManuel Tortosa2010-06-14
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Update Spanish translationJuan Pablo González T2010-06-14
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Update Ukrainian translationRoman Kyrylych2010-06-14
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Update Portuguese (Brazil) translationLeandro Inácio2010-06-11
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* translations: rename Norwegian translation from nb_NO to nbDan McGee2010-06-11
| | | | | | | | | | | 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>
* translations: rename Swedish translation from sv_SE to svDan McGee2010-06-11
| | | | | | | | | | | 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>
* Revise Greek translationChristos Nouskas2010-06-09
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Update English (British) translationDan McGee2010-06-07
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Update German translationMatthias Gorissen2010-06-07
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Update Russian translationSergey Tereschenko2010-06-07
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Add note about XySSL/PolarSSL name changeDan McGee2010-06-07
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Update Kazakh translationBaurzhan Muftakhidinov2010-06-07
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Update French translationXavier Chantry2010-06-06
| | | | | | | | 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>
* Update Greek translationChristos Nouskas2010-06-06
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Update Czech translationVojtěch Gondžala2010-06-05
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Update Hungarian translationNagy Gabor2010-06-05
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Update Italian translationGiovanni Scafora2010-06-05
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Update Chinese translation甘露(Gan Lu)2010-06-05
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Update Turkish translationSamed Beyribey2010-06-04
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* translation: update pot/po files for libalpm in prep for releaseDan McGee2010-06-04
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* fix memory leak in _alpm_sync_commitJonathan Conder2010-05-18
| | | | | Signed-off-by: Jonathan Conder <j@skurvy.no-ip.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Partial fix for the phonon/qt issueNagy Gabor2010-05-18
| | | | | | | | | | | | | | | | | This patch fixes the phonon/qt issue, if all to-be-upgraded packages are explicit targets (ie. only not-yet-installed packages are pulled by resolvedeps). This condition covers the most common situations, for example it should hold with every -Su operation. After this patch sync405.py passes, but sync406.py doesn't. The work is inspired by the patch of Henning Garus, thanks for his work: http://mailman.archlinux.org/pipermail/pacman-dev/2010-February/010429.html (I moved the alpm_list_diff computation to sync.c in order to compute it only once.) Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix a serious bug in the download codeNagy Gabor2010-05-14
| | | | | | | | | | | | After commit df99495b82 pacman downloaded files from the first repo only, and reported corrupted packages for all files from other repos. The download_size was set to 0 for _all_ transaction packages after downloading some files from the first repo. This code-block was moved to its correct place. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Compute package download size outside _alpm_sync_prepareJonathan Conder2010-05-05
| | | | | | | And add a new info level for this piece of data. Signed-off-by: Jonathan Conder <j@skurvy.no-ip.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Introduce -D, --databaseNagy Gabor2010-05-05
| | | | | | | | | | | | | The request of FS#12950 is implemented. On the backend side, I introduced a new function, alpm_db_set_pkgreason(), to modify the install reason of a package in the local database. On the front-end side, I introduced a new main operation, -D/--database, which has two options, --asdeps and --asexplicit. I documented this in pacman manual. I've created two pactests to test -D: database001.py and database002.py. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove call to function loggerDan McGee2010-05-04
| | | | | | | It isn't really necessary here and it helps us get rid of some link pollution so we can have a slim vercmp binary. Signed-off-by: Dan McGee <dan@archlinux.org>
* Move vercmp code into a separate fileDan McGee2010-05-04
| | | | | | | | This will facilitate using this object file on its own in the vercmp tool which will be done in a future commit. The net impact on the generated binaries should not be noticeable after this commit. Signed-off-by: Dan McGee <dan@archlinux.org>