Commit Graph

1021 Commits

Author SHA1 Message Date
Juan RP
e95300e952 xbps-install/util: print installed version in pkgs on hold mode. 2015-01-28 18:06:58 +01:00
Juan RP
9bc3275515 xbps-install/state_cb: log XBPS_STATE_UPDATE via syslog too.
This way the updates are also recorded via syslog.
2015-01-28 09:48:20 +01:00
Juan RP
d519ed3d15 xbps-checkvers: misc changes to fix issues I've found.
- Clear completely the rcv struct.
- Remove unapplicable free()a before assignment (wtf)
- Fix usage, -C expects a path to a directory not a filename.
- Remove obsolete xbps.conf handling, this is unnecessary (xbps.d(5)).
- Random tweaks after a quick inspection.
2015-01-22 18:44:39 +01:00
Juan RP
f11dc1a7b1 xbps-query.8: mention that -p is also accepted with -S (show/default mode). 2015-01-18 19:14:30 +01:00
Juan RP
94d0e4e131 xbps-query(8): --regex now matches EREs in case insensitive mode. 2015-01-18 17:50:26 +01:00
Juan RP
1251583154 xbps-{pkgdb,reconfigure}: flush pkgdb in case it was modified.
Regression introduced with the recent xbps_end() changes.
2015-01-17 12:06:13 +01:00
Juan RP
676888b5c1 xbps-query: optimize the search mode with --regex (compile ERE once). 2015-01-14 20:53:01 +01:00
Juan RP
8f1e7d9e55 question: accept enter key as default preset value. 2015-01-12 10:22:30 +01:00
Juan RP
f7142412c9 utils: implement issue #73 (only pay attention to the first char).
The answer can now just be 'y/Y' to accept it or 'n/N' to deny it.
Close #73
2015-01-11 16:52:04 +01:00
Juan RP
b23855f692 xbps_repo_close: only unlock the file lock if repo was opened as such.
If xbps_repo_open() was called with the lock arg set, xbps_repo_close()
will now unlock the repo file lock, without the need to set it.

This avoids the need to always unlock the file lock even if it wasn't
locked previously. This also introduceds an ABI/API break, but this
way it's cleaner.
2015-01-11 09:11:38 +01:00
Juan RP
9aaff4e2d0 xbps-dgraph: -m --metadata was documented but not enabled in getopt (oops). 2015-01-11 08:58:02 +01:00
Juan RP
d4a25b7ebf xbps-remove: xbps_pkgdb_unlock -> xbps_end. 2015-01-10 19:26:24 +01:00
Juan RP
ee175a2a68 Improve xbps_end() and use it before exit(3)ing.
- Simplify xbps_repo_open::repo_get_dict().
- Use xbps_end() in the utils where necessary.
- Make xbps_end() call xbps_pkgdb_unlock() if necessary.
- Make xbps_end() release rpool resources.
- Make xbps_end() release resources from xbps_handle.
- Fixed 90% of reported leaks (still reachable at exit) from valgrind.

That was to silence valgrind's memcheck with --leak-check=full.
2015-01-10 19:11:31 +01:00
Juan RP
d98442d84e xbps-{install,query}.8: absolute path in --repository is not a requirement now. 2015-01-10 12:02:20 +01:00
Juan RP
b09faadebc xbps-{install,query}: --repository now accepts relative paths in local repos. 2015-01-10 11:59:31 +01:00
Juan RP
283fb4bc06 xbps-remove: misc changes to the clean-cache mode.
- If orphans mode is not set, exit directly.
- Simplify the clean-cache code to avoid unnecessary allocs in some cases.
2015-01-10 11:13:26 +01:00
Juan RP
ee9aa98a64 xbps-query: some minor memleaks found by valgrind. 2015-01-10 08:01:36 +01:00
Juan RP
cdf7fc81af xbps-query(8): performance improvement to the ownedby mode with --regex.
Only compile the ERE once, rather than on any file. Found and suggested
by Christian Neukirchen (@chneukirchen).
2015-01-08 10:32:08 +01:00
Juan RP
df1608d47d xbps-pkgdb: drop packaged-with from pkgdb; unnecessary and obsolete. 2014-12-26 15:53:02 +01:00
Juan RP
59096a866b bin/*/*.8: mention system configuration directory. 2014-12-15 09:24:55 +01:00
Juan RP
c8ecf4ac6c xbps-reconfigure(8): new option -i, --ignore to ignore pkgs with -a, --all.
-i, --ignore can be specified multiple times and can be used to
ignore configuration of those packages while configuration of all
packages is being performed.

Close #67
2014-12-09 13:10:48 +01:00
Juan RP
925ec15c3d xbps-rindex: do not add "packaged-with" obj to the index.
With our current xbps-src it's unnecessary because the current git
revision is already recorded in "source-revisions".
2014-12-09 12:41:33 +01:00
Juan RP
b4ce0f1d0f Fix #71 (Tiny display bug in the column output mode) 2014-12-09 12:33:58 +01:00
Juan RP
395e147c6c xbps.d(5) - XBPS configuration directory 2014-12-09 11:41:35 +01:00
Juan RP
c8d91348a1 xbps-rindex.8: improve -s --sign mode. 2014-12-06 11:23:41 +01:00
Juan RP
70d5cea79c xbps-{install,query}.8: document -R and --repository independently. 2014-12-06 11:21:30 +01:00
Juan RP
4d5eb2b18e xbps-{install,query}.8: --repository opt expects abs paths for local repos. 2014-12-06 11:10:33 +01:00
Juan RP
8839669710 xbps-query/list: pass correct length to strlcat to truncate results. 2014-12-02 13:06:29 +01:00
Juan RP
a71e428610 xbps-rindex.8: clarify abs paths, detail -f with -a. 2014-11-29 08:27:33 +01:00
Juan RP
b78d78a1cd xbps-dgraph: wrote a manual page. 2014-11-29 08:18:36 +01:00
Juan RP
f890a17b84 xbps-dgraph: update options to match other utils. 2014-11-29 08:06:26 +01:00
Juan RP
fe9a795995 xbps-{install,query}: added -M --memory-sync option.
This explicitly enables the in memory fetch/store of remote repository
data archives mode, ignoring existing on-disk repodata archives.

This changes the previous behaviour of falling back to this mode if no
on-disk repodata archives were found.

Thanks to @Gottox and @dominikh for comments.
2014-11-27 10:42:05 +01:00
Juan RP
ad9cbaf777 xbps-query: print 'source-revisions' obj as any other metadata obj.
There's no reason to special case it anymore.
2014-11-25 09:01:16 +01:00
Juan RP
89d11e871f xbps-{install,query}: added -i to ignore repos defined in xbps.d.
See the NEWS file for more information.
2014-11-21 10:56:41 +01:00
Juan RP
a72a52da1d xbps-uhelper: added 'getsystemdir' target to print path to <sharedir>/xbps.d. 2014-11-21 10:40:11 +01:00
Juan RP
1789e527a9 Gratuitous ABI break: xbps_binpkg_get_xxx() -> xbps_archive_fetch_xxx(). 2014-11-21 09:51:57 +01:00
Juan RP
7e6b38f951 xbps-dgraph: take into account virtual pkgs in fulldepgrah mode (-f). 2014-11-20 19:49:57 +01:00
Juan RP
edb613f1d5 xbps-dgraph: remove dead code; use more saner defaults. 2014-11-20 17:15:43 +01:00
Juan RP
4b3a4159a0 xbps-dgraph: update graph label for -f mode 2014-11-20 16:28:47 +01:00
Juan RP
8c4d41ccfd xbps-dgraph: simplify. 2014-11-20 16:24:43 +01:00
Juan RP
0b50672a33 xbps-dgraph: added support to generate full dependency graphs.
- Full dependency graphs can be generated with -f in pkgdb or repository
  mode (-R).
- Removed -o and writing dot files by default, the generated dot file
  is written to stdout.
- Misc tweaks that I cannot remember right now.
2014-11-20 13:32:21 +01:00
Juan RP
2e3213de25 xbps-dgraph: remove code to colorize optional objs (unmaintanable). 2014-11-20 10:48:28 +01:00
Juan RP
1bae26606e Introduce xbps_{pkgdb,rpool}_get_pkg_fulldeptree().
These routines return a xbps_array_t with a full sorted dependency graph
for the target pkg, by querying pkgdb or rpool.

Update xbps-query(8) to use the new libxbps API.
2014-11-20 09:23:51 +01:00
Juan RP
2c01994497 xbps-dgraph: random changes as anticipation of more features.
* Rather than requiring a config file to be generated with -g, if -c
  is unset and default config file does not exist, use builtin defaults.
* Always process all available pkg objs.
* -R is now used to enable repository mode rather than checking revdeps.
* -o removed; simply use <pkgname>.dot.
2014-11-19 18:21:32 +01:00
Juan RP
428a747fad Fix #69 (No way to set globally a custom architecture)
The "architecture" configuration keyword is now available to override
the native machine architecture returned by (uname(2)).

The XBPS_ARCH environment variable still has preference.
2014-11-19 11:36:09 +01:00
Juan RP
83d00e4e8c xbps-query/search: pass correct length to strlcat to truncate results. 2014-11-18 07:35:25 +01:00
Juan RP
d53b2c57cc xbps-query.8: more detailed info about --cat. 2014-11-17 19:40:35 +01:00
Juan RP
77c6c3e504 Introduce xbps_binpkg_get_file_into_fd() and use it for xbps-query(8) --cat.
This allows you to print to stdout any file stored in a binary package,
locally or remotely!

$ xbps-query -R --cat=/usr/bin/ls coreutils > ls
$ file ls
ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=7a195fc46d1d5cdca32bfccd3b30f81784e342ed, stripped
$
2014-11-17 18:43:08 +01:00
Juan RP
db14524cf3 xbps-query: unbreak -f/--files mode. 2014-11-17 16:10:55 +01:00
Juan RP
a6516505e9 xbps-query(8: added --cat=FILE mode support.
- This mode prints to stdout the matching FILE stored in a binary package.
- ABI break: renamed xbps_get_pkg_plist_from_binpkg() xbps_binpkg_get_plist().
- Added xbps_binpkg_get_file() as a generic way to get pkg file contents.
- Removed useless comments from xbps_api_impl.h.
2014-11-17 15:45:46 +01:00
Juan RP
3afb9d709d Get rid of repodata index-files; the archive is now 8x smaller.
See the NEWS file for more information.
2014-11-13 17:09:43 +01:00
Juan RP
fcaf18c494 bin/xbps-install/util.c: add a newline before the header (requested by chris2). 2014-11-13 15:25:35 +01:00
Juan RP
039a155918 xbps-create(8): fix #64 "incorrect installed-size with hardlinks" 2014-11-12 12:37:35 +01:00
Juan RP
84be0dcd8b xbps-rindex: use correct argv index. 2014-11-06 11:33:04 +01:00
Juan RP
51ec53846c xbps-rindex: added 'd' to shortopts. 2014-11-06 11:14:29 +01:00
Juan RP
40c3e048b0 xbps-rindex: added -d/--debug option. 2014-11-06 10:54:52 +01:00
Juan RP
5b522109f7 Replaced config/system {repo,preserve,virtualpkg}.d with a single directory.
See the NEWS file for more information.
2014-11-06 09:58:04 +01:00
Juan RP
578c3add0c xbps-uchroot: mount sys/dev recursively to access to /dev/pts (thanks chris2). 2014-11-05 15:57:21 +01:00
Juan RP
42bbc60154 xbps-install: fix cnt stats and align issues in the column output mode.
- The counter stats were not taken into account.
- Align version/new version with pkgs that have long versions (chromium).
2014-11-05 10:16:57 +01:00
Juan RP
59781f4e91 bin/xbps-install/fetch_cb.c: use STDOUT_FILENO. 2014-10-30 11:25:37 +01:00
Juan RP
b179c16fc0 xbps-{install,remove}: implemented column/wide output mode.
See https://github.com/voidlinux/xbps/issues/63 for info.

Close #63
2014-10-30 11:23:10 +01:00
Juan RP
3f7cd86d9d bin/xbps-query/list.c: remove unused header. 2014-10-30 11:00:01 +01:00
Juan RP
12e18ae579 bin/xbps-install/util.c: use STDOUT_FILENO. 2014-10-30 10:59:42 +01:00
Juan RP
15943d990c xbps-query: fix --fulldeptree with multiple pkgs using vpkgs and non vpkgs. 2014-10-29 09:46:54 +01:00
Juan RP
fa6f20ec4f xbps-pkgdb: rework symlinks checks to avoid false positives with -r. 2014-10-25 10:11:46 +02:00
Juan RP
87ca42f399 Remove xdelta support: it never worked and wasn't fully implemented. 2014-10-24 11:04:51 +02:00
Juan RP
adc0643ee4 Fully switch to zplists. 2014-10-17 10:27:58 +02:00
Juan RP
84a16c86cc xbps-query/search: simplify. 2014-10-17 10:09:34 +02:00
Juan RP
b157407684 bin/xbps-remove/clean-cache.c: CID 62747 (toctou) 2014-10-08 10:09:58 +02:00
Juan RP
d4374fb9af xbps-rindex: fix CID 62741 correctly (untrusted value as argument) 2014-10-07 10:11:14 +02:00
Juan RP
8d4a01baa4 bin/xbps-checkvers/main.c: CID 62712 (NULL pointer dereference) 2014-10-07 07:55:54 +02:00
Juan RP
eb0674376f bin/xbps-checkvers/main.c: CID 62711 (NULL pointer dereference) 2014-10-07 07:53:49 +02:00
Juan RP
4a188a433a bin/xbps-rindex/index-clean.c: CID 62708 (NULL pointer dereference) 2014-10-07 07:50:03 +02:00
Juan RP
8c5ef42935 bin/xbps-checkvers/main.c: CID 62705 (argument cannot be negative) 2014-10-07 07:33:28 +02:00
Juan RP
960c3fdcdf bin/xbps-pkgdb/check.c: CID 62721 (argument cannot be negative) 2014-10-07 07:25:25 +02:00
Juan RP
5bec421726 bin/xbps-rindex/index-add.c: add assertions to make coverity happy (CID 62741) 2014-10-06 17:13:06 +02:00
Juan RP
b96d1c9f4e bin/xbps-rindex/sign.c: CID 62699 (dereference NULL return value) 2014-10-05 13:20:18 +02:00
Juan RP
1edd4e2ecf bin/xbps-create/main.c: CID 62678 (unchecked return value) 2014-10-05 12:33:45 +02:00
Juan RP
f74f079d9d bin/xbps-checkvers/main.c: CID 62673 (unchecked return value) 2014-10-05 12:25:58 +02:00
Juan RP
616af5c207 bin/xbps-create/main.c: CID 62713 (dead code) 2014-10-05 12:16:39 +02:00
Juan RP
fe80347a32 bin/xbps-checkvers/main.c: use-after-free (CID 62743) 2014-10-05 10:06:42 +02:00
Juan RP
14da590f41 bin/xbps-checkvers/main.c: fix CID 62667 (2/2) 2014-10-05 09:56:42 +02:00
Juan RP
d006d60497 bin/xbps-rindex/index-clean.c: use-after-free (CID 62752) 2014-10-05 09:47:48 +02:00
Juan RP
15743d20ea bin/xbps-checkvers/main.c: fix CID 62667 correctly. 2014-10-05 09:44:39 +02:00
Juan RP
54b72d8f81 bin/xbps-rindex/index-add.c: fix CID 62685 correctly. 2014-10-05 09:35:42 +02:00
Juan RP
2902a43aab bin/xbps-query/list.c: fix CID 62690 correctly. 2014-10-05 09:31:32 +02:00
Juan RP
3b0917c24a bin/xbps-rindex/index-add.c: use-after-free (CID 62764) 2014-10-05 09:23:03 +02:00
Juan RP
f7441d24cf bin/xbps-create/main.c: fix CID 62686 correctly; all tests pass now. 2014-10-05 08:55:32 +02:00
Juan RP
9f873072b4 bin/xbps-query/list.c: resource leak (CID 62690) 2014-10-05 08:14:17 +02:00
Juan RP
2fe9fbe777 bin/xbps-create/main.c: Out-of-bounds write (CID 62686) 2014-10-05 08:09:42 +02:00
Juan RP
ced1ce4b40 bin/xbps-rindex/index-add.c: resource leak (CID 62685) 2014-10-05 08:06:12 +02:00
Juan RP
0af6db77e6 bin/xbps-remove/clean-cache.c: resource leak (CID 62680) 2014-10-05 08:00:31 +02:00
Juan RP
596a37defa bin/xbps-checkvers/main.c: buffer not NUL terminated (CID 62667) 2014-10-05 07:55:27 +02:00
Juan RP
810c5d8de0 bin/xbps-pkgdb/check_pkg_symlinks.c: buffer not NUL terminated (CID 62665) 2014-10-05 07:43:39 +02:00
Juan RP
b5713ecf12 bin/xbps-rindex/remove-obsoletes.c: resource leak (CID 62695) 2014-10-05 07:40:18 +02:00
Juan RP
73e81addba bin/xbps-rindex/remove-obsoletes.c: resource leak (CID 62707) 2014-10-05 07:34:15 +02:00
Juan RP
62cb6f14e6 bin/xbps-rindex/index-add.c: resource leak (CID 62718) 2014-10-05 07:31:07 +02:00
Juan RP
a15dc24fe8 bin/xbps-pkgdb/check_pkg_symlinks.c: uninitialized pointer read (CID 62730) 2014-10-05 07:23:53 +02:00
Juan RP
83c981884c bin/xbps-query/show-deps.c: initialize a var to make gcc-4.6 happy. 2014-10-04 22:08:07 +02:00
Juan RP
8f25116d54 bin/xbps-install/main.c: rename a var to make gcc-4.6 happy. 2014-10-04 22:05:33 +02:00