Commit Graph

15 Commits

Author SHA1 Message Date
Dan McGee 580fe21065 Abstract has_scriptlet() to package ops struct
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-13 21:25:14 -06:00
Dan McGee c00e05992e Remove non-public functions from header
And rename accordingly.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-13 21:16:47 -06:00
Bruno Widmann 5f36523af9 Abort db_populate if dbpath is not set
Rather than segfault. Fixes FS#21345.

Signed-off-by: Bruno Widmann <bruno.widmann@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-13 16:45:22 -06:00
Allan McRae 21833d90e2 Merge desc and depends files in local db
Whenever depends is needed from the local db, so is desc.  The only
disadvantage to merging them is the additional time taken to read the
depends entries when they are not needed.  As depends is in general
relatively small, the additional time taken to read it in will be
negligable.  Also, merging these files will speed up local database
access due to less file seeks.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-12 21:42:41 -06:00
Dan McGee fc74ef93b6 dirent usage cleanup
We were including the header in a lot of places it is no longer used.
Additionally, use the correct autoconf macro for determining whether
d_type is available as a member: HAVE_STRUCT_DIRENT_D_TYPE.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-12 20:29:20 -06:00
Dan McGee feb9889f22 Add epoch support to pacman/libalpm
This will allow for better control of what was previously the 'force' option
in a PKGBUILD and transferred into the built package.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-13 23:29:26 -05:00
Dan McGee ef32aa0219 Small tweaks after backend merge
Just a few small things I noticed looking through the code.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-13 23:09:20 -05:00
Allan McRae 24d77291da Only write to local repos
We do not write to sync repos so kill the code for that.

Signed-off-by: Allan McRae <allan@archlinux.org>
2010-10-14 13:17:40 +10:00
Allan McRae fbcadebcab Clean-up parsing local database
Remove unnecessary parsing of fields not found in local desc files.
Leave %FORCE% parsing as this likely will make an appearance in desc
files in the future.

Signed-off-by: Allan McRae <allan@archlinux.org>
2010-10-14 13:17:40 +10:00
Allan McRae d39248120e Remove lazy loading of deltas
Local packages do not have deltas so remove lazy loading of delta
information.

Signed-off-by: Allan McRae <allan@archlinux.org>
2010-10-14 13:17:40 +10:00
Allan McRae e464339e3b Move and rename splitname
The splitname function is a general utility function and so is better
suited to util.h.  Rename it to _alpm_splitname to indicate it is an
internal libalpm function as was the case prior to splitting local and
sync db handling.

Signed-off-by: Allan McRae <allan@archlinux.org>
2010-10-14 13:17:40 +10:00
Allan McRae 448f78c067 Restrict visibility of checkdbdir and get_pkgpath
These functions are only needed by be_local and were only promoted
to db.{h,c} as part of the splitting of handling the local and sync
dbs.  Move them into be_local.c and make them static again.

Signed-off-by: Allan McRae <allan@archlinux.org>
2010-10-14 13:17:39 +10:00
Allan McRae 5e61f07735 Populate sync db from archive
Read in list of packages for sync db from tar archive.

Breaks reading in _alpm_sync_db_read and a lot of pactests (which
is expected as they do not handle sync db in archives...).

Signed-off-by: Allan McRae <allan@archlinux.org>
2010-10-14 13:17:39 +10:00
Allan McRae fc32faaa6a Completely separate local and sync db handling
Put the db_operations struct to use and completely split the handling
of the sync and local databases.

Signed-off-by: Allan McRae <allan@archlinux.org>
2010-10-14 13:17:39 +10:00
Allan McRae 5b2de3d8ec Separate be_files into be_sync and be_local
The file be_files.c is "split" to be_local.c and be_sync.c in order
to achieve separate handling of sync and local databases.

Some basic clean-up of functions that are only of use for local or
sync databases has been performed and some rough function renaming
in duplicated code has been performed to prevent compilation errors.
However, most of the clean-up and final separation of sync and local
db handling occurs in following patches.

Signed-off-by: Allan McRae <allan@archlinux.org>
2010-10-14 13:17:38 +10:00