summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAge
* More non-Linux build updates, mostly DarwinDan McGee2008-04-15
| | | | | | | | | | | | | | Darwin's binary format does support symbols with differing visibilities, but it does not support the protected or internal visibilities- only hidden. For Darwin only, we should fall back to this visibility to prevent warnings from the compiler and because it is close enough for our library purposes. See http://gcc.gnu.org/viewcvs/*checkout*/trunk/gcc/config/darwin.c, search for the "darwin_assemble_visibility" function for more details. Also add pacman.static.exe to gitignore. Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix gettext on non-Linux platformsDan McGee2008-04-14
| | | | | | | | | Linux includes all the gettext stuff in glibc, so there is no need for the libintl links which we failed to include in our linker variables. Update the makefiles which should enable NLS support on all platforms, including OS X and Cygwin. Signed-off-by: Dan McGee <dan@archlinux.org>
* Correctly use the fd returned my mkstemp()Dan McGee2008-04-08
| | | | | | | | | | | | | There were a few issues with this code: 1. We already had an open fd to a file, but never used it to our benefit. Use the libarchive convienence method to write the current file contents straight to a file descriptor. 2. The real problem cropped up on Windows where the locking semantics caused the old way of extraction to fail because we had an open file descriptor. By using the file descriptor and closing it ASAP, we prevent these failures. Signed-off-by: Dan McGee <dan@archlinux.org>
* Set handle->logstream to null after fclose()Dan McGee2008-04-01
| | | | | | | | We correctly closed the logfile stream when recalling set_logfile, but did not NULL out the dead pointer once we did this. Fix the problem which was the cause of FS#10056. Signed-off-by: Dan McGee <dan@archlinux.org>
* Duplicate the result of archive_entry_pathname.Chantry Xavier2008-03-28
| | | | | | | | | | | | | | | | | | | After the libarchive upgrade from 2.4.12 to 2.4.14, our usage of archive_entry_pathname became dangerous. We were using the result of that function even after calls to archive_entry_set_pathname. With 2.4.14, the entryname becomes wrong after these calls, and so all the future use of entryname are bogus. entryname is used quite a lot for logging, so that's not so bad. But it's also used for the backup handling, so that's not very cool. For example, reinstalling a package with backup entries will erase all the md5 entries from the DB, because they won't be found back. entryname is now a static string so that we can easily keep the result of archive_entry_pathname. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> [Dan: fixed version numbers in commit message] Signed-off-by: Dan McGee <dan@archlinux.org>
* Use pkgcache instead of db_scan in remove.cNagy Gabor2008-03-28
| | | | | | | This should be a notable speed-up (apart from kernel cache). Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* memleak fix: ensure backup fname isn't lost if unusedDan McGee2008-03-23
| | | | | | | The _alpm_backup_split function always alloced memory for the fname, and we let it disappear in a specific case (upgrade026.py). Fix the issue. Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove a bogus comment from libalpm/remove.cNagy Gabor2008-03-09
| | | | | | We do the opposite. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
* New alpm_version functionNagy Gabor2008-03-06
| | | | | | | | | | Now pacman frontend uses this function instead of the compile-time libalpm version number. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> [Dan: fix one more spot where LIB_VERSION was used] Signed-off-by: Dan McGee <dan@archlinux.org> (cherry picked from commit 49197b7492d61bf1fc6bef59a708f4f586f32edb)
* Update Czech translationVojtěch Gondžala2008-03-04
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove a bogus commentNagy Gabor2008-03-04
| | | | | | | This comment was created for the old provision version format and needless. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Kill all of the line numbers from the translationsDan McGee2008-03-03
| | | | | | | Hopefully the last of the huge commits ever. This also adds the c-format tag to all of the translated messages. Signed-off-by: Dan McGee <dan@archlinux.org>
* Disable the line number in .po files.Chantry Xavier2008-03-03
| | | | | | | | | | Add the --no-location xgettext option to disable the line numbers. They are not very useful, and generate a huge number of pointless line changes on every update. Ref: http://www.archlinux.org/pipermail/pacman-dev/2008-March/011332.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
* Convert Hungarian translation translation to UTF-8Dan McGee2008-03-03
| | | | | | | | | | | | | | The issue was discussed in this thread on the mailing list: http://archlinux.org/pipermail/pacman-dev/2008-March/011324.html In addition, the GNU gettext manual states that translation encoding is completely separate from the encoding used by the users of the translation. It makes sense for our project to use UTF-8 for all translations, regardless of the preferred encoding used by users of a certain language. This allows all contributors to more easily edit a translation file if necessary and not have to worry about codepage issues. Signed-off-by: Dan McGee <dan@archlinux.org>
* Set a missing pm_errno in _alpm_pkg_load()Nagy Gabor2008-03-01
| | | | | Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Update simplified chinese (zh_CN) translation.甘露(Lu.Gan)2008-02-25
| | | | Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
* fix two broken translated strings.Chantry Xavier2008-02-25
| | | | | | | Using c-format on every strings allowed me two found two broken ones. One was harmless, but the other caused a segfault, as reported in FS#9658. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
* xgettext : change pass-c-format flag to c-format.Chantry Xavier2008-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently xgettext apparently attempts to autodetect c format strings (eg a string with a %s) to decide whether to use c-format flag or not. If we use --flag=_:1:c-format instead of --flag=_:1:pass-c-format, the c-format will be applied everywhere. I couldn't find this documented anywhere though. But the pass prefix is mentioned here : http://www.gnu.org/software/gettext/manual/html_node/xgettext-Invocation.html#xgettext-Invocation "Specifies additional flags for strings occurring as part of the argth argument of the function word. The possible flags are the possible format string indicators, such as ‘c-format’, and their negations, such as ‘no-c-format’, possibly prefixed with ‘pass-’." And c-format is documented there : http://www.gnu.org/software/gettext/manual/html_node/c_002dformat-Flag.html#c_002dformat-Flag "This situation happens quite often. The printf function is often called with strings which do not contain a format specifier. Of course one would normally use fputs but it does happen. In this case xgettext does not recognize this as a format string but what happens if the translation introduces a valid format specifier? The printf function will try to access one of the parameters but none exists because the original code does not pass any parameters." And that's exactly what happened with FS#9658. So using c-format for every string will prevent this issue from happening again. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
* libalpm/sync.c : fix poorly worded debug message.Chantry Xavier2008-02-25
| | | | Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
* Update Russian translationSergey Tereschenko2008-02-24
| | | | | | Some corrections from the previous translation. Signed-off-by: Dan McGee <dan@archlinux.org>
* Add new Simplified Chinese translation甘露(Lu.Gan)2008-02-22
| | | | | | Thanks a lot! Now we get to fix the breakage this causes in output messages. Signed-off-by: Dan McGee <dan@archlinux.org>
* Final updates to Polish translationMateusz Herych2008-02-19
| | | | | | Good job on the group effort guys, thanks for getting this one complete. Signed-off-by: Dan McGee <dan@archlinux.org>
* Update libalpm russian translation.Sergey Tereschenko2008-02-18
| | | | | | Cleaned up by Oleg Finkelshteyn. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
* Do not warn about up to date package when downloading onlyAllan McRae2008-02-18
| | | | | | | | | Stops the "<pkg> is up to date -- reinstalling" message when using the download only flag. Ref: http://archlinux.org/pipermail/pacman-dev/2008-January/010952.html Signed-off-by: Allan McRae <mcrae_allan@hotmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* More small updates to German translationMatthias Gorissen2008-02-15
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'translations' into maintDan McGee2008-02-14
|\
| * Updated Czech translation for 3.1.2 releaseVojtěch Gondžala2008-02-12
| | | | | | | | Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
| * Update french translation.Chantry Xavier2008-02-12
| | | | | | | | | | Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
* | Ensure DESC infolevel is loaded before checking pkg->filenameDan McGee2008-02-13
| | | | | | | | | | | | | | | | | | | | | | This is the first step of fixing FS#9547. This should not break any existing code that may rely on this function behaving the way it did, and should be good for inclusion in a maint release. In addition, update pactest so it fills the FILENAME field in the DB entries it creates so we can move forward with a real fix to this issue. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Move some translations to their generic language codeDan McGee2008-02-11
| | | | | | | | | | | | | | | | | | | | | | | | For our Czech, Polish, and Russian translations, they do not need to be at the more specific 'lang_COUNTRY' code, but can live at just plain 'lang'. This follows the pattern of most other translated programs out there as Roman pointed out on IRC. ru_RU: 2 (pacman and libalpm) ru: 128 for him, 131 for me (everything else) Signed-off-by: Dan McGee <dan@archlinux.org>
* | ensure chk_fileconflicts reads entire file listDan McGee2008-02-11
|/ | | | | | | | | | | | If the end of the pB list was reached before the end of pA, we failed to read any remaining files from the pA list. Add an additional loop to ensure all entries of pA are added to the return list regardless of whether we have reached the end of pB. This new loop also eliminates the now-unnecessary check for a null pB, as we need to ensure we are excluding directories in the resulting output anyway. Signed-off-by: Dan McGee <dan@archlinux.org>
* libalpm/add.c : safety check for fixing FS#9235.Chantry Xavier2008-02-07
| | | | | | | | | | | | | | | Fixes FS#9235. We already had the following case in extract_single_file : /* cases 1,2,3: couldn't stat an existing file, skip all backup checks */ But we actually only did a lstat here. And if lstat worked, we did a stat without checking. When lstat works and stat fails, it means we have a broken symlink, like in FS#9235. We can actually treat this case like a non-existing file. The broken symlink will then be simply overwritten. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
* Portuguese Brazilian translation update for pacman 3.1.1João Felipe Santos2008-01-19
| | | | Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
* Corrections of German translationMatthias Gorissen2008-01-18
| | | | Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
* Spanish translation update for pacman 3.1.1Juan Pablo Gonzalez2008-01-16
| | | | Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
* Czech translation update for pacman 3.1.1Vojtěch Gondžala2008-01-16
| | | | Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
* English (British) translation update for pacman 3.1.1Jeff Bailes2008-01-16
| | | | Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
* Hungarian translation update for pacman 3.1.1Nagy Gabor2008-01-16
| | | | Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
* Update message files for 3.1.1 releaseDan McGee2008-01-14
| | | | | | | | | | | We are in string freeze for the 3.1.1 release. This commit updates all the message files to the latest code, and all translation updates should be based off of these po-files. Please attempt to keep the line number changes to a minimum- there should be no reason to update these po files with just new line numbers. That way we can more easily see exactly which translations were updated. Signed-off-by: Dan McGee <dan@archlinux.org>
* Change the versioned provision format.Chantry Xavier2008-01-14
| | | | | | | | | | | | | | | | | | | | | | Change the 'provname provver' format to 'provname=provver'. In .PKGINFO, the provisions are copied from the PKGBUILD without quotes. So the provision version was actually handled as a different provision... See FS#9171. Dan: Unfortunately we have to change our original specification for versioned provisions with this patch, but it ends up being the simpler and cleaner solution in the long run, and if there is any time to change it the time is now before many packages have been built. Keeping the ' ' based format would have required us to do special parsing in repo-add, as well as being susceptible to users not using quotes in their provides array. Hopefully this will resolve the issues we had with our initial plan. Sorry for the confusion. Acked-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* FS#9183 : force correct permissions on tmp/.Jaroslaw Swierczynski2008-01-13
| | | | | | | [Xav: removed unneeded makepath_internal function, and fixed the permission value : 1777 -> 01777] Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Ensure correct dir permissions in the database.Chantry Xavier2008-01-13
| | | | | | | | | | | | Fix for FS#9176. A previous commit (6e8daa553bbd5) already forced all database files to 644. Now the directories are also forced to 755. Additionally, repo-add now sets the umask to 022, just like makepkg does, to fix the problem at its root. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* util.c : fix segfault when the cachedir isn't usable.Chantry Xavier2008-01-13
| | | | | | | | | | | | For example, if the cachedir is a broken symlink or a non writable directory, pacman fallbacks to /tmp/. Just before doing that, it freed the handle->cachedirs list twice ! once in _alpm_filecache_setup, and once in alpm_option_set_cachedirs. So the first one was removed. Fixes FS#9186. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
* small checkdeps speed-upNagy Gabor2008-01-12
| | | | | | | | | | | | | In the old code 'alpm_list_diff(_alpm_db_get_pkgcache(db), dblist, _alpm_pkg_cmp);' was slow. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> [Xav: In my opinion, computing both dblist and modified in one for loop also makes the code clearer, besides being more efficient. Also renamed joined to targets since I also find that clearer.] Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
* don't send CHECKDEPS_DONE event when NODEPS is set.Chantry Xavier2008-01-12
| | | | | Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Only notify of dependency check in removal if performedAllan McRae2008-01-11
| | | | | | | | | Moves "checking dependencies..." notification into code block where dependency checking is performed to stop spurious notification. Reference: http://archlinux.org/pipermail/pacman-dev/2008-January/010714.html Signed-off-by: Allan McRae <mcrae_allan@hotmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix library interfaceDan McGee2008-01-11
| | | | | | | | | | | | Two functions defined in alpm.h were not marked with SYMEXPORT, causing linking errors if they were used. In addition, remove the incorrect use of the 'alpm_' prefix from an internal function and replace it with '_alpm_'. Fixes FS#9155. Signed-off-by: Dan McGee <dan@archlinux.org>
* Move the fallback on providers from backend to frontend.Chantry Xavier2008-01-09
| | | | | | | | | | | This reverts commit e28973169d2e5eda8b64ebdda11ece0dc761d978. This code might fit better in the frontend than in the backend finally. Ref: http://www.archlinux.org/pipermail/pacman-dev/2007-November/010150.html I also changed it for fixing FS#8763 : if there is exactly one provider, pacman will pull it and print a warning. if there are several providers, pacman will list them and fail. It's up to the user to pick one. Add sync501 pactest to reflect that.
* Remove upgradedelay and all code associated with itDan McGee2008-01-08
| | | | | | | | It wasn't even implemented correctly, and it really doesn't have a use if packagers just do their job correctly anyway for a distro. Let's not try to solve a problem with the wrong solution now. Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove unused date element from pmpkg_t structDan McGee2008-01-08
| | | | | | | We had an unused date element in the pmpkg_t struct (not builddate or installdate). Kill it off and fix the one function that was using it. Signed-off-by: Dan McGee <dan@archlinux.org>