Age | Commit message (Collapse) | Author |
|
This displays the download size, taking into account delta files and
cached files.
This closes FS#4182.
Signed-off-by: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Delta files will be used if the size is smaller than a percent
(MAX_DELTA_RATIO) of the package size.
Signed-off-by: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This will allow deltas and packages to share the md5sum checking code.
Signed-off-by: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
(Dan: cleaned up one if statement)
Signed-off-by: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
In one of the original clean up patches[1] I changed the search path
for stripping binaries and libraries. This resulted in only
usr/{bin,sbin,lib} being searched. This patch reverts that change.
[1] 721ceee1e2c9b18425d84cf39f6541b2f04072b3
Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
|
|
The code didn't match the following comment :
"A depends on B through n depends <=> A listed in B's requiredby n times"
It stopped at n=1 with a break.
I was surprised to see this case happens in real, that's how I noticed the
bug: wine depends on both freeglut and glut, while freeglut provides glut.
So when installing wine, the update_depends function listed wine twice in
freeglut's requiredby. But the compute_requiredby function (used when
installing freeglut, and used by testdb) listed wine only once in
freeglut's requiredby. That made testdb unhappy.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We print the total to two decimal places, so there is no real need for
rounding of the values. Remove the rounding and switch all output to two
decimal places.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Commit 4853a4aad97fe36f9237ffb7356201adab507a1c used the tmpdir variable
for checking the existence of /bin/sh, without resetting it.
This caused /bin/sh to be deleted during the cleanup part, as soon as a scriptlet
other than pre_upgrade or pre_install was executed.
For example, on the first post_upgrade during a -Su.
I introduced two variables : clean_tmpdir and restore_cwd, for deciding what should
be done in the cleanup part.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
|
|
This code assumed that DBPath was under RootDir, while this is not necessarily the case :
pacman doesn't enforce anymore than DBPath is under RootDir.
So now, all scriptlets will be put somewhere in RootDir/tmp/, so that when it chroots in RootDir,
the scriptlets are still available inside the chroot.
This also removes the need of normalizing both dbpath and rootdir, in order to do computation on the paths.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
|
|
Root is needed for most install / remove operation, because it's needed
for chrooting, for running scriptlets.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
|
|
This is needed because 'xdelta delta' returns 1 even when the delta
creation succeeds. This was causing makepkg to exit after the command
due to bash's -e option.
Some information from the xdelta man page:
The delta command exits with status 0 to indicate that no differences
were found, with status 1 to indicate that some differences were found,
and with status 2 to indicate an error of some kind.
Signed-off-by: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We had way too much going on with the Doxygen manpage generation. Clean it
up quite a bit by removing directory manpages, using relative paths, not
having a manpage for every single alpm function, and ensuring internal
functions are not documented publicly.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We shouldn't use the _alpm prefix (copy-paste issue, no big deal).
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Fix Aaron's busted-a** commit. :P
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
This fixed a few of our formatted output strings that were broken before
but never being checked.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Some of the error messages in _alpm_pkg_load failed to use the pkgname
value when printing, which made error messages rather hard to decode.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
|
|
Change the default visibility of libalpm functions to internal instead of
hidden- this allows for slightly better optimization because it tells GCC
that the function can never be called outside of the current module (see
http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html).
Also added some attributes to the pacman print functions so that they check
the format strings being passed to them.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
If /bin/sh is missing in the root directory, scriptlets cannot be executed, as
we're explicitly calling it.
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
When the -Sy operation failed, the lock wasn't removed because
alpm_trans_release wasn't called. This is fixed now.
Also, after my last change in commit 52e7e6d74733f7a431376a9e528c4fe4d3732068 ,
Sp didn't do anything anymore.
That's because needs_transaction returned false for -Sp, so the sync transaction
wasn't run. However, the current implementation of -Sp requires a sync transaction.
Also, since a transaction creates the lock file at the beginning, and releases it
at the end, this mean that -Sp requires root access anyway..
I think I understand now why Aaron found that the current -Sp implementation is hackish :)
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
Signed-off-by: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
I just moved the root path check out of needs_transaction, and put it directly
in pacman.c . I think this part is alright.
For the other problems, I thought about doing the transaction first, in a new
sync trans function, which will init and release a transaction. And then doing
the commands like -Ss / -Sl / -Sg / -Si.
The problem is that for commands like -Sys / -Syl / etc, only the refresh part
of the transaction should be done. So I had to introduce an ugly sync_only
hack.
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
The md5 routines are one of the chokepoints of libalpm (main chokepoint being
archive extraction). Although IO delay causes a lot of it, we can at least
inline some of the md5 stuff as we aren't that concerned about space and
eliminate quite a few function calls.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
The code for setting the lastupdate file path still referenced both the
root and dbpath, when we should only be using dbpath. Fix it.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Make sure we reset both the bold attribute and the color attributes when it
is necessary.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
The -A,--ignorearch option was added and given help text, but never actually
listed as valid to the option parser. Fix this.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
Included options are -g, -i, -s, and -l
All of these will sync the DB if -y is specified and permissions are
appropriate.
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
Added needs_transaction, putting out "hey do we need root?" tests in one place.
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
Yeah, I added a space. It deserves its own commit.
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
The strings differed in quotes only, this way we have only one i18n string for
translation
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
This was removed a while ago, but the prototype was still hanging out.
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
Packages and DBs now support using the UNIX epoch (seconds since Jan 1, 1970)
for use in builddate and installdate. This will only affect newly built
packages. Old existing packages with the text format are still supported, but
this is deprecated.
In the case of removal of text time support, this code will fail gracefully,
returning the start of the epoch for broken packages.
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
In most cases, we want to fully scan a package when we load it, which serves
as a integrity verification check. However, there are times when it is only
desired to read the metadata and nothing else, so allow the caller of pkg_load
to choose the behavior they need.
This pays big dividends in speeding up pacman cache cleaning functionality.
Old (729 packages):
real 1m43.717s
user 1m20.785s
sys 0m2.993s
New (729 packages):
real 0m25.607s
user 0m19.389s
sys 0m0.543s
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
pacman/callback.c already did the work I set out to do with this commit, so
update the comments accordingly in the frontend and backend.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Partial cache cleaning was eliminated in a previous commit because it relied
on package naming conventions. Re-add it the correct way- we actually open
up each package in the cache and get a name and version out of it. If the
name and version match that of an installed package, keep it. If the package
is not installed or the version does not match the locally-installed version,
get rid of it.
This can easily be modified if some other heuristic of keeping and removing
packages is desired, or if we should clean out the cache dir of any files
that are not packages, etc.
The biggest current problem with this new approach- speed. Here is one run
on my local machine, going from 1643 to 729 packages in the cache (753 in
the local DB):
real 4m25.829s
user 3m22.527s
sys 0m6.713s
This is likely best addressed by the package loading scheme, which may be
loading the entirety of each package archive, which is a waste when we only
need the .PKGINFO file read.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Previously, package names must match a specified scheme or they will cause
pacman add operations to fail. This is not a very intelligent or necessary
way to act, so remove the dependency on the name of the package to be
installed and read all relevant information from the metadata instead.
This does have one causality to be addressed later- pacman cache cleaning
functionality, which has never been phenomenal, just lost most capability.
Signed-off-by: Dan McGee <dan@archlinux.org>
|