1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00
Commit Graph

847 Commits

Author SHA1 Message Date
Dan McGee
f0ea21cffc Ensure requiredby entries are removed during an upgrade
This fixes the failure of the requiredby004 pactest in a not so pretty way,
but it gets the job done. I purposely used the extremely long name of
PM_TRANS_TYPE_REMOVEUPGRADE to be both clear and in the hope that someone
else will figure out a better solution.

Original idea from Nagy Gabor, patch updated and cleaned for current code.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-14 09:34:39 -04:00
Nagy Gabor
ce1fb07436 libalpm/sync.c : ldconfig is run twice.
remove _alpm_ldconfig call from _alpm_sync_commit,
since sync operation causes an upgrade transaction,
where ldconfig is already run.

Reference:
http://www.archlinux.org/pipermail/pacman-dev/2007-April/008132.html

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-14 01:12:18 -04:00
Chantry Xavier
edcefb1d58 libalpm/remove.c : revert part of commit to fix remove044 pactest
In 1c9f30b9fa

This change should be done AFTER the TODO in recursedeps is implemented.
Then we'll be able to first sort the list, then call recursedeps which keeps
it sorted. For now, the sorting should still be done as the last step.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-13 17:18:27 -04:00
Nagy Gabor
9f9086573a Update hungarian translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-13 15:44:39 -04:00
Chantry Xavier
1c9f30b9fa libalpm/deps.c : fix for remove044 pactest.
Patch from Nagy that makes removedeps use alpm_depcmp.

I also renamed removedeps to recursedeps, as it can have
a more general usage, and added an include_explicit argument,
so we can control if packages explictly installed are added or not.

Note: Small changes made by me (Dan) as well- mostly some English grammar
correction and a few other cleanups.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-13 10:37:13 -04:00
Chantry Xavier
8d62835ba1 Remove conflict message for non-existent files (reworked)
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-13 10:18:52 -04:00
Chantry Xavier
7234785601 libalpm/remove.c : Rsd combination.
Currently the d (nodeps) option skips the s (recursive) part,
rendering the Rsd combination totally useless.
This patch makes a recursive removal still possible using the nodeps option,
as Romashka asked there :
http://bugs.archlinux.org/task/6057#comment17784

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-13 15:47:20 +02:00
Andrew Fyfe
c0a7d9d82d Some doxygen comments.
Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
2007-07-12 16:00:58 -04:00
Dan McGee
d402583c43 Remove some more conditional include stuff
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-12 16:00:35 -04:00
Dan McGee
20f73d6299 Remove versioncmp.{c,h}, clean up selective #ifdefs
Remove versioncmp.c by moving all functions to locations that make sense.

Move replacement functions (for building without glibc) into util.c where
they belong, and do proper checks for them instead of using __sun__, etc.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-12 15:20:43 -04:00
Dan McGee
653fb8fe03 Remove 'buildtype' from libalpm and pacman
Remove unused buildtype field from pmpkg_t struct and anything associated
with it, as it is unused at the moment. If we need to readd it, it is an
easy revert of this commit.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-11 23:36:13 -04:00
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
Dan McGee
cb311adeab * db search optimization- why don't we compile the regex once instead of once
per package.
2007-02-26 23:32:08 +00:00
Aaron Griffin
8fbdd03cce * Enforce const char* params when using strings
* Unified some functions names "package" -> "pkg" for consistency
* Removed the goofy 'faketarget' stuff used for dep testing
* Renamed alpm_pkg_isin -> alpm_pkg_find
* Renamed alpm_db_readpkg -> alpm_db_get_pkg
2007-02-26 08:38:48 +00:00
Dan McGee
5579607899 * Updated Italian translation
Giovanni Scafora <linuxmania@gmail.com>
* added '-fstack-protector' flag to debug compile, to catch any buffer
  overflows we may have in stack variables.
2007-02-24 20:25:45 +00:00
Aaron Griffin
78ecf9a12b * The info level for this was wrong, causing replacements to not really work 2007-02-23 08:00:06 +00:00
Aaron Griffin
faad70aa54 * Too much debugging output in the alpm_pkg_compare_versions function
* Using the wrong info level for replacements
2007-02-23 07:53:25 +00:00
Aaron Griffin
d584d8c068 * Modified the handling and output w.r.t. IgnorePkg entries. -Sy always ignores
these packages, but -S explicitly asks for confirmation.
2007-02-23 02:10:56 +00:00
Dan McGee
332c127109 Big commit here, I'll try to cover all the bases.
* Updated all of the language files, as the POT file was updated. NOTE FOR
  TRANSLATORS, try to base your next contribution off of these, notice how
  some msgids and messages have been wrapped to the next line- it makes it
  easier to read anyway.
* More Makefile.am/configure.ac updates. 'make dist' and 'make distclean' now
  work properly, with only one caveat- the automatic testing in distclean
  doesn't do so hot as it is compiled with a default configure, which includes
  the fakeroot-proof code (which does not cooperate with pactest).
* Added a Makefile.am for the pactest directory.
2007-02-22 21:34:51 +00:00
Dan McGee
ef4728903d * Update the translation POT files- I don't want to do this daily but the
current ones were a bit out of date.
2007-02-22 16:14:11 +00:00
Dan McGee
90129490e8 * Updated German translations.
Pierre Schmitz <pierre@archlinux.de>
* Updated Italian translations.
  Giovanni Scafora <linuxmania@gmail.com>
2007-02-22 16:10:32 +00:00
Aaron Griffin
cd2309eb73 * debug cleanup (more)
* Fixed conflict checking.  I had mistakenly assumed that the transaction
  packages were of type 'pmsyncpkg_t', but that is not the case.  Reverted back
  to pmpkg_t's and fixed some checking a bit.

* pactest results: PASSED =  71 (100.00%)
2007-02-22 06:36:05 +00:00
Aaron Griffin
871e123cf3 * Cleaned up some debug output
* Fixed a segfault in the conflict checking code
* Added an automatic failure in the case of -A/-U for a replacement of an
  existing package.  This requires a large amount of work and is postponed for
  now.  Example:
    If ncmpc is installed, pacman -U /path/to/ncmpc-svn.pkg.tar.gz will fail
    with and appropriate error message
2007-02-22 04:42:59 +00:00
Dan McGee
3595201f5f * A lot of Makefile.am updates to try to get 'make dist' and 'make distcheck'
to work as expected.
2007-02-22 04:36:02 +00:00
Dan McGee
4bb58ef117 * Updated Italian translation
Giovanni Scafora <linuxmania@gmail.com>
2007-02-21 19:27:38 +00:00
Dan McGee
a5f630fda6 * Fixed inconsistency of args- _alpm_db_read, _alpm_db_write. 2007-02-21 08:34:36 +00:00
Aaron Griffin
436f36c76b * Re-added a compare function for syncpkg's - it was removed without thinking
properly
* Error when re-reading the DB for replacements, wrong info level
* Removed an duplicate debug message "checking for package replacements"
* Check ignorepkg for REAL upgrades...
* Properly check the NOSAVE flag
* some unlink_file (remove.c) cleanup
* fix indent level on handle.c
* Force libalpm paths to end with a '/' char
* Fixed 'target' looping in conflict.c (pmsyncpkg_t, not pmpkg_t)
* Added some debug output to cache and db scanning

** All pactest tests succeed again, yay **
2007-02-21 06:44:14 +00:00
Dan McGee
74f4fe9fe9 * Update Italian Translation
Giovanni Scafora <linuxmania@gmail.com>
2007-02-20 19:33:13 +00:00
Aaron Griffin
f62f37504a * Some cascade removal changes. Mainly code cleanup, but this is an attempt to
track down the great "Codemac Segfault"
* Fixed sortdeps - use the alpm_pkg_get functions to ensure data
2007-02-20 08:44:32 +00:00
Dan McGee
03f034ef0e * Updated conflict checking one last time. You can finally have a file move
from one package to another seemlessly (knock on wood). This is implemented
  through the use of two skip lists in the trans struct- skip_add and
  skip_remove, which replace the former trans->skiplist.
* Removed an unnecessary function parameter, added a necessary one.
* If a package has no backup files, print '(none)' under the heading so it is
  more obvious.
* Updated my TODO list.
2007-02-20 02:14:27 +00:00
Dan McGee
3f802fb38e * Updated German translations.
Pierre Schmitz <pierre@archlinux.de>
2007-02-19 19:28:30 +00:00
Dan McGee
bd6adec40b * Updated bash_completion script to 3.0 options.
* Changed that removal message again, hopefully it sounds good now.
* Shortened a usage option description so it would not wrap at 81 chars.
2007-02-19 04:13:13 +00:00
Dan McGee
d86bea5c8d * Added some improved debug output to file conflict checking.
* Small change to string in remove.c (translators may or may not have to worry
  about this, depending on their already existing translation).
2007-02-19 03:18:59 +00:00
Aaron Griffin
119b3ab043 Moved the update_depends function to trans.c, as it depends on a transaction
object
2007-02-18 22:07:11 +00:00
Aaron Griffin
7b4e2cd25d Added new italian translation from Giovanni Scafora <linuxmania@gmail.com> 2007-02-18 18:31:24 +00:00
Aaron Griffin
d35e489499 * Fix version comparisons when one pkgrel doesn't exist (this ony fails on an ==
operation, technically, as 1.1.2-1 >= 1.1.2 is true.
2007-02-18 18:29:28 +00:00
Aaron Griffin
92ad556512 * A whole mess of backup changes
- the code should be clearer, more organized, commented, and have worthwhile
    variable names now
  - proactive backup=()s now work.  That is, adding a file to a backup array
    does what it should on the upgrade to that package, no longer forcing you to
    wait a full upgrade cycle for it to take effect
* ldconfig was being run twice on an upgrade operation - fixed
* fixed another pm_fprintf/printf output corruption with the progress bars
* refactored some duplicate code for adjusting 'requiredby' lists
* Added config.rpath to .cvsignore
2007-02-17 08:55:05 +00:00
Dan McGee
8e34023bbd * Removed unnecessary #define
* Added comment for something I noticed while looking through code
2007-02-16 22:41:51 +00:00
Dan McGee
c40c2e1137 * Updated German translation
Pierre Schmitz <pierre@archlinux.de>
* Added a blurb to 'translation-help' about wrapped messages in po files
2007-02-16 22:04:23 +00:00
Aaron Griffin
a1f36454c2 Added a 'contrib' directory for other stuff that might be a good idea to maintain here.
* moved bash_completion from the "archlinux" script in the official bash_completion package
* moved zsh_completion from the AUR zsh-pacman package
2007-02-16 19:37:00 +00:00
Dan McGee
c557fa589d * Updated Italian translation
* Updated pot translation templates
* Located culprit of progress bar moving when unicode characters are used,
  added a TODO note about it
* Removed '(target)' string from the sync.c error message, just like we did
  from add.c yesterday
* Updated my TODO
2007-02-14 19:35:41 +00:00
Aaron Griffin
3a2d87d61d * Fixed _alpm_pkg_compare_versions so that it does not output warnings if versions match. (reported by Travis Willard) 2007-02-14 16:15:09 +00:00
Dan McGee
cd34ced4ad * strlen -> mbstowcs (multibyte str to wide char str) conversion where we
want the actual number of characters, not the number of bytes.
* Added a TODO to take care of later in scriptlet processing.
2007-02-14 15:54:35 +00:00
Dan McGee
98db5dcc23 * Removed needless checking of package infolevel- leave it to the
alpm_pkg_get functions to do this.
2007-02-14 05:34:21 +00:00
Dan McGee
7e6350a9af * Updated a too-verbose message in pacman/add.c. (shouldn't be an issue withi
translations, but may want to update at some point)
* More libalpm/conflict.c changes. Optimized more, hopefully won't need too
  much more than this.
2007-02-14 04:52:17 +00:00
Dan McGee
d871b841fb Slightly optimized to remove duplicate strcmp operation. 2007-02-14 02:58:35 +00:00
Dan McGee
a6f2cb3ffd Adding official translations. Thanks a lot, guys!
* German Translation from:
    Pierre Schmitz <pierre@archlinux.de>
    Niclas Pfeifer <macwolf@archlinux.de>
* Italian Translation from:
    Giovanni 'voidnull' Scafora <linuxmania@gmail.com>
    Alessio 'mOLOk' Bolognino <themolok@gmail.com>
    Lorenzo '^zanDarK' Masini <lorenxo86@gmail.com>
2007-02-13 21:19:48 +00:00
Aaron Griffin
103dbb9fd1 * Refactored conflict checking within packages. Profiling from Dan showed an
unbelievable amount of strcmp() calls (25 million) due to the list searching.
  This has been reimplemented with a set-intersection scheme, due to the fact
  that file lists are always ordered. - NEEDS TESTING
* Minor clean up, "globalized" the str_cmp helper to match the alpm comparison
  signature, so we can use it elsewhere.
2007-02-13 08:15:38 +00:00
Aaron Griffin
af48c695eb Removed desc_localized for the time being. We don't have localized
descriptions, nor do we actually build them with the newest makepkg.  The actual
implementation in here seems like it could be done better, and it soaks a large
amount of CPU time according to profilers.
2007-02-13 01:46:33 +00:00
Dan McGee
8cb0758beb * Fixed an i18n bug; length of description string was hardcoded previously;
now uses an strlen call.
* Updates of the *.pot files.
2007-02-12 15:39:29 +00:00
Aaron Griffin
2a7c1de945 Wasn't clearing out the 'pkgname' variable, which was causing goofy output
issues - silly me.
Also removed config.rpath from CVS
2007-02-12 06:31:39 +00:00
Aaron Griffin
dfb1f1e237 * Updated the README file
* Removed the handle->needles param.  It's not needed not that alpm_list_t is
  public
2007-02-12 04:45:21 +00:00
Aaron Griffin
434d93ccc7 This should be an ERROR, not a WARNING 2007-02-12 00:41:08 +00:00
Aaron Griffin
97efe292ff *** empty log message *** 2007-02-10 23:50:31 +00:00
Aaron Griffin
d080809c45 * Package file parsing - fixed size and isize - isize is the "size" variable
from the PKGINFO, and size is the stat() size of the archive
* Removed the useless 'output' param from package.c:parse_descfile
* Installation progress
  - Call progress callback once at 0% for initialization
  - 'needdisp' was useless
  - alpm_list_count is called an excessive amount in these nested loops.  Now we
    only call it once per iteration
  - Use the compressed sizes for PROGRESS calcs as uncompressed (isize) is not
    exact (it is missing metadata sizes), and thus produces > 100% numbers
2007-02-10 23:44:39 +00:00
Aaron Griffin
c55ea22c58 * 'add' percentages now cap at 100% (see the comment)
* downloaded packages now pass ONLY the package name to the callback
2007-02-10 09:36:36 +00:00
Dan McGee
73402a1459 * Fix compile errors/warnings.
* Update .cvsignore files a bit.
2007-02-09 21:54:57 +00:00
Aaron Griffin
f8cd4858ca * I made "alpm_versioncmp" public a while back, without noticing this was already done (alpm_pkg_vercmp). I dropped this change, making versioncmp "private" again. (alpm_versioncmp -> _alpm_versioncmp, hidden symbol)
* Make alpm_get_upgrades use the same version check that -Su and -S use.
2007-02-09 21:08:10 +00:00
Aaron Griffin
7f1e75edf1 * Remove "RETRIEVE_LOCAL" trans event as libdownload handles local files 2007-02-09 16:02:20 +00:00
Aaron Griffin
41a8621ba0 * Fixed some missing error values in strerror
* Cleanup up some error enum values
* Revamped the 'pmserver_t' functionality.  Less allocation,
  removed a param and cleaned up some duplicate URL parsing
2007-02-09 10:10:49 +00:00
Aaron Griffin
a94e22d924 Attempt to NOT remove packages on filesystem errors (like a read-only
filesystem). See FS#5887
2007-02-08 08:09:34 +00:00
Dan McGee
2df13b6e8f * Oops. Added some files to make "make update-po" work. 2007-02-08 05:36:26 +00:00
Dan McGee
155aeb40fd Spruced up the TODOs a bit, got rid of some of them since a lot of it was
duplicate anyway. Also removed the last of the ORE tags and replaced them
with TODOs.
2007-02-07 22:08:37 +00:00
Aaron Griffin
3d07ad9539 Copy/pasta error in alpm_get_upgrades that caused a segfault 2007-02-07 06:19:40 +00:00
Aaron Griffin
cbd516a06e Only honor 'force' if versions are NOT identical 2007-02-07 06:12:53 +00:00
Aaron Griffin
6c5066471c Cleanup and more debug info for alpm_pkg_compare_versions 2007-02-07 05:57:28 +00:00
Dan McGee
da637c79e5 Oops. Actuall add two new translation templates as requested on the ML-
'it' and 'pt_BR'.
2007-02-07 02:24:13 +00:00
Dan McGee
f05b6c152b * Update of all the *.po files and *.pot template files.
* Makefile targets to rebuild po files now work - use 'make update-po' in
  the po directories.
* Added two new translation templates as requested on the ML- 'it' and
  'pt_BR'.

This commit might be a bit big for the mailing list to like on the commit
message. :)
2007-02-07 02:22:53 +00:00
Dan McGee
4de804d157 * Makepkg updates, and small bugfix on man page compression.
* Change libtool default to makepkg2 behavior.
* Other small changes.
2007-02-06 22:36:13 +00:00
Dan McGee
96a0115630 Cleaning up mistakes. :P 2007-02-06 21:28:29 +00:00
Aaron Griffin
79c277a218 Attempt #2 at -S/-Su unification: verify that the 'force' option has been read before comparing versions 2007-02-06 20:57:17 +00:00
Aaron Griffin
7d63ecfac6 Copy-pasta errors. 8) 2007-02-06 17:41:36 +00:00
Aaron Griffin
67ea493ec2 Attempt to unify the -S and -Su version comparissons for when a package is newer
See FS#5388
2007-02-06 17:39:32 +00:00
Aaron Griffin
63000584b6 Implemented a crappy version of -Qu (query upgrades). This simply outputs the
packages to be upgraded in a -Su operation.  Much of the code is duplicated from
sync.c.
TODO: move the implementation to upgrades.c, and reimplement the sync_sysupgrade
function in terms of this:
    trans->packages = alpm_get_upgrades();
2007-02-04 08:26:52 +00:00
Aaron Griffin
b2da4b4234 * Added archive verification when loading package metadata for -u and -A
operations (now aborts on a corrupt archive)
* Fixed the pm_fprintf newline error that was plaguing us.  It seems a line
  resetting 'neednl' was removed a while back (by me).  This causes all the
  output errors we've been seeing
2007-02-04 03:24:32 +00:00
Aaron Griffin
616620ad5c * Minor output fix (move colon so it's not part of the URL)
* Added ldconfig on --sync operations too
2007-02-01 03:31:46 +00:00
Aaron Griffin
21e19a7bcf Loading package data from a file was ALWAYS generating the filelist, instead of
using the in-package one. This is now fixed, and an autogenerated one is used as
a last resort.

This fixes the bug where /.CHANGELOG showed up in -Ql.
2007-02-01 03:00:34 +00:00
Aaron Griffin
a2bd6d105c Cleaned up some of the metadata control 2007-02-01 02:29:07 +00:00
Aaron Griffin
4cd65c0a31 * !strcmp reads funny (as "not string compare" - switch those to == 0, which has
a positive connotation.
* Added a nice TODO
2007-02-01 01:51:12 +00:00
Aaron Griffin
21729f0ce4 * Forgot the int->enum header checkin
* Removed the dep-sorting TODO item - switch the sorting to a topological sort
  later (I'll let Dan do the CS stuff, heh)
2007-01-31 08:10:01 +00:00
Aaron Griffin
290b962c48 Switched an int to an enum 2007-01-31 07:14:50 +00:00
Aaron Griffin
0adceabe13 Fix corrupt DB entry handling when loading package entries.
* scan loops no longer abort on corrupt entries
* reloading a cache package (and discovering it corrupt) no longer prints 2 messages
  and uses the pre-build "remove from package cache" function

NOTE: The TODOs in there are important for later w.r.t. cleaning up corrupt DB
entries but there are some logical complexities with doing so, so I'm holding
off for now.
2007-01-31 06:48:06 +00:00
Aaron Griffin
670319c2fb Debug logging changes:
* The --debug params were goofy.  New setup allows --debug without params,
  --debug=<level> where level 1=debug output, 2=debug and download output,
  3=debug, download, and function tracing output.  This seems more sane to me.
* Removed PM_LOG_FLOW1 and PM_LOG_FLOW2.  They were just confusing.  When adding
  new functions, it is near impossible to determin if your output should be
  "flow1" or "flow2" without tracking all the way up the call chain.  Rarely
  would one ever say "ok, lets just show "flow2" output.  These have both been
  replaced with PM_LOG_DEBUG
* Removed the need for the root parameter on alpm_initialize. it is now
  defaulted to PM_ROOT just like dbpath and cachedir.  This allows alpm to be
  initialized BEFORE option parsing in the front end, saving us some duplicate
  variables in the frontend.
* Cleaned up front end variables due to early alpm_initialize call.
2007-01-31 06:10:21 +00:00
Dan McGee
44dc48f10f slight line spacing/indent updates 2007-01-31 02:58:12 +00:00
Aaron Griffin
da648bc24c K. Piche <kevin.piche@cgi.com>
* ALPM_LOG_FUNCTION macro and all the great work to add this macro everywhere
2007-01-30 08:14:10 +00:00
Aaron Griffin
195e30e8aa K. Piche <kpiche@rogers.com>
* gcc visiblity changes

Also modified _alpm_versioncmp -> alpm_versioncmp (public function) as per K.
Piche's suggestions
2007-01-30 07:47:19 +00:00
Dan McGee
0bc06918e4 * Remove -fno-strict-aliasing as it is now unnecessary to compile.
* Fix up add.c a bit better than it was in regards to FS #3492.
* Optimized the sqrt call in dependency cycle checking to a single call.
* Removal of an outdated comment.
2007-01-30 05:41:13 +00:00
Dan McGee
1799afc9c1 Discussed on IRC for a bit, this makes the following changes for clarity:
* alpm_list_is_in    --> alpm_list_find
* alpm_list_is_strin --> alpm_list_find_str
* Flip parameters of both functions to be inline with rest of alpm_list.

First commit, woohoo.
2007-01-30 03:46:33 +00:00
Jürgen Hötzel
13f9fc4d19 * Fix building outside $(srcdir).
* Removed ./gen-mirrorlist.sh invocation from configure script:
  Mirror-files are generated by make, not configure.
2007-01-29 22:18:31 +00:00
Aaron Griffin
e22336673a Dan McGee <dpmcgee@gmail.com>
* Lots of code cleanup, and type fixes
* Make 'makeworld' a bit more in-line with the other stuff
* Make -Si and -Qi operations appear the same
2007-01-26 02:13:16 +00:00
Aaron Griffin
a5ad2b3f93 * Fix FS #3107- Use ISO date style
* Fix FS #5409- document that pacman.conf repo ordering is important

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
2007-01-26 01:33:03 +00:00
Aaron Griffin
170d63190a * Shuffled some of the alpm_list free funtions - still not perfect, but better
* Added alpm_list_remove_node for single list node removal
* Proper error checking/output for failed db_read/db_write (missing files)
* Invalid packages (missing files) are now removed from the package cache
* -Qs and -Ss output now look the same
* config.rpath causes errors on one machine I had, so I added it to CVS
* Fixed a "clobbered memory" issue when installing groups - only the outer list
  should be free'd, not the contained data
2007-01-24 08:51:50 +00:00
Aaron Griffin
1b61cc8c69 This mainly deals with code clarity- removing currently unneeded
optimizations in order to make the code much more readable and
type-checkable. Every enum in the library now has it's own type that
should be used instead of the generic 'unsigned char'. In addition,
several #define statements dealing with constants were converted to
enums.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
2007-01-24 03:02:53 +00:00
Aaron Griffin
8b11dd50eb James Rosten <seinfeld90@gmail.com>
* attempt to unlink file AFTER moving to .pacsave always fails
2007-01-23 16:05:21 +00:00
Aaron Griffin
4db24ca28a * Added some calloc calls to replace the malloc-then-set-to-zero functionality
* Fixed -Ss output so as not to call alpm_list_getdata with a NULl list
* Added a NULL check in alpm_list_getdata
* Fixed alpm_list_add_sorted to properly handle a new / beginning insertions
2007-01-23 01:34:58 +00:00
Aaron Griffin
000256cbc5 * Added a check for .FILELIST for package validity in addition to .PKGINFO 2007-01-22 16:16:51 +00:00
Aaron Griffin
c19839695b Introduced an infinite loop during the pmlist -> alpm_list transition, whoops 2007-01-22 09:27:00 +00:00
Aaron Griffin
35a9f3e7d0 Moved some decls to make the "pkg_invalid" patch compile again. 2007-01-19 23:44:50 +00:00
Aaron Griffin
77f6bcfa3d Whoops. There's a 0 where there should be a 1. 2007-01-19 18:06:37 +00:00
Aaron Griffin
d27e5efec9 Johannes Weiner <hannes@saeurebad.de>
* package cleanup (pkg_invalid) refactoring
2007-01-19 18:05:19 +00:00
Aaron Griffin
e310209296 Johannes Weiner <hannes@saeurebad.de>
* use calloc to zero-out new packages (far more ideal)
* use memcpy to copy primatives when copying package structures
2007-01-19 18:01:02 +00:00