Age | Commit message (Collapse) | Author |
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Begin enforcing the need to pass a handle. This allows us to remove one
more extern handle declaration from the backend.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This requires a lot of line changes, but not many functional changes as
more often than not our handle variable is already available in some
fashion.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This is the first in a series of patches to update the API to remove the
implicit global handle variable.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
The few remaining instances were utilized for buffers in calls to
snprintf() and realpath(). Both of these functions will always ensure
the returned value is padded with '\0', so there is no need for the
extra byte.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
When only downloading a package that is in IgnorePkg, pacman
incorrectly asks about installing.
e.g. with <pkg> in IgnorePkg in pacman.conf:
> pacman -Sddw <pkg>
:: <pkg> is in IgnorePkg/IgnoreGroup. Install anyway? [Y/n]
This output is now silenced when downloading only.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Conflicts:
src/pacman/callback.c
|
|
If it is different than the raw installed size metric we already show,
compute the net upgrade size. For some sync operations, this can even be
negative if newer packages are smaller than the ones they replace
locally. Implements FS#12566.
Example:
Targets (1): telepathy-glib-0.14.7-1
Total Download Size: 1.07 MiB
Total Installed Size: 15.72 MiB
Net Upgrade Size: -0.29 MiB
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
If getcols() returns 0, we were getting stuck before in a loop of no
return. Teach getcols() to take a default value to return if the width
is unknown, and use this everywhere as appropriate.
Also make a few other cleanups while diagnosing this issue, such as
const-ifying some variables.
Noticed-by: Dave Reisner <d@falconindy.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Pang Yan Han <pangyanhan@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Conflicts:
lib/libalpm/trans.c
src/pacman/query.c
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This is at best a hack around the way we currently do our --print magic,
but at least prevents someone from shooting themselves in the foot as
indicated in FS#24287.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This removes the need to strdup() the section name at every decent into
an Include statement, as well as having duplicate DB pointers around
that are never used independently.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Currently we have one call that has all sorts of crazy behavior and doesn't
make a whole lot of sense. Go from one method to the normal four methods we
have for all of our other lists we use in the library to make it a lot
easier for a frontend to manipulate server lists.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This ensures we call any alpm_option type functions before registering
databases, making sure all paths and other defaults (e.g. sig
verification levels) have been set first. This will ensure we can
continue to allow crazy config files where [options] doesn't come first.
The diffstat on this commit is misleading; view with
-w/--ignore-all-space to get a better idea of what needed to be touched.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Use a few structs to hold configuration values we change given certain
options so we can be const-correct with string assignment across the
board. Behavior should be completely unchanged.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
These are places where we stuck a string constant in a variable not
marked as const.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Both md5sum verification and PGP verification can and should be done at
package load time. This allows verification to happen as early as
possible for packages provided by filename and loaded in the frontend,
and moves more stuff out of sync_commit that doesn't really belong
there. This should also set the stage for simplified parallel loading of
packages later down the road.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
The various "level" values were a bit crazy to decipher, and we were
doing some very interesting comparisons in certain places. Break it out
into two parameters instead so we can seperate the type from the extra
information display, and do things accordingly.
Nothing changes with the display of any of the five types we currently
show: -Si, -Sii, -Qi, -Qii, -Qip.
Something to note- we should expose the PKG_FROM enum type somehow, this
patch leaves the door open to do that quite easily.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This does touch a lot of things, and hopefully doesn't break things on
other platforms, but allows us to also clean up a bunch of crud that no
longer needs to be there.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This is the standard, and we have had a few of these introduced lately
that should not be here.
Done with:
find -name '*.c' | xargs sed -i -e 's#if (#if(#g'
find -name '*.c' | xargs sed -i -e 's#while (#while(#g'
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
* add _alpm_db_get_sigverify_level
* add alpm_option_{get,set}_default_sigverify
And set the default verification level to OPTIONAL if not set otherwise.
Signed-off-by: Dave Reisner <d@falconindy.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dave Reisner <d@falconindy.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
If enabled, displays package lists for upgrade, sync and remove
operations formatted as a table. Falls back to default list display if
insufficient terminal columns are available.
Example output:
:: Starting full system upgrade...
:: Replace libjpeg with testing/libjpeg-turbo? [Y/n]
resolving dependencies...
looking for inter-conflicts...
Remove (1):
Name Old Version Size
libjpeg 8.3.0-1 0.83 MB
Total Removed Size: 0.83 MB
Targets (5):
Name Old Version New Version Size
libjpeg-turbo 1.1.0-1 0.20 MB
linux-firmware 20110201-1 20110227-1 8.23 MB
ncurses 5.7-4 5.8-1 0.92 MB
ppl 0.11.1-1 0.11.2-1 2.74 MB
v4l-utils 0.8.1-1 0.8.3-1 0.23 MB
Total Download Size: 12.32 MB
Total Installed Size: 58.82 MB
Signed-off-by: Jakob Gruber <jakob.gruber@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
table_display takes a list of lists of strings (representing the table
cells) and displays them formatted as a table.
The exact format depends on the longest string in each column.
Signed-off-by: Jakob Gruber <jakob.gruber@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Row handling is moved to its own function in preparation for verbose
package lists.
Signed-off-by: Jakob Gruber <jakob.gruber@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Display {KiB, MiB, ...} instead of {KB, MB, ...} since that's what's
actually being displayed.
Signed-off-by: Jakob Gruber <jakob.gruber@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Converts the given size in bytes in two possible ways:
1) target_unit is specified (!= 0): size is converted to target unit.
2) target_unit is not specified (== '\0'): size is converted to the first
unit which will bring size to below 2048.
If specified, label will point to the long label ('MB') if long_labels is
set or the short label ('M') if it is not.
Dan: use '\0' rather than 0 for the special value as a matter of coding
style for char variables.
Signed-off-by: Jakob Gruber <jakob.gruber@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Dan: The commit message originally referenced "VerbosePkgLists", but I'm
going to change the name of the option. In addition, this patch serves
a purpose being standalone- we should really do things like this with
-S --print and hopefully -Q --print in the future.
Signed-off-by: Jakob Gruber <jakob.gruber@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Conflicts:
lib/libalpm/alpm.h
lib/libalpm/trans.c
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Currently the only error case then when handle == NULL.
However several handle functions return -1 on this error,
and a uniform API makes things simpler.
Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
|
|
spotted by clang-analyzer (strcmp with NULL rpath is bad)
Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Conflicts:
lib/libalpm/be_sync.c
lib/libalpm/db.c
src/pacman/util.c
|
|
clang 3.0 git complained about these
Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Addresses FS#23492, where the question was shown without knowing what
one was answering to. Ensure we flush our output streams before printing
the question, and flush the stream on which we ask the question before
waiting for an answer.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
Signed-off-by: Andrea Scarpino <andrea@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Addresses FS#20538
Signed-off-by: Dave Reisner <d@falconindy.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Conflicts:
lib/libalpm/deps.c
|
|
* Address FS#23433 by documenting -d vs. -dd
* Drop the useless "as well", "also", "too", and "that won't break
packages" strings from -R usage
* Fix alignment of multiline strings in source (no string change)
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
Fixes FS #23369
Signed-off-by: Ray Kohler <ataraxia937@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|