| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The request of FS#12950 is implemented.
On the backend side, I introduced a new function, alpm_db_set_pkgreason(),
to modify the install reason of a package in the local database. On the
front-end side, I introduced a new main operation, -D/--database, which has
two options, --asdeps and --asexplicit. I documented this in pacman manual.
I've created two pactests to test -D: database001.py and database002.py.
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
| |
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
And a new --print-format option to configure the output.
This implements FS#14208
Example usage :
pacman -Sp --print-format "%r/%n-%v : %l [%s]" kdelibs
extra/kdelibs-4.3.2-4 : ftp://mir2.archlinuxfr.org/archlinux/extra/os/i686/kdelibs-4.3.2-4-i686.pkg.tar.gz [0,00]
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
| |
Pacman's long option parsing used hardcoded numbers to identify them.
This is not good practice, so replace them with enumeration constants.
Signed-off-by: Laszlo Papp <djszapi@archlinux.us>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This re-implements the --ask option which was removed in commit
1ff8e7f364a9f640ada7526384646d510ac29967.
This option does not have to be exposed to the user (help,doc,etc), but is
very very useful for pactest if we want to have more coverage there.
This was rewritten in a smarter way, without code duplication. And with a
different behavior : this option is now only used to inverse default
behavior to questions.
We still use bit operations based on the following struct :
/* Transaction Conversations (ie, questions) */
typedef enum _pmtransconv_t {
PM_TRANS_CONV_INSTALL_IGNOREPKG = 0x01,
PM_TRANS_CONV_REPLACE_PKG = 0x02,
PM_TRANS_CONV_CONFLICT_PKG = 0x04,
PM_TRANS_CONV_CORRUPTED_PKG = 0x08,
PM_TRANS_CONV_LOCAL_NEWER = 0x10,
PM_TRANS_CONV_REMOVE_PKGS = 0x20,
} pmtransconv_t;
for each conv matched, the default answer is inversed.
--ask 0 : all default answers are preserved
--ask 4 : only conflict question is inversed
--ask 63 : all questions are inversed (63 == 1+2+4+8+16+32)
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
| |
This allows a frontend to define its own download algorithm so that the
libfetch dependency can be omitted without using an external process.
The callback will be used when if it is defined, otherwise the old
behavior applies.
Signed-off-by: Sebastian Nowicki <sebnow@gmail.com>
[Dan: minor cleanups]
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements FS#13877. Add a new option "-Qk" which checks if all of the
files for a given package (or packages) are really on the system (i.e. not
accidentally deleted). This can be combined with filters and other display
options. It also respects both the --quiet and --verbose flags to give
varying levels of output.
Based on the original patch by Charly Coste <changaco@laposte.net>, thanks
for your work!
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
| |
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The HoldPkg feature is even more important when the packages to be held are
pulled automatically by pacman, in a -Rc and -Rs operation. Before, it only
applied when the packages were explicitly requested by the user to be
removed. This patch extends holdpkg to -Rc and -Rs by doing the HoldPkg
check just before trans_commit.
Additionally, the whole HoldPkg stuff was moved to the front-end.
I changed the default behavior to "don't remove", so I modified remove030.py
pactest as well.
See also: FS#9173.
Original-work-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch kills one of our hackish pseudo transactions: PRINTURIS.
(The other one is -Sw)
From now on, front-end must not call trans_commit in case of -Sp,
it should print the uris of target packages "by hand" instead.
PRINTURIS flag was removed, NOCONFLICTS flag can be passed to skip
conflict checks.
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
| |
This option wasn't used.
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch offers a way to fix FS#9228.
By putting "SyncFirst = pacman" in pacman.conf, the version check will
happen before the transaction really starts, and before any replacements is
made.
Otherwise, no version check is done.
The sync301 pactest was updated to use this SyncFirst option.
Example session with SyncFirst = pacman, and a newer pacman version
available :
$ pacman -Su (or pacman -S <any targets>)
:: the following packages should be upgraded first :
pacman
:: Do you want to cancel the current operation
:: and upgrade these packages now? [Y/n]
resolving dependencies...
looking for inter-conflicts...
Targets: pacman-x.y.z-t
Total Download Size: x.xx MB
Total Installed Size: x.xx MB
Proceed with installation? [Y/n] n
As Nagy previously noted, doing this check on any -S operations might look
intrusive, but it can be required.
For example, the case where you want to install a package with versioned
provisions, using a pacman version which didn't support that feature yet
(and there is already a newer pacman in sync db supporting it).
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As it was already mentioned several times, the new -Sc behavior in 3.1 is
great, but only when the package cache is not shared.
This option has two possible values : KeepInstalled and KeepCurrent
With KeepCurrent, -Sc will clean packages that are no longer available in
any sync db, rather than packages that are no longer in the local db. The
resulting behavior should be better for shared cache.
Ref :
http://www.archlinux.org/pipermail/pacman-dev/2008-February/011140.html
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
| |
From the man page :
"This is pretty useless and we're not sure why it even exists."
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Change the pacman_upgrade stub function to do what pacman_add used to do so
we can eliminate pacman_add. Move the code to the more-descriptive name of
upgrade.c.
Note that we have made no changes to the backend libalpm, where an ADD type
transaction could still be supported.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
| |
There is still a lot of code that could be cleaned up internally.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
| |
It turns out the orphan name was misleading. Real orphans are packages
installed as dependency no longer required by any others (-Qtd).
The -t option only shows package not required by any others, so --unrequired
describes it better.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
| |
Update the GPL boilerplate to direct people to the GNU website for a copy of
the license, as well as bump all of Judd's copyrights to 2007.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I made pacman path handling a bit odd with my rootdir changes a while back
in order to increase flexability. However, it had a bit of a drawback in
that dbpath/logfile/etc. would not default to being under the rootdir if
that was the only parameter you specified in the config file or on the
command line. (Note: logfile handling was always broken due to the explicit
logfile line required in config files)
Pacman now works as follows:
if a rootdir is specified but not dbpath or logfile:
attempt to place the logfile and dbpath in their default locations under
root
if an explicit dbpath/logfile is specified:
interpret these as absolute paths, regardless of the rootdir setting
if nothing is specified:
fall back to configured defaults
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently this only affects -Ss, -Sl, and -Q to output less information (only
package names).
In the future, we can reuse this flag for other things as well.
[Aaron: rewritten as a front-end flag]
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
[Dan: squashed commits together]
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
| |
Run the kernel's cleanfile script on all of our source files.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
| |
This will be used in the next commit.
Signed-off-by: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
| |
Instead of declaring the extern variable in every *.c file, include it in
the header file that makes sense. This means handle.h for the handle, and
conf.h for the pacman side config object.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
| |
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit dfc85cb5f516ffbcff557522e9703c5c7d88b047
and b6f3fe6957d0206485eac98fb2120578b75d0058.
This DB check is already in testdb (among others).
Also testdb now uses the db path set at make time by default,
so specifying the db path is optional.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
| |
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A bunch of changes related to my first "real" install of pacman-git into
/usr/local and trying to use it.
* Shift some uses of free -> FREE in libalpm.
* Move stat and sanity checks of config paths into libalpm from the
config and argument parsing in pacman.c.
* Fix issue where dbpath still was not defined early enough due to its
requirement for being used in alpm_db_register. This should be rewritten
so it doesn't have this dependency, but this will work for now.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
| |
The t shortcut for --test was removed,
the orphan option (previously -Qe) was renamed to -Qt,
-Qe lists all packages installed explictly,
and -Qd lists all packages installed as dependencies.
Besides, t can be combined with either e or d.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
This replaces the former -D operation that was undocumented and rather
hacky. It can be used with add, upgrade, or sync transactions and will affect
all packages installed. Should close FS #7193.
Also tell makepkg to use this new flag.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
| |
After adding a alpm_db_check() operation in the back end, we can call it
in the front end and present a user-friendly interface to it.
Inspired-by: VMiklos <vmiklos@frugalware.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
| |
Add pm_printf, pm_fprintf, and pm_vfprintf to the pacman frontend for use by
debug printing and other output messages from pacman. These will be
incorporated into the log callback functions in the next iteration of
changes.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
| |
Move chomp, usecolor, and showsize out of the backend and into the
pacman frontend as they are pacman-specific options and not related
to the behavior of libalpm.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
This patch adds a -z|--showsize option to the -Q and -S commands. The
option displays the size of individual packages. This is something that
I have wanted for a while, and there is a feature request for it.
Signed-off-by: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
| |
* Remove libintl.h from most files, as we only need to include it once in
util.h where _() is defined.
* Remove other unnecessary header inclusions.
* Remove a macro that was only used once and replaced it with actual code.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
used instead
* Allow -T/--deptest to work without root privileges
|
|
|
|
|
|
|
|
| |
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();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
| |
* renamed pmlist_t -> alpm_list_t
* made alpm_list_t a public type (alpm_list.h header)
* removed additional storage for registered DBs in pacman source
* some code cleanup
* removed duplicate (pm)list_display functions from pacman source
* misc code cleanup
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(no PKGBUILD)
* libalpm api changes - move from a _getinfo(p, WHAT_WE_WANT) scheme to a
typesafe _get_what_we_want(p) scheme [not 100% complete yet]
* some const correctness changes
* removal of PM_* types in alpm.h in favor of the pm*_t types used throughout
libalpm
|
|
|
|
| |
to list. The diff should show you 8)
|
|
|
|
| |
- downloadonly implies FLAG_NOCONFLICTS
|
| |
|
| |
|
| |
|
| |
|
| |
|