Commit Graph

736 Commits

Author SHA1 Message Date
Chantry Xavier cb164c3130 conflict.c: start cleaning conflict check functions
The three chk_ functions overlap for packages both in targets and in the
database. This caused the same conflict to be found in both direction
(A conflicts with B, and B conflicts with A).

This patch avoids this duplication. which shouldn't be needed, but other
changes might be required for that to work correctly.

This also has the unexpected side effect to hide the failure of sync022
pactest, for FS #7415. That's maybe not a good thing though..

Note from Dan: sync022 does succeed, but a sync023 pactest added to check
regressions also seems to pass. This may be a valid fix to this 'problem'
sync022 was meant to find.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-11 00:48:03 -04:00
Dan McGee 39b6549655 Update translation files on libalpm side after gettext change
Because of this commit:
ea1fef69ad
we lost a lot of gettext-ized messages on the libalpm side. Remove them
in order to clean out these files a bit.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-11 00:31:27 -04:00
Dan McGee d12c4f4b29 Fix issue with <dbpath>/db.lck being truncated
snprintf takes a length including the '\0' character, this wasn't accounted
for originally. Fix it.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-10 14:31:39 -04:00
Dan McGee ea1fef69ad Remove gettext calls from all PM_LOG_DEBUG messages
There is no real reason to burden our translators with these messages, as
anyone helping to debug these will probably want them in English.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-10 14:24:58 -04:00
Andrew Fyfe 9a9928f1b8 Remove conflict message for no-existent files.
Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
2007-07-10 11:35:32 -04:00
Andrew Fyfe 5e68e9d451 Cleanup of pacman_deptest()
Clean up some left over code from
http://projects.archlinux.org/git/gitweb.cgi?p=pacman.git;a=commitdiff;h=7653bb93997f52848b54ab80868cd6da52808a75

Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-10 10:15:24 -04:00
Chantry Xavier 57d77eab32 libalpm/trans.c : exit the forked process correctly in case of errors.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-09 17:47:05 -04:00
Dan McGee 1480ac29e4 Clean up the alpm handle
Add some comments in handle.h, and remove the pmaccess_t part that we
don't even use.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-09 15:23:26 -04:00
Dan McGee 4906e15d0d Remove gettext from any alpm_logaction calls
We shouldn't translate log messages to pacman.log so it is consistant and
can be parsed by other tools. Remove all gettext _() around these strings.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-09 13:44:48 -04:00
Dan McGee a2186a43a8 Add top level hidden file code to package.c
This was already taken care of in add.c by commit
2ae0438660, but was missed in package.c.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-08 23:46:48 -04:00
Dan McGee 49f447d02c First step of moving translations from src/pacman/po to po/
Move the translations from src/pacman/po to just po/ so we can include the
scripts gettext translations in the same message catalog as that of the
pacman frontend. The libalpm message catalog, for now, will remain a separate
existence.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-06 17:59:08 -04:00
Dan McGee 15e1ce2e70 Various small fixes as suggested by some static code checkers
I ran flawfinder and sparse over the pacman source code and found a few
things that were worth fixing (and were quick fixes).

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-06 12:11:55 -04:00
Chantry Xavier 7a42e24400 libalpm/add.c : fix for FS #7484
Adds the ARCHIVE_EXTRACT_NO_OVERWRITE libarchive flags
for extracting files and directories.
This will prevent symlinks for being overwritten by directories.
All other files that need to be extracted should already have
been deleted previously by pacman.
This flag is not used for extracting files in backup array
to /tmp/alpm_XXXX, because this file is created by mkstemp first,
and so needs to be overwritten by the file from the archive.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-01 22:31:40 -04:00
Chantry Xavier f55f7f100f libalpm/add.c,util.c : log ARCHIVE_WARN warning to debug output.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-01 22:31:40 -04:00
Dan McGee cd3a636813 Remove unnecessary and extra includes
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-01 20:22:42 -04:00
Dan McGee d70116bfbc Move Doxygen manpage generation to doc/ directory
Instead of doing the doxygen work in the libalpm/ dir, do it with the rest
of the docs in the doc/ dir.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-01 18:40:43 -04:00
Chantry Xavier 2657a2bfb7 libalpm/add.c : ignore libarchive warning.
With libarchive 2.2.3 (previously 1.3.1), archive_read_extract now returns ARCHIVE_WARN
when a package is extracted as user, because for example, UID=0 or SUID bit can't be set.
This patch makes pacman not treating these warnings as errors anymore,
but simply ignoring them.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-06-28 19:29:38 +02:00
Chantry Xavier 1a3b3bc130 libalpm/util.c : stat returns 0 on success
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-06-28 17:14:26 +02:00
Dan McGee 7daa6708d2 Remove lockfile configuration from frontend, make it job of libalpm
I previously introduced some patches to make just about every path in
pacman/libalpm configurable; doing this with the lockfile seemed a bit too
far and we really should just place the lockfile where it belongs- with the
DB that needs locking.

More details in this thread:
http://archlinux.org/pipermail/pacman-dev/2007-June/008499.html

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-27 23:34:38 -04:00
Dan McGee ad691001e2 Remove scriptlet START and DONE commands that we don't use
The scriptlet calling had some unneeded complexity for the time being
which we aren't using here. Let's get rid of it until we find a good way
to implement it correctly.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-27 22:12:59 -04:00
Dan McGee 5a3b595837 Fix wrong permissions on pacnew extraction
First reported here:
http://bbs.archlinux.org/viewtopic.php?pid=261861

Newly created files were done with the standard umask, so those that are
extracted seperately and copied to a .pacnew extension will have the wrong
permissions. This should hopefully fix this.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-27 20:32:37 -04:00
Chantry Xavier 3a27fbaae4 libalpm/remove.c : file variable used before being initialized.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-06-28 01:41:15 +02:00
Nagy Gabor 7653bb9399 Make alpm_splitdep immutable
The alpm_splitdep function formerly overwrote the input string, causing
a few issues. Fix this.

Signed-off-by: Nagy Gabor <ngaba@petra.hos.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-26 11:49:00 -04:00
Nagy Gabor da66bedf4f Remove unnecessary trans parameter from _alpm_checkdeps
The trans parameter was never used, so remove it.

Signed-off-by: Nagy Gabor <ngaba@petra.hos.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-26 11:43:02 -04:00
Dan McGee 2ae0438660 Don't extract any top-level files in a package that start with '.'
For future possibilities, don't extract any files that start with '.'.
This will allow us to add features such as the ChangeLog viewing without
having to wait to include these files in packages, because older versions
of pacman will be forward compatable with 'hidden' files at the root level
of the package.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-26 11:42:41 -04:00
Dan McGee 0de5c97193 libalpm/util.c: remove unnecessary include
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-20 17:54:42 -04:00
Dan McGee f372a542b9 Revert "Fix libarchive permission extraction"
This was a bad way to fix a problem upstream. Doing this resulted in
symlink permissions being applied to files installed on the system, leaving
some binaries with 77 permission, etc.

This reverts commit 4e6b7c1cde.
2007-06-20 17:38:56 -04:00
Dan McGee cacf968970 Update Doxyfile and add a few missing parts of documentation
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-17 13:20:17 -04:00
Dan McGee 5e774d72b0 Remove some more diskspace checking holdover stuff
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-13 00:31:01 -04:00
Dan McGee dde7b6f87a Attempt to clean up _alpm_sync_prepare
This function is an absolute disaster, so we'll take it one step at a time
here. This was a quick once-over of the whole thing, trying to straighten
out some of the spaghetti code and fix some mistakes that others found.

We are now down to two failing pactests again: sync300 and upgrade051.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-10 23:17:19 -04:00
Nagy Gabor 544bcbe664 Implement simple topological sort algorithm for sortbydeps
Based on the "depth first search" algorithm, for more infos visit:
http://en.wikipedia.org/wiki/Topological_sorting

The previous algorithm used by sortbydeps was too slow, and to work around
it the number of steps needed to get correct result was reduced greatly.
So it produced wrong results in several cases :
1) smoke001.py
2) http://bugs.archlinux.org/task/7229

More here: http://archlinux.org/pipermail/pacman-dev/2007-April/008057.html

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-10 22:13:58 -04:00
Chantry Xavier 8588b4823b Ensure correct and consistent usage of depmiss
See comment from Nagy here :
http://www.archlinux.org/pipermail/pacman-dev/2007-April/008134.html
This also makes easier correct usage of checkdeps in sync.c,
which fixes sync901 pactest (and so bug 6057).

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-10 21:41:06 -04:00
Chantry Xavier 796cc4e6ed Fix for removing a package that is no longer needed
Fix for remove041 pactest. You could not remove a package before that
was provided by something else already installed on the system. This fixes
this problem.

Reference:
http://archlinux.org/pipermail/pacman-dev/2007-April/008131.html
http://archlinux.org/pipermail/pacman-dev/2007-April/008134.html

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-10 21:25:01 -04:00
Nagy Gabor 0436601224 Small speed-tuning to upgrade-checkdep
Posted on the ML here:
http://archlinux.org/pipermail/pacman-dev/2007-April/008131.html

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-10 17:31:18 -04:00
Nagy Gabor 97ba9c9227 Fix issue when upgrading two packages that would break deps
Fixes for pactest upgrade060. Posted on the ML here:
http://archlinux.org/pipermail/pacman-dev/2007-April/008130.html

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-10 17:25:20 -04:00
Nagy Gabor 970f15d832 Fix breakage in checkdeps when upgrading a multiple-depend
Fixes pactest upgrade059. Posted on the ML in the following messages:
http://archlinux.org/pipermail/pacman-dev/2007-April/008127.html
http://archlinux.org/pipermail/pacman-dev/2007-April/008129.html

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-10 17:20:12 -04:00
Dan McGee cadd28072a be_files.c: Fix compilation bug since I removed unnecessary LOG_STR_LEN
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-09 13:37:47 -04:00
Dan McGee 35a794c2ed Allow multiple CacheDirs to be specified
This should hopefully allow multiple cache dirs to be specified in
pacman.conf and/or on the command line, and allow pacman to test
each one for the package file. The first one found to be writeable is
used as the download cache.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-09 13:03:25 -04:00
VMiklos dfc85cb5f5 Add a alpm_db_test() function to the backend for checking DB consistency
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-09 12:58:12 -04:00
Dan McGee 25c5b39d05 Fix up things after the last few changes
* Readd default logmask of ERROR and WARNING
* Remove DOWNLOAD log level as it no longer applies
* Add 'no targets' logic back in where it applies
* Switch some prints in parseconfig to ERROR

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-09 12:57:50 -04:00
Dan McGee a32ca90192 Remove logmask stuff from backend; switch logging callback to new pm_printf
Remove the logmask functionality from the backend as it has been moved to
the frontend, and change the logging callback function to use pm_printf.

In addition, make much better use of va_list- use the args list instead
of a arbitrarily chosen string to print to in the logging functions.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-09 12:57:50 -04:00
Dan McGee f7912e9dc6 Const correctness!
Add some 'const' keywords all over the code to make it a bit more strict on
what you can and can't do with data. This is especially important when we
return pointers to the pacman frontend- ideally this would always be
untouchable data.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-05 17:34:33 -04:00
Dan McGee 4906b76c85 Clean up unnecessary headers and macros from alpm.c
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-05 17:32:53 -04:00
Dan McGee d8e88aa017 Fix compilation with GCC 4.2.0
'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-05 17:32:09 -04:00
Dan McGee 26e3db423a Merge branch 'alpm.c_cleanup' into frontend_config
Conflicts:

	lib/libalpm/alpm.c
2007-06-04 23:32:38 -04:00
Dan McGee 466b79bf8f Fix up outstanding parseconfig issues
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-04 23:10:49 -04:00
Dan McGee 358cc5804a Rip alpm_parse_config out of libalpm
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-04 23:10:49 -04:00
Dan McGee 65662315b6 Add a parseconfig to the pacman frontend that compiles
Warning: this compiles but may not work as intended quite yet. :)

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-04 23:10:49 -04:00
Dan McGee 64d36db5f4 Move functions out of alpm.c to where they belong
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-04 22:52:04 -04:00
Andrew Fyfe e0afe6e94a Autotool clean up.
* 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-04 22:24:29 -04:00
Dan McGee d9ff7bbcd2 Remove hardcoded defines from libalpm
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-04 17:00:30 -04:00
Dan McGee a094deacf4 Start moving hardcoded paths out of libalpm
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-04 17:00:30 -04:00
Dan McGee ed13ac2cc8 Remove freespace checking code
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-02 13:17:26 -04:00
Nathan Jones 80237630af Change -z|--showsize flag to ShowSize pacman.conf option
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-06-01 11:00:39 -04:00
VMiklos af888c534b alpm_parse_config(): ignore #.*$, not just ^#.*$
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-05-31 15:21:33 -04:00
Dan McGee 7bd2ff6851 Move DB and cache dirs away from there dependence on ROOTDIR
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-31 02:51:28 -04:00
Aaron Griffin ebad199614 Allow $repo expansion in 'Server' config lines
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-18 01:24:59 -05:00
Chantry Xavier 1381b58ceb Fix extraneous "ignoring upgrade" output on Ignore'd packages
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-18 01:22:18 -05:00
Aaron Griffin 9d9ac66bb2 Continue scanning when an invalid DB entry is found
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-18 01:19:00 -05:00
Aaron Griffin 9abe99f236 Remove trailing slashes from Server URLs
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-18 01:17:52 -05:00
Aaron Griffin 4e6b7c1cde Fix libarchive permission extraction
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-18 01:16:56 -05:00
Nagy Gabor a3994f975b Use alpm_depcmp in _alpm_pkg_update_requiredby
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-14 10:56:52 -04:00
Dan McGee 2bcecbd62c Remove unnecessary casts on malloc and elsewhere
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-14 03:16:55 -04:00
Aaron Griffin 1213212c31 Fix IgnorePkg handling with replacement packages
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-05-09 23:11:39 -05:00
Dan McGee 8bbb5dd078 libalpm util.c and util.h cleanup
* 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-29 12:47:02 -04:00
Dan McGee a58e17a1d7 Remove STRNCPY macro from libalpm
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-29 12:03:09 -04:00
Dan McGee eeb38ef677 Remove 'removes' array from libalpm
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-28 19:56:29 -04:00
Dan McGee a57b2f233f Remove FREELISTPTR macro
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-28 03:54:25 -04:00
Dan McGee a3491224df Remove FREEPKG macro and correctly type _alpm_pkg_free
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-28 02:59:58 -04:00
Dan McGee 0984dab1f2 Remove FREEHANDLE macro and correctly type _alpm_handle_free
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-28 01:54:10 -04:00
Dan McGee 69bc2e62fe Remove FREESERVER macro and correctly type _alpm_server_free
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-27 20:40:29 -04:00
Dan McGee 3cf8a333d0 Remove FREEGRP macro and correctly type _alpm_grp_free
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-27 20:38:54 -04:00
Dan McGee ec7d6955b8 Remove FREESYNC macro and correctly type _alpm_sync_free
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-27 14:53:01 -04:00
Dan McGee db9e10f142 Remove FREETRANS macro and correctly type _alpm_trans_free
Remove an unnecessary macro, and get rid of the void pointer.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-27 14:29:23 -04:00
Dan McGee 75efcbbff6 Clean up gettext on the libalpm side
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-26 19:39:53 -04:00
Dan McGee 6a1dfdf292 Set the correct type on the log callback function
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-26 18:59:02 -04:00
Dan McGee 085e5898ae Update Doxyfile for v1.5.2
Ran a doxygen -s -u as recommended on the Doxyfile.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-25 11:07:48 -04:00
Dan McGee c03277f83d add.c and remove.c cleanup
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-25 11:07:48 -04:00
Dan McGee 27f99b3854 Update the pot language files
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-25 02:58:00 -04:00
Dan McGee e0e793b912 Update all translation po files
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-25 01:05:02 -04:00
Nam 234581ae6f Updated French Translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-25 01:00:52 -04:00
Pierre Schmitz ffef4d0507 Updating German Translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-23 04:22:09 -04:00
Nagy Gabor 8e694dc40f Using wrong variable for depend lookup in sortbydeps
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-04-22 22:01:47 -05:00
Chantry Xavier 5de03497c3 Let IgnorePkg superceed the FORCE package flag
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-04-22 21:48:10 -05:00
Juan Pablo González T 37211020ec Added Spanish translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-22 23:07:56 -04:00
Matthias Gorissen 7adf07bcc7 Update German translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-16 23:48:26 -04:00
Mateusz Jędrasik 75844d0063 Add Polish language translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-16 23:48:26 -04:00
Aaron Griffin 3929bbfb7b ldconfig changes from CVS
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-16 20:34:57 -05:00
Roman Kyrylych 37eafc3d31 Really run scriptlet on pre_remove and post_remove
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-05 12:40:18 -04:00
Aaron Griffin 76f816b9f7 Backport changes from 3.0.1
* 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-04 00:30:14 -05:00
VMiklos 32924c9bdb Move the 100% progress bar call before remove scriptlet for output reasons
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-01 21:52:28 -04:00
Dan McGee c3ad8bd75f Make all paths and file locations configurable
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>
2007-03-30 15:55:58 -04:00
Aaron Griffin 1d35c4dcc6 Report an error on setmntent failure
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-03-29 22:44:10 -05:00
Dan McGee d6d7435a6c Fix a 0 and '/0' switch
It looks like someone accidentally put a 0 instead of '/0', this fixes it.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-03-29 00:57:04 -04:00
Dan McGee bbe55b5ce9 Doxygen fixups for libalpm
We haven't done a whole lot with Doxygen so far, so this updates some of the
things that have changed a lot- namely, the now public exposure of alpm_list.
All functions in this file have now been Doxygen commented, and a few other
things in alpm.c were fixed as well. In addition, the Doxygen config file
was updated.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-03-29 00:40:49 -04:00
Dan McGee 4a0aac3862 Fix --ignore behavior on sysupgrade
* --ignore was being ignored (haha) on sysupgrade when a package was listed
  as being a force upgrade. This adds a prompt to the user in this case asking
  what to do.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-03-28 00:35:17 -04:00
Dan McGee 8cacc46f8b Move .cvsignore -> .gitignore
* Move all .cvsignore files to .gitignore for switch in VCS. In addition,
  delete ones that were unnecessary because they only contained Makefile
  and Makefile.am.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-03-27 21:06:31 -04:00
Aaron Griffin f8d0601b8d * Added a mirror list for [testing] (it appears most mirrors mirror testing)
* Commented ftp.archlinux.org in the official mirror list
* ran a make dist, which updated some translation files
2007-03-24 04:18:17 +00:00
Dan McGee 5702b943e8 * Updated German translation
Pierre Schmitz <pierre@archlinux.de>
2007-03-23 17:42:14 +00:00
Dan McGee 9cf9606459 Fixed alpm_log call- too many parameters passed. (bardo on #archlinux-pacman) 2007-03-22 18:33:27 +00:00
Dan McGee 19faa24cf3 Clarify some English messages as suggested by Nagy Gabor. I even did the hard
work of fixing these in the translation files, and I removed a few fuzzys
while doing so. If any more patches for translations come, try to do it
against these files.
2007-03-22 18:19:49 +00:00
Dan McGee b882353d48 Lots of translation updates before we release.
* Ran msgmerge on all po files from new pot files, but did not check in the
  updated pot files as that just causes problems.
* Updated Italian translation
  Giovanni Scafora <linuxmania@gmail.com>
* Updated Russian translation, added libalpm partial translation
  Владимир Байраковский <4rayven@gmail.com>
* Updated Hungarian translation
  Nagy Gabor <ngaba@petra.hos.u-szeged.hu>
* Updated French translation
  solsTiCe d'Hiver <solstice.dhiver@laposte.net>

Thanks again guys!
2007-03-22 14:51:00 +00:00
Aaron Griffin 118671eff4 I was mistaken, newpkg->data IS useful here, as the scriptlet isn't in the FS at
this point
2007-03-22 08:28:09 +00:00
Aaron Griffin d8ec08f578 * Correct install scriptlet usage (reuse of handle->root when not needed)
* Skip running scriptlet when chroot fails - to prevent issues in the host
  filesystem
2007-03-22 08:22:48 +00:00
Dan McGee d763017233 * Fix conflict checking to ignore symlinks that were in previous version of
package. Regression from 2.9.8.
2007-03-22 06:25:26 +00:00
Jürgen Hötzel 75d6149711 * dont use XferCommand if retrieving local files, fixes wget error:
file:////....: Unsupported scheme.
2007-03-21 21:08:08 +00:00
Aaron Griffin 941c23025c * Fix asking the user to upgrade when using -Sp
* More significant error messages when -Qo fails
* Potential fix for reported error that pacman indicates corrupt packages
  when space is full on the cache dir
2007-03-21 03:08:19 +00:00
Aaron Griffin 9b08a5aa97 * Fix pacman -Se which installs depends only, as it was broken
(Is this useful to anyone?)
2007-03-20 02:36:21 +00:00
Aaron Griffin 22206d5bea Nagy Gabor <ngaba@petra.hos.u-szeged.hu>
* correct _alpm_rmrf usage with regard to symlinks and directories
2007-03-19 04:49:28 +00:00
Aaron Griffin bd55cf548c James Rosten <seinfeld90@gmail.com>
* Two new pactest test cases
* Fix some "required by" / "requires" output by unifying all "dependency types"
  to a single value (PM_DEP_TYPE_DEPEND)
2007-03-19 04:23:45 +00:00
Dan McGee 1205e544d3 * Updated Hungarian translation
Nagy Gabor <ngaba@petra.hos.u-szeged.hu>
2007-03-14 23:17:11 +00:00
Aaron Griffin 74e8b28fc3 * Missed a path when requiring that all paths end with / - this caused -U not to
work (it was downloading files as .package-name) at all.
2007-03-12 23:26:47 +00:00
Dan McGee 9e3a185345 * Noted a misspelling for later (after we are not in string freeze). 2007-03-12 15:49:31 +00:00
Dan McGee 38784a7eb5 * Fix wrong filesize being recorded to local DB. Reported by Andreas Radke. 2007-03-12 15:41:33 +00:00
Aaron Griffin 5f15a80274 * Fixed an error with 'cascade' removal due to creation of a new pmpkg_t struct
(and thus not copying pertinent data w.r.t. reading package files)
2007-03-12 05:55:14 +00:00
Dan McGee 0203fabe54 * Fix an issue where the same dependency was recorded multiple times in the
'required by' field.
2007-03-12 04:47:58 +00:00
Dan McGee ba1806f5ac * Removed ${CFLAGS} from Makefile.am(s) as it was causing all CFLAGS to be
duplicated.
* Updated the util Makefile.am to link with the proper libalpm.la.
* Fixed bitmasking issues in be_files.c and db.h.
* Rankmirrors updates from James Rosten (with some cleaning up of my own).
  KeyboardInterrupts are now handled gracefully.
2007-03-12 03:02:57 +00:00
Dan McGee 7f7da2b5fc * Fix group comparison issue and associated compilation warnings by using
the alpm strcmp operation which takes void* references.
* We had this great visibility patch, but never actually took advantage of
  it. Added the right compile flag to make it work and added some more
  SYMEXPORTs where necessary to have a successful compile.
2007-03-11 21:10:02 +00:00
Dan McGee 2f4c1fe647 * Updated Italian translation
Giovanni Scafora <linuxmania@gmail.com>
* long -> float conversion for package size output (which still may be the
  wrong size, this needs to be looked at)
2007-03-10 20:36:20 +00:00
Jürgen Hötzel 187eb7492d fixed string comparison callback (patch from Nagy Gabor) 2007-03-09 23:26:33 +00:00
Aaron Griffin 6f870968ed * Two fixes when running under a new root (-r|--root)
- Check EACCES in can_remove_file, to verify - we're only checking for a
      read-only FS here... if write permissions fail, we can still remove it
    - Switched the message when creating DB directories from an error to a debug
      message
* Fix the dep tests once and for all (it wasn't working for provides=()
  packages)
2007-03-09 05:33:06 +00:00
Dan McGee 4268eda3a6 * Updated pot files for hopefully the last time before release.
* po files update themselves when a pot file update occurs, so you see that
  here as well.
* Added a few more small notes to translation-help.
2007-03-07 16:57:22 +00:00
Dan McGee fd312c35eb * Updated German translation
Pierre Schmitz <pierre@archlinux.de>
* Added en_GB translation, thanks! Keep it 'synchronised'! Sorry, awful joke.
  Jeff Bailes <thepizzaking@gmail.com>
2007-03-07 16:36:42 +00:00
Aaron Griffin 166ffc4f9e * Bug fix for makepkg dependency testing. This requires that we
expose alpm_splitdep and alpm_depcmp as public symbols
* Removed a duplicate strtrim for question responses
2007-03-07 07:45:30 +00:00
Dan McGee 1a9e6015c7 * Updated Brazilian Portuguese translation
Douglas Soares de Andrade <dsandrade@gmail.com>
2007-03-07 06:57:44 +00:00
Dan McGee aaa356999a * Sorry tranlators, another string update. .pacorig was displayed twice in
the output of this message (simple fix- remove .pacorig from your
  translated message).
2007-03-06 19:38:04 +00:00
Dan McGee e1704bfdd6 * Updated Italian translation
Giovanni Scafora <linuxmania@gmail.com>
2007-03-06 14:35:10 +00:00
Aaron Griffin 90b75a0435 * Fix the double package name URL when using XferCommand
* Fixed valgrind yelling about the sprintfs in md5/sha1 routines
2007-03-06 04:22:03 +00:00
Dan McGee 5baba84397 * Added missing header include guards in md5.h and sha1.h.
* Some header cleanup on the pacman side of things - we had alpm.h instead
  alpm_list.h in a few headers.
* removed an extra slash in path-building snprintf in server.c.
2007-03-06 01:21:41 +00:00
Dan McGee 869e81e1cf This commit looks much more monumental than it is. Almost all just #include
reordering and adding ones that were forgotten (noticed when trying to
compile after reordering).

* Updated the HACKING file to include information on #include usage.
* print -> vprint in "making dir" function in pactest.
2007-03-05 22:13:33 +00:00
Dan McGee facb99098d * Failure to #include config.h cost us here, we lost all NLS in alpm.c. 2007-03-05 19:21:33 +00:00
Dan McGee 11fbc595d4 * Hopefully the LAST big update of the language files before release.
Translators and developers should count this as the string freeze unless
  something REALLY essential comes up. Send in patches to these translations
  when you get a chance (and patches are appreciated, as they are much easier
  to deal with).
2007-03-04 17:16:51 +00:00
Aaron Griffin 28b2dbb52c * Fixed the handle realroot stuff
* Added some {}
2007-03-04 09:16:28 +00:00
Aaron Griffin cdb46ef3fa * Fixed a whole mess of extra '/' pathing issues when a different root is
specified
* Use db->path when appropriate
* Commented out the FAKEROOT checks in libalpm.  This should never ever be done.
  TODO test this quite a bit, as this will never cause the transactions to fail
  if RW operations are requested... right now it is totally up to the front end
  to decide when to fail
* Use realpath() to canonicalize the root path when specified, so
  _alpm_makepath() doesn't freak out
* Fixed some output/indent of MDFile and SHAFile algorithms
* More efficient sprintf() usage in MDFile/SHAFile
* Added real error output to _alpm_makepath
2007-03-04 09:08:54 +00:00
Aaron Griffin a7d7c96357 * handle changes: callbacks should check handle first, as there's a few
occasions where some alpm stuff could be used without initializing the
  library (vercmp is one).  TODO make these functions (handle accessors)
  better by returning "library not initialized" instead of failing.
* Removed NoUpgrade lines from pacman.conf - we need to test this!
* Re-corrected the lib targets for src/util/*
* make dist seems to have updated the po files
2007-03-04 06:28:48 +00:00
Dan McGee 8178c2f986 * Maybe that call to _alpm_trans_update_depends was necessary. Added it back
in but did it right by duplicating the package first.
2007-03-04 01:22:57 +00:00
Dan McGee fd2167131f * Remove unnecessary call to _alpm_trans_update_depends that was erroring
anyway.
* Spelling/commenting etc.
2007-03-03 20:22:48 +00:00
Dan McGee 0af3c4e85e * Updated Italian translation
Giovanni Scafora <linuxmania@gmail.com>
* Updated German translation
  Pierre Schmitz <pierre@archlinux.de>
2007-03-03 18:45:23 +00:00
Dan McGee e24c22e308 * A little more hacking with wchar_t output, but nothing really changed in
it. Eventually we'll make progress.
* Rewrote the _alpm_splitdep function to behave more like all our other
  function calls. Use heap instead of stack allocation for the depend struct,
  so now it needs to be freed by the caller.
2007-03-03 09:43:16 +00:00
Aaron Griffin 7f5dada885 Big commit this time:
* Moved entirely to alpm_pkg_get_* accessors, to read data on demand
* Mostly removed the INFRQ_ parameters from outside the be_files backend (making
  the backend more extensible in the long run)
* packages created from _alpm_db_scan now have the db and origin set (making
  accessors actually work for these packages)
* removed _alpm_db_ensure_pkgcache

* totally revamped the _alpm_checkconflicts function, making it cleaner and
  easier to read (and thus fix in the long run) - maintainable code ftw
  NOTE: feel free to rename the functions... I couldn't think of anything better

* removed an extra loop in sync.c:find_replacements - no sense in looping over
  an entire DB while strcmp'ing the name, when we have get_pkgfromcache

Other:
* package struct "license" -> "licenses"
* Created _alpm_sync_find (duplicate code in some places, find_pkginsync
* Minor const correctness changes along the way
* fixed a couple extra '/' pathing issues (non-issues really)
* removed a duplicate pkg_cmp function
2007-03-03 08:13:59 +00:00
Dan McGee a0dbade774 * Oops- I need to learn to count in hex. 2007-03-01 22:11:02 +00:00
Dan McGee 06c82bfe87 * Updated Italian translation
Giovanni Scafora <linuxmania@gmail.com>
2007-03-01 19:36:26 +00:00
Dan McGee efca1cc010 * Modified values of INFRQ_* options so we start at 0x01 and not 0x00. This
allows for the same bit operators to be used across the board on pkg_get
  operations.
* Changed name of INFRQ_NONE -> INFRQ_BASE to more clearly reflect what it
  does (loads pkg name and version).
* Added a few missing things on package functions, such as SYMEXPORT and
  ALPM_LOG_FUNC.
* Slight updates to pmenv to print 'pass' and 'fail' instead of 'passed' and
  'failed'. Keeps output a bit more concise.
* Fixed a doxygen comment spelling error. :P
2007-03-01 19:07:38 +00:00
Aaron Griffin ca139e9850 * Comment clarification 2007-03-01 07:08:48 +00:00
Aaron Griffin 3ebd125e1a * Switched some functions to alpm_pkg_get_* usage as I came across them
* Added some provision switching hackery.  This could probably use some
  refactoring,.. it solves the following case:

    pkg1 and pkg2 provide 'foo' and are both installed
    pkg3 depends on 'foo' and so lists 'pkg1' in the REQUIREDBY db section
    pkg1 is upgraded and no longer provides 'foo'
    ** This code ensures that the REQUIREDBY of pkg3 is updated to require pkg2
       now instead of pkg1
2007-03-01 07:03:05 +00:00
Aaron Griffin 4aca4980a7 *** empty log message *** 2007-03-01 05:42:53 +00:00
Dan McGee af5cbf3084 * Updated Italian translation
Giovanni Scafora <linuxmania@gmail.com>
* Fixed FS #6442 - don't list directories in -Ql output.
2007-03-01 04:51:24 +00:00
Dan McGee 4a45a273ea * Fix up _alpm_db_free, remove use of void*. 2007-03-01 03:08:41 +00:00
Dan McGee 13e2111045 * Unifying placement of REPLACES in desc file, as pacman2 does. We'll worry
about bigger DB changes later, but lets not screw anything up for release.
* Removed some weird uses of "not ... ==" usage in pactest- correct me if I'm
  wrong, but isn't "!=" a lot more clean and concise?
* Print description of failed tests in the pactest summary. This could get
  dirty with a lot of failed tests though, so watch out.
2007-02-28 16:37:24 +00:00
Dan McGee bd7eb9475c * Added another test as suggested by Nagy on the ML- a package both provides
for and is a dependency of another package. (upgrade057)
* Removed man2html stuff from doc/Makefile.am.
* Patch: improved depends checking in _alpm_checkdeps
  Nagy Gabor <ngaba@petra.hos.u-szeged.hu>
* Slight revisions to pmrule.py to allow for a PKG_PROVIDES test.
* Very quick updates to the pactest README.
* Added rules to some of the newer upgrade tests. Note: upgrade055 now fails
  due to requiredby entries not being written packages that are dependencies
  in a provides role.
2007-02-28 04:00:21 +00:00