summaryrefslogtreecommitdiff
path: root/lib/libalpm
AgeCommit message (Collapse)Author
2008-03-09Remove a bogus comment from libalpm/remove.cNagy Gabor
We do the opposite. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
2008-03-06New alpm_version functionNagy Gabor
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)
2008-03-04Update Czech translationVojtěch Gondžala
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-04Remove a bogus commentNagy Gabor
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>
2008-03-03Kill all of the line numbers from the translationsDan McGee
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>
2008-03-03Disable the line number in .po files.Chantry Xavier
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>
2008-03-03Convert Hungarian translation translation to UTF-8Dan McGee
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>
2008-03-01New alpm_version functionNagy Gabor
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>
2008-03-01Merge branch 'maint'Dan McGee
2008-03-01Set a missing pm_errno in _alpm_pkg_load()Nagy Gabor
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-27libalpm: clean up of md5sum functions.Chantry Xavier
test_delta_md5sum and test_pkg_md5sum were simple wrappers to test_md5sum, and only used once, so not very useful. I removed them. Also, test_md5sum and alpm_pkg_checkmd5sum functions were a bit duplicated, so I refactored them with a new _alpm_test_md5sum function in libalpm/util.c Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-27Start removing some junk from the function templateDan McGee
I screwed up originally when I accepted the TotalDownload patch, 8ec27835f40e3df1ce409bc3d913587c474a30c3. I didn't realize how deeply it modified libalpm and I probably shouldn't have let it do what it did. This commit reverts much of what that patch added in order to clean up our internal function calls. We can find another way to do it right down the road here but for now it has to go. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-27libalpm/dload.c : memleak fixes.Chantry Xavier
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-27clean up dltotal leftover from 81a2a06818d367f852.Chantry Xavier
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-25Merge branch 'maint'Dan McGee
Also bump the devel version on the master branch to 3.2.0devel.
2008-02-25Update simplified chinese (zh_CN) translation.甘露(Lu.Gan)
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-25fix two broken translated strings.Chantry Xavier
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>
2008-02-25xgettext : change pass-c-format flag to c-format.Chantry Xavier
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>
2008-02-24Remove pmserver_t abstractionDan McGee
Remove what was a pretty weird abstraction in the libalpm backend. Instead of parsing server URLs as we get them (of which we don't usually use more than a handful anyway), wait until they are actually used, which allows us to store them as a simple string list instead. This allows us to remove a lot of code, and will greatly simplify the continuing refactoring of the download code. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-24Add new stub download functions for use throughout the codeDan McGee
Add new stub functions that work by calling the existing (terrible) download forreal function, which needs a serious overhaul. Hide the existing functions and switch all former users to the new functions. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-24Move download code out of server.cDan McGee
This is the first in what will be a series of patches to clean up the current download code in libalpm. Start by moving download code out of server.c and into download.c. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-24More cleanup to alpm_listDan McGee
* Remove some #include statements that are not strictly necessary * Remove node_new function that is really just a one-liner Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-25alpm_list.c clean-upNagy Gabor
* Introduces 'list == NULL' convention for empty list. That means alpm_list_new isn't needed anymore, so kill it * Small straightforward fixes in alpm_list.c Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-25libalpm/sync.c : fix poorly worded debug message.Chantry Xavier
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-24Merge branch 'maint'Dan McGee
Conflicts: src/pacman/callback.c
2008-02-24Update Russian translationSergey Tereschenko
Some corrections from the previous translation. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-22Add new Simplified Chinese translation甘露(Lu.Gan)
Thanks a lot! Now we get to fix the breakage this causes in output messages. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-20Merge branch 'maint'Dan McGee
Remove gettext() function addition from gensync and updatesync in master as gettext is no longer used in them anyway.
2008-02-19Final updates to Polish translationMateusz Herych
Good job on the group effort guys, thanks for getting this one complete. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-18Update libalpm russian translation.Sergey Tereschenko
Cleaned up by Oleg Finkelshteyn. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-18Do not warn about up to date package when downloading onlyAllan McRae
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>
2008-02-16Move pmgraph_t struct and functions to their own header fileDan McGee
This will allow us to utilize this helpful type and functions in places besides dependency calculations. In addition, remove the public declaration of pmgraph_t in alpm.h- there is zero need to expose this internal type. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-15Merge branch 'maint'Dan McGee
Conflicts: lib/libalpm/be_files.c lib/libalpm/package.c
2008-02-15More small updates to German translationMatthias Gorissen
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-14Merge branch 'translations' into maintDan McGee
2008-02-13Ensure DESC infolevel is loaded before checking pkg->filenameDan McGee
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>
2008-02-12Updated Czech translation for 3.1.2 releaseVojtěch Gondžala
Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
2008-02-12Update french translation.Chantry Xavier
Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
2008-02-11Move some translations to their generic language codeDan McGee
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>
2008-02-11ensure chk_fileconflicts reads entire file listDan McGee
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>
2008-02-07Merge branch 'maint'Dan McGee
2008-02-07Remove alpm_sync_get_newversion functionNagy Gabor
sync->newversion shouldn't be public at all, and internally we access it directly. (Before pmsyncpkg_t clean-up the analogue of this field [type] was needed in replaces computation.) Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-07alpm_sync_sysupgrade splitNagy Gabor
This patch indroduces a new public alpm_sync_newversion, which scans for new version of a package in sync repos. Hopefully this will reduce code duplication in the future: * check-for-pacman-new-version from front-end can be easier * -Qu refactoring Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-07libalpm/add.c : safety check for fixing FS#9235.Chantry Xavier
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>
2008-02-06libalpm/package.c : add _alpm_pkgname_pkg_cmp function.Nagy Gabor
_alpm_pkgname_pkg_cmp(pkgname, pkg) returns true iff pkg's name is pkgname. This is useful if you want to remove a package from pmpkg_t* list, and you want to search for package name. This allows cleaning the -Ru code a bit, by removing the need of a dummy pkg. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-06New remove option : -u / --unneeded (FS#6505).Nagy Gabor
With --unneeded option 'pacman -R' doesn't stop in case of dependency error; it removes the needed-dependency targets from the target-list instead. See also: http://archlinux.org/pipermail/pacman-dev/2007-October/009653.html . The patch also adds a new causingpkg field to pmdepmissing_t which indicates the to-be-removed package which would cause a dependency break. This is needed, because miss->depend.name may be a provision. miss->causingpkg will be useful in -R dependency error messages too. [Xavier: renamed inducer to causingpkg, removed the _alpm_pkgname_pkg_cmp helper function as requested by Aaron. This might be added by a further commit. Other small cleanups, updated manpage and bash completion.] Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-01-27pmsyncpkg_t cleanupNagy Gabor
Fix for sync044.py and reason001.py. Rename sync->data to sync->removes (alpm_list_t *) Replace pmsynctype_t sync->type by pmpkgreason_t sync->newreason The type field was set to UPGRADE or DEPEND or REPLACE. Instead of using type = UPGRADE or DEPEND, we now rather use a "pmpkgreason_t newreason" field directly (= explicit or depend) which allows a better handling of the install reason. And the REPLACE type is now deduced implicitly when the sync->removes list is not empty. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-27Fix PM_ERR_CONFLICTING_DEPS handling in sync.cNagy Gabor
* eliminate asymmetry (innerconflict vs. outerconflict) * fix a memleak (in case of PM_ERR_MEMORY deps wasn't freed) * fix wrong pmconflict_t duplication (*retconflict = *conflict) Note: the new code introduces some code duplication which shall disappear by fixing FS#7524. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-27New _alpm_conflict_dup functionNagy Gabor
Added function to cleanly duplicate a conflict. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-01-27small sync.c code clean-upNagy Gabor
Remove unnecessary synclist_free function, and use our standard way (alpm_list_free_inner + alpm_list_free) instead. This slightly reduces code duplication. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>