| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using totaldownload, we might get into some weird situations where
xfered>total because of bogus CSIZE database entries.
This code adds a sanity check and fallbacks to normal download progress if
needed.
Here is an example using totaldownload on a database with wrong CSIZE, for a
total download of ~26 MB.
Before :
gnome-desktop-2.28.... 1144,3K 678,3K/s 00:00:02 [#################] 4%
gnome-panel-2.28.0-... 4,2M 887,7K/s 00:00:05 [#################] 16%
gnome-applets-2.28.... 13,6M 1083,0K/s 00:00:13 [#################] 52%
gnome-backgrounds-2... 22,9M 964,0K/s 00:00:24 [#################] 87%
gnome-settings-daem... 23,6M 938,5K/s 00:00:26 [#################] 90%
gnome-control-cente... 26,1M 946,1K/s 00:00:28 [#################] 100%
gnome-icon-theme-2.... 27,7M 1465,0K/s 1193046:28:15 [#######----------] gnome-icon-theme-2.... 28,0M 1502,2K/s 1193046:28:15 [########---------] gnome-icon-theme-2.... 28,4M 1582,2K/s 1193046:28:15 [##########-------] gnome-icon-theme-2.... 28,7M 1603,4K/s 1193046:28:15 [############-----] gnome-icon-theme-2.... 29,0M 1604,5K/s 1193046:28:15 [##############---] gnome-icon-theme-2.... 29,3M 1621,0K/s 1193046:28:14 [################-] gnome-icon-theme-2.... 29,6M 1434,8K/s 1193046:28:14 [#################] gnome-icon-theme-2.... 29,6M 974,2K/s 00:00:31 [#################] 113%
After :
gnome-desktop-2.28.... 1144,3K 1038,7K/s 00:00:01 [#################] 4%
gnome-panel-2.28.0-... 4,2M 988,4K/s 00:00:04 [#################] 16%
gnome-applets-2.28.... 13,6M 1190,4K/s 00:00:12 [#################] 52%
gnome-backgrounds-2... 22,9M 1242,9K/s 00:00:19 [#################] 87%
gnome-settings-daem... 23,6M 1193,9K/s 00:00:20 [#################] 90%
gnome-control-cente... 2,5M 1347,4K/s 00:00:02 [#################] 100%
gnome-icon-theme-2.... 3,5M 1205,4K/s 00:00:03 [#################] 100%
Note that gnome-control-center resetted to normal progress mode
(2,5M is the package size, not the total size)
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
| |
./src/pacman/package.c:
- small typo fix
./src/pacman/pacman.c:
- strdup is changed to strndup, because it's safer like in
case of config option
Signed-off-by: Laszlo Papp <djszapi2@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
| |
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
| |
Add more untranslated strings, improve consistency, etc.
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This doesn't quite work, as can be seen by the pactest results:
Total = 179
Pass = 108 ( 60.34%)
Expected Fail = 5 ( 2.79%)
Unexpected Pass = 0 ( 0.00%)
Fail = 66 ( 36.87%)
If you peek inside '_alpm_db_new' when it gets called for the sync
databases, the base dbpath is still at the default value, causing things
like pactest to fail miserably. We need some further work to do fully lazy
loading, and that belongs on master, not maint.
This reverts commit a2cd48960e33043f75c81e0ecbc2d33b20b695fe.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Lazy opening of databases is supported since 34e1413d75.
We don't need that setlibpath call each time we register a database.
Besides this caused a memleak in case setlibpath failed, because setlibpath
exit directly and we did not do the cleanup part (section string was not
freed, and a file descriptor remained open).
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
| |
http://bbs.archlinux.org/viewtopic.php?id=77396
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
| |
For example, if no package is outdated, -Qu will return 1.
This implements FS#15938
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
| |
This fixes FS#15923
PS : duplicated code ftw
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
| |
Skip the SyncFirst dialog, if all the -S packages are SyncFirst packages.
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
This fixes: FS#15675 - pacman can not determine ownership of dangling
symlinks
Using lstat seems more correct than stat for the -Qo operation anyway.
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the user switches from unstable repo to a stable one, it is quite hard to
sync its system with the new repo (the user will see many "Local is newer
than stable" messages, nothing more). That's why I introduced -Suu, which
treats a sync package like an upgrade, iff the package version doesn't match
with the local one's.
I added a new pactest (sync104.py) to test this, and I updated the
documentation of -Su.
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
[Dan: slight doc reword]
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>
|
|
|
|
|
|
|
| |
This implements FS#15142.
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
| |
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes FS#14899. When running an -Sp operation without servers
configured for a repository, we would segfault, so add an assert to the
backend method returning the first server preventing a null pointer
dereference.
In addition, add a new error code to libalpm that indicates we have no
servers configured for a repository. This makes -Sy and -S <package>
operations fail gracefully and helpfully when a repo is set up with no
servers, as the default mirrorlist in Arch is provided this way.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
FS#8905 is fixed. The front-end passes PM_TRANS_FLAG_NOLOCK to the back-end,
so it doesn't lock the database. That's why we don't need root anymore.
I reworked (and renamed) needs_transaction() accordingly. I also added
missing -Sc check there (for example, -Sci didn't print non-root error, but
pacman wanted to lock the database).
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
| |
The pacman --help pages and the manual suggested that only one package can
be upgraded/removed per transaction.
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
| |
This header was used in the code for the function strdup()
that is not used anymore.
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
| |
libgen.h was used for basename() in function main() from src/util/testdb.c
string.h was used for strlen() in function output_cb() from src/util/testpkg.c
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
| |
The old documentation didn't emphasize our filtering options at all, and it
was a bit misleading. ("List ALL...")
I also clarified the description of -Qu.
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
| |
This was the only --quiet operation that showed version information; make it
consistent with the rest.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
| |
With --quiet flag, -Ql doesn't print the package name, just lists the files.
I made --quiet documentation up-to-date (I also added -Sgq/-Qgq).
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pmsyncpkg_t data sructure was removed:
1. pmpkg_t.reason is used instead of pmsyncpkg_t.newreason. (The target
packages come from sync repos, so we can use this field without any
problems. Upgrade transaction also uses this field to store this info.)
2. pmsyncpkg_t.removes was moved to pmpkg_t.removes.
This step requires careful programming, because we don't duplicate packages
when we add them to trans->packages. So we modify sync pkgcache when we
add this transaction-only info to our package. Hence it is important to
free this list when we remove any package from the target list
(remove_unresolvable, remove_conflicts, trans_free), otherwise this could
confuse the new sync transactions (with non-pacman GUI).
Overall, our code became ~100 line shorter, and we can call our helper
functions directly on trans->packages in sync.c, we don't need to maintain
parallel package lists.
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes FS#12059.
Now sync_addtarget can return with PM_ERR_PKG_IGNORED, which indicates that
although the requested package was found it is in ignorepkg, so alpm could
not add it to the transaction. So the front-end can decide what to do.
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
| |
After some irc/forum experiences, I decided to document this option.
However, I left the debug-level undocumented (--debug=2).
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
| |
Don't prompt the user for unignore of IgnorePkg/IgnoreGroup packages,
except for packages explicitly listed for sync by the user. This
eliminates many unnecessary prompts when IgnorePkg/IgnoreGroup is
used.
Signed-off-by: Bryan Ischo <bryan@ischo.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enabled a new prompt to ask the user if they'd like to remove
unresolvable packages from the transaction rather than failing it.
Many pactest tests that used to fail now return success codes, because
pacman now issues a prompt allowing the user to cancel rather than
failing many transactions, and the pactest scripts always choose to
cancel with no error rather than failing. The only net effect is that
the return status of pacman is now 0 in cases where it used to be
nonzero.
Signed-off-by: Bryan Ischo <bryan@ischo.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
| |
alpm_dep_compute_string
This patch introduces the following function name convention:
_compute_ in function name: the return value must be freed.
_get_ in function name: the return value must not be freed.
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
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>
|
|\
| |
| |
| |
| | |
Conflicts:
lib/libalpm/dload.c
|
| |
| |
| |
| |
| |
| |
| |
| | |
When the output is going to a file, glibc seems to buffer way too much
making it hard to monitor progress while tailing a file.
Signed-off-by: Simo Leone <simo@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch slightly modifies pacman.c/_parseconfig():
See FS#12148. Now pacman prints the following error message in that case:
"error: could not register 'unstable' database (could not open database)"
I also added an error message for alpm_db_setserver() error.
I changed the "return(1);" scheme to "ret = 1; goto cleanup;" to make
sure that we free allocated memory and close open files.
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
| |
| |
| |
| |
| |
| | |
Mostly noticed when compiling libalpm/pacman with ICC.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
From now on -Qu is an "outdated package" filter on local database.
(This is a behaviour change.)
This patch fixes some memleaks and makes the code cleaner, for details see
my comment on FS#7884.
FS#11868 is implemented.
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Example usage and output :
> src/util/testdb -h
usage:
testdb [-b <pacman db>] : check the local database
testdb [-b <pacman db>] core extra ... : check the listed sync databases
> src/util/testdb
Checking the integrity of the local database in /var/lib/pacman/
> src/util/testdb core extra testing community
Checking the integrity of the sync databases in /var/lib/pacman/
missing dependency for archboot : bcm43xx-fwcutter>=006-2
missing dependency for xvattr : xfree86
missing dependency for eclipse-ve : eclipse<3.3
missing dependency for flumotion : twisted-web
missing dependency for gg2 : arts
missing dependency for man-pages-cs : groff-utf8
missing dependency for qc-usb : kernel26<2.6.26
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|\| |
|
| |
| |
| |
| |
| |
| |
| | |
Calling printf() in a signal handler can be dangerous, so avoid it by
writing directly which is guaranteed to be safe according to signal(7).
Signed-off-by: Dan McGee <dan@archlinux.org>
|
| |
| |
| |
| |
| |
| |
| | |
Every call to getcols() results in two ioctl() calls, which we really didn't
need as changing the number of columns in mid-print would be pretty crazy.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Because libalpm always returns a root path with a trailing slash, when we
use it to create our unspecified paths we get double slashes in the result.
Use the fix suggested by Jürgen Hötzel to remedy this.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes FS#11339, which is a regression of commit 89c2c5196:
When totaldownload is enabled, the database downloading percent (-Sy) is
always at 0. That is because we have no guarantee that the totaldownload
callback was called by libalpm. In particular, it is not called (and it
would not make sense to) when a single file is downloaded, like it is the
case with databases.
So the correct way to detect if totaldownload should be used is checking
both config->totaldownload and list_total, like it was already done in
several places in the cb_dl_progress function.
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes FS#11331
The newline was lost with commit 9451b2e4f23a3c566fcfe3420c379b3cb3eb1f90.
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
|
| |
| |
| |
| |
| |
| |
| | |
We don't need to zero things out, we are already using calloc for this
purpose.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|\| |
|
| |
| |
| |
| |
| | |
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is more consistent with the private functions :
_alpm_db_get_{pkg,grp}cache
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
These two functions now take directly a package list rather than a database.
checkdbconflicts was renamed to checkconflicts.
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
|