[pacman-dev] Incremental package index support?

2013-03-24 Thread Anatol Pomozov
Hi, I am an update junkie. I do "pacman -Suy" several times a day. One thing I do not like with current pacman is that it redownloads whole index file each time I update system. :: Synchronizing package databases... core 104.4 KiB 104K/s 00:01 [##] 100%

[pacman-dev] Mark outdated packages automatically (aka Livecheck)

2013-03-24 Thread Anatol Pomozov
Hi, I believe in automatization. Any routine work that can be done automatically should be done this way. One such thing that can be improved in Arch project is discovering out-of-date packages. Currently it is done by users who go to https://www.archlinux.org/packages/ find the package and then

Re: [pacman-dev] Incremental package index support?

2013-03-24 Thread Anatol Pomozov
Hi On Sun, Mar 24, 2013 at 10:57 AM, Anatol Pomozov wrote: > Hi, > > I am an update junkie. I do "pacman -Suy" several times a day. One > thing I do not like with current pacman is that it redownloads whole > index file each time I update system. > > :: Synchronizi

Re: [pacman-dev] Mark outdated packages automatically (aka Livecheck)

2013-03-24 Thread Anatol Pomozov
Hi On Sun, Mar 24, 2013 at 11:23 AM, Lukas Fleischer wrote: > On Sun, Mar 24, 2013 at 11:12:05AM -0700, Anatol Pomozov wrote: >> Hi, >> >> I believe in automatization. Any routine work that can be done >> automatically should be done this way. >> >> One

Re: [pacman-dev] Mark outdated packages automatically (aka Livecheck)

2013-03-24 Thread Anatol Pomozov
Hi On Sun, Mar 24, 2013 at 11:33 AM, William Giokas <1007...@gmail.com> wrote: > On Sun, Mar 24, 2013 at 11:29:32AM -0700, Anatol Pomozov wrote: >> Hi >> >> On Sun, Mar 24, 2013 at 11:23 AM, Lukas Fleischer >> wrote: >> > On Sun, Mar 24, 2013 at 11:12:

Re: [pacman-dev] Mark outdated packages automatically (aka Livecheck)

2013-03-24 Thread Anatol Pomozov
Hi On Sun, Mar 24, 2013 at 11:33 AM, Jelle van der Waa wrote: > On 24/03/13 19:23, Lukas Fleischer wrote: >> On Sun, Mar 24, 2013 at 11:12:05AM -0700, Anatol Pomozov wrote: >>> Hi, >>> >>> I believe in automatization. Any routine work that can be done >&

Re: [pacman-dev] Mark outdated packages automatically (aka Livecheck)

2013-03-26 Thread Anatol Pomozov
Hi On Sun, Mar 24, 2013 at 11:33 AM, William Giokas <1007...@gmail.com> wrote: > On Sun, Mar 24, 2013 at 11:29:32AM -0700, Anatol Pomozov wrote: >> Hi >> >> On Sun, Mar 24, 2013 at 11:23 AM, Lukas Fleischer >> wrote: >> > On Sun, Mar 24, 2013 at 11:12:

Re: [pacman-dev] pacman-4.2 plans?

2013-04-12 Thread Anatol Pomozov
Hi On Thu, Apr 11, 2013 at 11:11 PM, Allan McRae wrote: > The 4.2 roadmap is empty! > https://wiki.archlinux.org/index.php?title=DeveloperWiki:Pacman_Roadmap > > I thought it would be good to discuss what people are planning. So far > things I know are being or will be worked on: > > - Remove of

Re: [pacman-dev] pacman-4.2 plans?

2013-04-13 Thread Anatol Pomozov
Hi On Sat, Apr 13, 2013 at 2:49 PM, Xyne wrote: > Allan McRae wrote: > >>We need all packages downloaded to perform conflict checking. >>Installing in parallel would be difficult as we need to maintain >>dependency ordering. > > Aside from that, wouldn't parallel disk IO be slower due to the writ

[pacman-dev] [PATCH] Fix spelling errors using 'codespell' tool

2013-04-14 Thread Anatol Pomozov
--- NEWS | 2 +- lib/libalpm/add.c | 2 +- lib/libalpm/be_package.c | 4 ++-- lib/libalpm/deps.c | 2 +- lib/libalpm/signing.c | 2 +- lib/libalpm/util.c | 6 +++--- m4/pkg.m4 | 2 +- scripts/library

Re: [pacman-dev] Mark outdated packages automatically (aka Livecheck)

2013-04-18 Thread Anatol Pomozov
Hi On Tue, Mar 26, 2013 at 8:38 AM, Anatol Pomozov wrote: > Hi > > On Sun, Mar 24, 2013 at 11:33 AM, William Giokas <1007...@gmail.com> wrote: >> On Sun, Mar 24, 2013 at 11:29:32AM -0700, Anatol Pomozov wrote: >>> Hi >>> >>> On Sun, Mar 24, 2013 a

Re: [pacman-dev] [PATCH] Fix spelling errors using 'codespell' tool

2013-05-07 Thread Anatol Pomozov
Hi On Sun, Apr 14, 2013 at 7:56 PM, Connor Behan wrote: > On 14/04/13 07:33 PM, Anatol Pomozov wrote: > > --- > > NEWS | 2 +- > > lib/libalpm/add.c | 2 +- > > lib/libalpm/be_package.c | 4 ++-- > > lib/libalpm/d

[pacman-dev] Better handling for domain-specific packages (rubygems, cpan, ...)

2013-06-26 Thread Anatol Pomozov
Hi pacman&arch devs Pacman like many other linux package managers are created with c projects in mind. Those projects usually release sources as tarball. It is expected that user will install dependencies and compile sources. Pacman takes those responsibilities and handles it very well. The situa

[pacman-dev] Pacman database size study

2020-01-22 Thread Anatol Pomozov
Hello folks. A few days ago there was a conversation at #pacman-dev IRC channel about the ways to reduce pacman database size. David and few other folks discussed how pgp signatures affect the final compressed size. I decided to use this question for a small personal study. I would like to present

Re: [pacman-dev] Pacman database size study

2020-01-22 Thread Anatol Pomozov
Hello On Wed, Jan 22, 2020 at 2:23 AM Allan McRae wrote: > > On 22/1/20 6:54 pm, Anatol Pomozov wrote: > > The first experiment is to parse db tarfile using the script and then > > write it back to a file: > > uncompressed size is 17757184 that is equal to origina

Re: [pacman-dev] Pacman database size study

2020-01-22 Thread Anatol Pomozov
Hi On Wed, Jan 22, 2020 at 2:03 PM Allan McRae wrote: > > On 23/1/20 2:03 am, Anatol Pomozov wrote: > > Hello > > > > On Wed, Jan 22, 2020 at 2:23 AM Allan McRae wrote: > >> > >> On 22/1/20 6:54 pm, Anatol Pomozov wrote: > >>> The first

[pacman-dev] [PATCH] Eliminate extra loop over dbs_sync

2020-01-29 Thread Anatol Pomozov
{ process(pkg, pkg.db) } Tested: 'ninja test' & manually by using pacman with this patch for a week Signed-off-by: Anatol Pomozov --- lib/libalpm/sync.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index d02a

[pacman-dev] [PATCH] Convert payload structs from heap allocated to stack allocated

2020-02-09 Thread Anatol Pomozov
download_files() dynamically allocates a payload object for each package. Then iterates over these payloads and calls download_single_file() for it. This code can be simplified to iterate over package list itself. payload struct can be stack allocated in this case. Signed-off-by: Anatol Pomozov

[pacman-dev] Extending download callback interface

2020-02-11 Thread Anatol Pomozov
Hello folks While working on multiplexed download API I hit one issue that requires some alpm API changes. Current ALPM download api handles one file at a time. And interaction between pacman and ALPM looks like: - pacman iterates over list of files to download - pacman calls alpm API to downl

Re: [pacman-dev] Extending download callback interface

2020-02-11 Thread Anatol Pomozov
Hello Eric On Tue, Feb 11, 2020 at 1:49 AM Erich Eckner wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > On Tue, 11 Feb 2020, Anatol Pomozov wrote: > > > Hello folks > > Hi Anatol, > > > > > While working on multiplexed download API I hit

[pacman-dev] [PATCH] Simplify construction of payloads in download_files

2020-02-19 Thread Anatol Pomozov
Currently, download_files() creates payloads for all packages then iterates over them, calling download_single_file. This can be simplified by looping over packages and constructing the payload as needed. Signed-off-by: Anatol Pomozov --- lib/libalpm/sync.c | 34

Re: [pacman-dev] [PATCH] Convert payload structs from heap allocated to stack allocated

2020-02-19 Thread Anatol Pomozov
Hello On Wed, Feb 12, 2020 at 12:36 AM Allan McRae wrote: > > On 10/2/20 9:55 am, Anatol Pomozov wrote: > > download_files() dynamically allocates a payload object for each > > package. Then iterates over these payloads and calls > > download_single_file() for it.

[pacman-dev] [PATCH 2/2] Move flushing 'output' list into separate function

2020-03-04 Thread Anatol Pomozov
'output' is a list of messages that pacman received but delayed printing to avoid messing with UI. Such functionality is useful for the upcoming multi-line progress bar UI. Let's move it to a separate function. Signed-off-by: Anatol Pomozov --- src/pacman/callback.c | 19 +++

[pacman-dev] [PATCH 1/2] Add config option to specify amount of concurrent download streams

2020-03-04 Thread Anatol Pomozov
urrent_download_streams() ALPM function that allows to set this config option programmatically. Signed-off-by: Anatol Pomozov --- doc/pacman.conf.5.asciidoc | 5 + etc/pacman.conf.in | 1 + lib/libalpm/alpm.h | 1 + lib/libalpm/handle.c | 12 lib/liba

[pacman-dev] [PATCH] Hide cursor while pacman is running

2020-03-04 Thread Anatol Pomozov
Use ASCII control codes to hide cursor at the pacman start and then show the cursor when pacman finishes. It helps to avoid annoying blinking when progress bars are re-drawn. Cursor is reenabled if pacman expects user's input. Signed-off-by: Anatol Pomozov --- src/common/util-common.c

[pacman-dev] [PATCH] Do not download files if find_dl_candidates() fails

2020-03-04 Thread Anatol Pomozov
One reason why the function returns an error is some repo does not have any servers. Signed-off-by: Anatol Pomozov --- lib/libalpm/sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 89cc7867..50b21b54 100644 --- a/lib/libalpm

Re: [pacman-dev] [PATCH 1/2] Add config option to specify amount of concurrent download streams

2020-03-04 Thread Anatol Pomozov
On Wed, Mar 4, 2020 at 12:39 PM Anatol Pomozov wrote: > > It includes pacman.conf new 'ConcurrentDownloadStreams' option that > specifies how many concurrent downloads curl starts in parallel. > > The value is set to '5' by default. Setting it to '0'

Re: [pacman-dev] [PATCH 2/2] Move flushing 'output' list into separate function

2020-03-05 Thread Anatol Pomozov
Hi On Wed, Mar 4, 2020 at 9:16 PM Allan McRae wrote: > > On 5/3/20 6:38 am, Anatol Pomozov wrote: > > 'output' is a list of messages that pacman received but delayed printing > > to avoid messing with UI. > > > > Such functionality is useful for the upcomi

[pacman-dev] [PATCH v2] Move flushing 'output' list into separate function

2020-03-05 Thread Anatol Pomozov
'output' is a list of messages that pacman received but delayed printing to avoid messing with UI. Such functionality is useful for the upcoming multi-line progress bar UI. Let's move it to a separate function. Signed-off-by: Anatol Pomozov --- src/pacman/callback.c | 18 ++

[pacman-dev] [PATCH v2] Hide cursor while pacman is running

2020-03-05 Thread Anatol Pomozov
Use ASCII control codes to hide cursor at the pacman start and then show the cursor when pacman finishes. It helps to avoid annoying blinking when progress bars are re-drawn. Cursor is reenabled if pacman expects user's input. Signed-off-by: Anatol Pomozov --- src/common/util-common.c

[pacman-dev] [PATCH] meson: use 'pedantic' compiler warning level

2020-03-05 Thread Anatol Pomozov
Signed-off-by: Anatol Pomozov --- meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/meson.build b/meson.build index 572526b2..fc81fa27 100644 --- a/meson.build +++ b/meson.build @@ -7,6 +7,7 @@ project('pacman', 'prefix=/usr',

Re: [pacman-dev] [PATCH] meson: use 'pedantic' compiler warning level

2020-03-05 Thread Anatol Pomozov
Hi On Thu, Mar 5, 2020 at 4:50 PM Eli Schwartz wrote: > > On 3/5/20 7:42 PM, Anatol Pomozov wrote: > > Signed-off-by: Anatol Pomozov > > --- > > meson.build | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/meson.build b/meson.build >

[pacman-dev] [PATCH v2] Add config option to specify amount of parallel download streams

2020-03-05 Thread Anatol Pomozov
It includes pacman.conf new 'ParallelDownloads' option that specifies how many concurrent downloads cURL starts in parallel. Add alpm_option_set_parallel_downloads() ALPM function that allows to set this config option programmatically. Signed-off-by: Anatol Pomozov --- doc/pac

Re: [pacman-dev] [PATCH] meson: use 'pedantic' compiler warning level

2020-03-05 Thread Anatol Pomozov
Hi On Thu, Mar 5, 2020 at 6:14 PM Eli Schwartz wrote: > > On 3/5/20 9:12 PM, Eli Schwartz wrote: > > On 3/5/20 9:02 PM, Anatol Pomozov wrote: > >> Hi > >> > >> On Thu, Mar 5, 2020 at 4:50 PM Eli Schwartz > >> wrote: > >>> > &g

Re: [pacman-dev] [PATCH 1/2] Add config option to specify amount of concurrent download streams

2020-03-05 Thread Anatol Pomozov
Hi On Thu, Mar 5, 2020 at 5:14 AM Allan McRae wrote: > > On 5/3/20 6:38 am, Anatol Pomozov wrote: > > It includes pacman.conf new 'ConcurrentDownloadStreams' option that > > specifies how many concurrent downloads curl starts in parallel. > > > > The value

[pacman-dev] [PATCH] Add GOTO_ERR() macro to set error and then goto a label

2020-03-06 Thread Anatol Pomozov
This is a macro similar to RET_ERR but useful in the case when we need to record an error and then jump to some cleanup section. Signed-off-by: Anatol Pomozov --- lib/libalpm/util.h | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/libalpm/util.h b/lib/libalpm/util.h index 9827b2c1

[pacman-dev] [PATCH] Introduce alpm_dbs_update() function for parallel db updates

2020-03-06 Thread Anatol Pomozov
o a curl callback. And the callback needs to be able to reconstruct the 'next' fileurl. One will be able to do it by getting the next server url from 'servers' list and then concat with filepath. Once the 'parallel download' refactoring is over 'fileurl' field w

Re: [pacman-dev] [PATCH] Introduce alpm_dbs_update() function for parallel db updates

2020-03-06 Thread Anatol Pomozov
Hi On Fri, Mar 6, 2020 at 12:35 PM Anatol Pomozov wrote: > > This is an equivalent of alpm_db_update but for multiplexed (parallel) > download. The difference is that this function accepts list of > databases to update. And then ALPM internals download it in parallel if > poss

Re: [pacman-dev] [PATCH] meson: use 'pedantic' compiler warning level

2020-03-06 Thread Anatol Pomozov
Hi On Thu, Mar 5, 2020 at 9:07 PM Allan McRae wrote: > > On 6/3/20 2:51 pm, Anatol Pomozov wrote: > > Hi > > > > On Thu, Mar 5, 2020 at 6:14 PM Eli Schwartz wrote: > >> > >> On 3/5/20 9:12 PM, Eli Schwartz wrote: > >>> On 3/5/20 9:02 PM, Ana

Re: [pacman-dev] [PATCH] Add GOTO_ERR() macro to set error and then goto a label

2020-03-08 Thread Anatol Pomozov
Hi On Sat, Mar 7, 2020 at 9:55 PM Allan McRae wrote: > > On 7/3/20 6:00 am, Anatol Pomozov wrote: > > This is a macro similar to RET_ERR but useful in the case when we need > > to record an error and then jump to some cleanup section. > > > > Signed-off-by: An

Re: [pacman-dev] [PATCH v2] Hide cursor while pacman is running

2020-03-08 Thread Anatol Pomozov
Hello On Sat, Mar 7, 2020 at 9:55 PM Allan McRae wrote: > > On 6/3/20 10:39 am, Anatol Pomozov wrote: > > Use ASCII control codes to hide cursor at the pacman start and then > > show the cursor when pacman finishes. > > > > It helps to avoid annoying blinking w

[pacman-dev] [PATCH v2] Hide cursor while pacman is running

2020-03-08 Thread Anatol Pomozov
Use ASCII control codes to hide cursor at the pacman start and then show the cursor when pacman finishes. It helps to avoid annoying blinking when progress bars are re-drawn. Cursor is reenabled if pacman expects user's input. Signed-off-by: Anatol Pomozov --- src/common/util-common.c

Re: [pacman-dev] [PATCH v2] Add config option to specify amount of parallel download streams

2020-03-08 Thread Anatol Pomozov
Hi On Sat, Mar 7, 2020 at 9:56 PM Allan McRae wrote: > > On 6/3/20 12:17 pm, Anatol Pomozov wrote: > > It includes pacman.conf new 'ParallelDownloads' option that > > specifies how many concurrent downloads cURL starts in parallel. > > > > Add alpm_optio

[pacman-dev] [PATCH v3] Add config option to specify amount of parallel download streams

2020-03-08 Thread Anatol Pomozov
It includes pacman.conf new 'ParallelDownloads' option that specifies how many concurrent downloads cURL starts in parallel. Add alpm_option_set_parallel_downloads() ALPM function that allows to set this config option programmatically. Signed-off-by: Anatol Pomozov --- doc/pac

Re: [pacman-dev] [PATCH] Introduce alpm_dbs_update() function for parallel db updates

2020-03-08 Thread Anatol Pomozov
Hi The failfast option got removed. On Sun, Mar 8, 2020 at 6:05 AM Allan McRae wrote: > > On 7/3/20 6:35 am, Anatol Pomozov wrote: > > This is an equivalent of alpm_db_update but for multiplexed (parallel) > > download. The difference is that this function accepts list o

[pacman-dev] [PATCH v2] Introduce alpm_dbs_update() function for parallel db updates

2020-03-08 Thread Anatol Pomozov
o a curl callback. And the callback needs to be able to reconstruct the 'next' fileurl. One will be able to do it by getting the next server url from 'servers' list and then concat with filepath. Once the 'parallel download' refactoring is over 'fileurl' field w

[pacman-dev] [PATCH v3] Hide cursor while pacman is running

2020-03-09 Thread Anatol Pomozov
Use ASCII control codes to hide cursor at the pacman start and then show the cursor when pacman finishes. It helps to avoid annoying blinking when progress bars are re-drawn. Cursor is reenabled if pacman expects user's input. Signed-off-by: Anatol Pomozov --- src/pacman/pacman.c

Re: [pacman-dev] [PATCH v2] Hide cursor while pacman is running

2020-03-09 Thread Anatol Pomozov
Hi On Mon, Mar 9, 2020 at 2:58 AM Allan McRae wrote: > > On 9/3/20 7:48 pm, Ralph Corderoy wrote: > > Hi, > > > >> +void console_hide_cursor(void) { > >> + if(isatty(fileno(stdout))) { > >> + printf("\x1B[?25l"); > >> + } > > > > This is an ioctl(2) each time. > > Can st

Re: [pacman-dev] [PATCH] Introduce alpm_dbs_update() function for parallel db updates

2020-03-09 Thread Anatol Pomozov
Hi On Sun, Mar 8, 2020 at 5:15 PM Allan McRae wrote: > > On 9/3/20 6:55 am, Anatol Pomozov wrote: > > On Sun, Mar 8, 2020 at 6:05 AM Allan McRae wrote: > > >> I got to here. Seems a lot of this is duplicated from the single db > >> path. If both are

[pacman-dev] [PATCH] Implement _alpm_multi_download

2020-03-09 Thread Anatol Pomozov
It is equivalent of _alpm_download but accepts list of payloads. Signed-off-by: Anatol Pomozov --- lib/libalpm/dload.c | 50 + 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index 7cd3e3a4

Re: [pacman-dev] [PATCH] Implement _alpm_multi_download

2020-03-09 Thread Anatol Pomozov
Hi On Mon, Mar 9, 2020 at 1:19 PM Anatol Pomozov wrote: > > It is equivalent of _alpm_download but accepts list of payloads. > > Signed-off-by: Anatol Pomozov > --- > lib/libalpm/dload.c | 50 + > 1 file changed, 46 inser

[pacman-dev] [PATCH] Add multi_curl handle to ALPM global context

2020-03-09 Thread Anatol Pomozov
To be able to run multiple download in parallel efficiently we need to use curl_multi interface [1]. It introduces a set of APIs over new type of handler 'CURLM'. Create CURLM object at the application start and set it to global ALPM context. The 'single-download' CURL handle moves to payload str

[pacman-dev] [PATCH] Inline dload_payload->curlerr field into a local variable

2020-03-09 Thread Anatol Pomozov
dload_payload->curlerr is a field that is used inside curl_download_internal() function only. It can be converted to a local variable. Signed-off-by: Anatol Pomozov --- lib/libalpm/dload.c | 9 + lib/libalpm/dload.h | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --gi

[pacman-dev] [PATCH] Implement multiplexed download using mCURL

2020-03-09 Thread Anatol Pomozov
g is complete curl_download_internal() will be removed. Signed-off-by: Anatol Pomozov --- lib/libalpm/dload.c | 361 +++- lib/libalpm/dload.h | 2 + 2 files changed, 359 insertions(+), 4 deletions(-) diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index 3570e

Re: [pacman-dev] [PATCH] Implement multiplexed download using mCURL

2020-03-09 Thread Anatol Pomozov
Hello The the the largest change (in terms of LoC) in this patch series. It add the multi-curl machinery, the bread-and-butter of the parallel download functionality. On Mon, Mar 9, 2020 at 5:28 PM Anatol Pomozov wrote: > > curl_multi_download_internal() is the main loop that creates

Re: [pacman-dev] [PATCH] meson: use 'pedantic' compiler warning level

2020-03-26 Thread Anatol Pomozov
Hello In this case I would like to propose to move forward with my original patch and enable 'pedantic' warning level by default. It will match the flag with the Makefile based build. On Fri, Mar 6, 2020 at 3:52 PM Anatol Pomozov wrote: > > Hi > > On Thu, Mar 5, 2020

Re: [pacman-dev] [PATCH v2] Introduce alpm_dbs_update() function for parallel db updates

2020-03-26 Thread Anatol Pomozov
Hi On Thu, Mar 12, 2020 at 6:16 PM Allan McRae wrote: > > On 9/3/20 6:59 am, Anatol Pomozov wrote: > > This is an equivalent of alpm_db_update but for multiplexed (parallel) > > download. The difference is that this function accepts list of > > databases to update.

[pacman-dev] [PATCH v3] Introduce alpm_dbs_update() function for parallel db updates

2020-03-26 Thread Anatol Pomozov
o a curl callback. And the callback needs to be able to reconstruct the 'next' fileurl. One will be able to do it by getting the next server url from 'servers' list and then concat with filepath. Once the 'parallel download' refactoring is over 'fileurl' field w

Re: [pacman-dev] [PATCH] Implement multiplexed download using mCURL

2020-03-26 Thread Anatol Pomozov
Hi On Wed, Mar 25, 2020 at 4:37 AM Allan McRae wrote: > > On 10/3/20 10:28 am, Anatol Pomozov wrote: > > curl_multi_download_internal() is the main loop that creates up to > > 'ParallelDownloads' easy curl handles, adds them to mcurl and then > > perform

[pacman-dev] [PATCH v2] Implement multiplexed download using mCURL

2020-03-26 Thread Anatol Pomozov
g is complete curl_download_internal() will be removed. Signed-off-by: Anatol Pomozov --- lib/libalpm/dload.c | 359 +++- lib/libalpm/dload.h | 2 + 2 files changed, 357 insertions(+), 4 deletions(-) diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c i

[pacman-dev] [PATCH v2] meson: use 'pedantic' compiler warning level by default

2020-03-26 Thread Anatol Pomozov
This sets parity with the autotools version of the build that has -pedantic flag enbled unconditionally. Signed-off-by: Anatol Pomozov --- meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/meson.build b/meson.build index 572526b2..fc81fa27 100644 --- a/meson.build +++ b

Re: [pacman-dev] [PATCH] meson: use 'pedantic' compiler warning level

2020-03-26 Thread Anatol Pomozov
Hi On Thu, Mar 26, 2020 at 1:42 PM Eli Schwartz wrote: > > On 3/26/20 3:32 PM, Anatol Pomozov wrote: > > Hello > > > > In this case I would like to propose to move forward with my original > > patch and enable 'pedantic' warning level by default. It w

[pacman-dev] [PATCH] Use C18 language standard

2020-03-26 Thread Anatol Pomozov
C18 is the latest released version of the language spec. The toolchains support it starting with GCC 8.1.0 and Clang 7. Signed-off-by: Anatol Pomozov --- configure.ac | 2 +- meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index

Re: [pacman-dev] [PATCH] Use C18 language standard

2020-03-27 Thread Anatol Pomozov
Hey On Thu, Mar 26, 2020 at 8:47 PM Allan McRae wrote: > > On 27/3/20 7:13 am, Anatol Pomozov wrote: > > C18 is the latest released version of the language spec. The toolchains > > support > > it starting with GCC 8.1.0 and Clang 7. > > > > GCC 8.1.0 - May 2

Re: [pacman-dev] [PATCH] Use C18 language standard

2020-03-31 Thread Anatol Pomozov
Hi On Fri, Mar 27, 2020 at 4:08 PM Allan McRae wrote: > > On 28/3/20 5:52 am, Anatol Pomozov wrote: > > Hey > > > > On Thu, Mar 26, 2020 at 8:47 PM Allan McRae wrote: > >> > >> On 27/3/20 7:13 am, Anatol Pomozov wrote: > >>> C18 is

Re: [pacman-dev] [PATCH v3] Introduce alpm_dbs_update() function for parallel db updates

2020-04-12 Thread Anatol Pomozov
Hi Allan and others Is there a chance you can look at this and other "parallel-download" patches? On Thu, Mar 26, 2020 at 1:20 PM Anatol Pomozov wrote: > > This is an equivalent of alpm_db_update but for multiplexed (parallel) > download. The difference is that this funct

Re: [pacman-dev] [PATCH v2] Introduce alpm_dbs_update() function for parallel db updates

2020-04-13 Thread Anatol Pomozov
Hi On Thu, Mar 12, 2020 at 6:16 PM Allan McRae wrote: > > On 9/3/20 6:59 am, Anatol Pomozov wrote: > > This is an equivalent of alpm_db_update but for multiplexed (parallel) > > download. The difference is that this function accepts list of > > databases to update.

Re: [pacman-dev] [PATCH] Implement _alpm_multi_download

2020-04-13 Thread Anatol Pomozov
Hello On Mon, Mar 16, 2020 at 7:00 AM Allan McRae wrote: > > On 10/3/20 6:19 am, Anatol Pomozov wrote: > > It is equivalent of _alpm_download but accepts list of payloads. > > > > Expand the commit message to mention curl_multi_download_internal is > just not func

[pacman-dev] [PATCH v2] Implement _alpm_multi_download

2020-04-13 Thread Anatol Pomozov
It is an equivalent of _alpm_download but accepts a list of payloads. curl_multi_download_internal() is a stub at this moment and will be implemented in the later commits of this patch series. Signed-off-by: Anatol Pomozov --- lib/libalpm/dload.c | 50

Re: [pacman-dev] [PATCH] Implement multiplexed download using mCURL

2020-04-13 Thread Anatol Pomozov
Hi On Mon, Apr 13, 2020 at 7:42 PM Allan McRae wrote: > > Changes look good. My only remaining comment is this: > > On 27/3/20 6:59 am, Anatol Pomozov wrote: > >>> + * Returns -1 if an error happened > >>> + */ > >>> +static int curl_mul

[pacman-dev] [PATCH v3] Implement multiplexed download using mCURL

2020-04-13 Thread Anatol Pomozov
g is complete curl_download_internal() will be removed. Signed-off-by: Anatol Pomozov --- lib/libalpm/dload.c | 360 +++- lib/libalpm/dload.h | 2 + 2 files changed, 358 insertions(+), 4 deletions(-) diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c i

Re: [pacman-dev] [PATCH v3] Implement multiplexed download using mCURL

2020-04-13 Thread Anatol Pomozov
Hi On Mon, Apr 13, 2020 at 10:07 PM Allan McRae wrote: > > On 14/4/20 2:48 pm, Anatol Pomozov wrote: > > curl_multi_download_internal() is the main loop that creates up to > > 'ParallelDownloads' easy curl handles, adds them to mcurl and then > > perform

[pacman-dev] [PATCH] Introduce event types for start/end database list download

2020-04-16 Thread Anatol Pomozov
download process. Use on_progress variable that blocks error messages printing. Signed-off-by: Anatol Pomozov --- lib/libalpm/alpm.h| 6 ++ lib/libalpm/be_sync.c | 7 +++ src/pacman/callback.c | 13 +++-- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/lib/libalpm

[pacman-dev] [PATCH] Extend download callback interface with start/complete events

2020-04-16 Thread Anatol Pomozov
events - download started and completed. 'Download started' events appear in the same order as in the list given by a client. Signed-off-by: Anatol Pomozov --- lib/libalpm/alpm.h| 35 --- lib/libalpm/dload.c | 19 ++- src/pacma

[pacman-dev] [PATCH] Implement multibar UI

2020-04-17 Thread Anatol Pomozov
visible progress bar. Signed-off-by: Anatol Pomozov --- lib/libalpm/dload.c | 31 +--- lib/libalpm/dload.h | 1 - src/pacman/callback.c | 401 +- src/pacman/callback.h | 3 + src/pacman/sync.c | 2 + 5 files changed, 294 insertions(+), 144

Re: [pacman-dev] [PATCH] Implement multibar UI

2020-04-17 Thread Anatol Pomozov
Hi On Fri, Apr 17, 2020 at 11:55 AM Anatol Pomozov wrote: > > Multiplexed download requires ability to draw UI for multiple active progress > bars. > To implement it we use ANSI codes to move cursor up/down. > `active_dls` variable represents the list of active downl

[pacman-dev] [PATCH] Convert download packages logic to multiplexed API

2020-04-18 Thread Anatol Pomozov
Create a list of dload_payloads and pass it to the new _alpm_multi_* interface. Signed-off-by: Anatol Pomozov --- lib/libalpm/sync.c | 74 ++ 1 file changed, 28 insertions(+), 46 deletions(-) diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index

[pacman-dev] [PATCH] Convert downloading databases to the new multiplexed API

2020-04-18 Thread Anatol Pomozov
Signed-off-by: Anatol Pomozov --- src/pacman/util.c | 27 +-- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/src/pacman/util.c b/src/pacman/util.c index 6693ec75..93487e73 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -150,26 +150,17 @@ int

[pacman-dev] [PATCH] Remove alpm_db_update() function

2020-04-18 Thread Anatol Pomozov
This function got replaced by its multiplexed couterpart alpm_dbs_update(). If one needs to reproduce alpm_db_update() functionality then create a single item list and pass it to alpm_dbs_update(). Signed-off-by: Anatol Pomozov --- lib/libalpm/alpm.h| 36 - lib/libalpm/be_sync.c

Re: [pacman-dev] [PATCH] Convert download packages logic to multiplexed API

2020-04-18 Thread Anatol Pomozov
Hi On Sat, Apr 18, 2020 at 7:04 PM Anatol Pomozov wrote: > > Create a list of dload_payloads and pass it to the new _alpm_multi_* > interface. > > Signed-off-by: Anatol Pomozov > --- > lib/libalpm/sync.c | 74 ++ > 1 fil

Re: [pacman-dev] [PATCH] Convert download packages logic to multiplexed API

2020-04-20 Thread Anatol Pomozov
Hello On Mon, Apr 20, 2020 at 4:53 AM Allan McRae wrote: > > On 19/4/20 1:15 pm, Anatol Pomozov wrote: > >> + /* TOASK: do we need to initiate *.sig file > >> download here? */ > > > One question with this change is whether we need to do

[pacman-dev] Dropping SIGPIPE workaround from dload.c

2020-04-20 Thread Anatol Pomozov
Hi folks I am looking at the lib/libalpm/dload.c download codepath and found that it has a following snippet: /* Ignore any SIGPIPE signals. With libcurl, these shouldn't be happening, * but better safe than sorry. Store the old signal handler first. */ mask_signal(SIGPIPE,

[pacman-dev] [PATCH] Add str_endswith() utility function

2020-04-21 Thread Anatol Pomozov
It provides an easy way to check whether a string ends with a given suffix. Signed-off-by: Anatol Pomozov --- src/common/util-common.c | 18 ++ src/common/util-common.h | 2 ++ 2 files changed, 20 insertions(+) diff --git a/src/common/util-common.c b/src/common/util-common.c

[pacman-dev] [PATCH] Implement multibar UI

2020-04-21 Thread Anatol Pomozov
: Anatol Pomozov --- lib/libalpm/dload.c | 31 +--- lib/libalpm/dload.h | 1 - src/pacman/callback.c | 393 +- src/pacman/callback.h | 3 + src/pacman/sync.c | 2 + 5 files changed, 285 insertions(+), 145 deletions(-) diff --git a/lib/libalpm

Re: [pacman-dev] [PATCH] Implement multibar UI

2020-04-21 Thread Anatol Pomozov
Hi This is V2 version of the patch. I removed "dl_progress_bar->visible" field and instead filter out all *.sig files based on the filename. It allows to make the logic simpler and more straightforward. On Tue, Apr 21, 2020 at 8:46 PM Anatol Pomozov wrote: > > Multiplexe

[pacman-dev] [PATCH] Add a helper macro to free() dload_payload structure

2020-04-23 Thread Anatol Pomozov
It frees all the dynamically allocated fields plus the struct itself Signed-off-by: Anatol Pomozov --- lib/libalpm/dload.h | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/libalpm/dload.h b/lib/libalpm/dload.h index a40b51b7..3f2fb9ea 100644 --- a/lib/libalpm/dload.h +++ b/lib

[pacman-dev] [PATCH] Add a utility function to check whether a file exists in the cache

2020-04-23 Thread Anatol Pomozov
It is similar to _alpm_filecache_find() but does not return a dynamically allocated memory to user. Thus the user does not need to free this resource. Signed-off-by: Anatol Pomozov --- lib/libalpm/util.c | 14 ++ lib/libalpm/util.h | 2 ++ 2 files changed, 16 insertions(+) diff

Re: [pacman-dev] [PATCH] Add a helper macro to free() dload_payload structure

2020-04-26 Thread Anatol Pomozov
Hi On Sun, Apr 26, 2020 at 4:54 PM Allan McRae wrote: > > On 24/4/20 2:40 pm, Anatol Pomozov wrote: > > It frees all the dynamically allocated fields plus the struct itself > > > > How many times will you use this? Across how many functions? Currently my tree uses th

[pacman-dev] [PATCH v2] Add a utility function to check whether a file exists in the cache

2020-04-26 Thread Anatol Pomozov
It is similar to _alpm_filecache_find() but does not return a dynamically allocated memory to user. Thus the user does not need to free this resource. Signed-off-by: Anatol Pomozov --- lib/libalpm/util.c | 14 ++ lib/libalpm/util.h | 2 ++ 2 files changed, 16 insertions(+) diff

Re: [pacman-dev] [PATCH] Add a utility function to check whether a file exists in the cache

2020-04-26 Thread Anatol Pomozov
Hi On Sun, Apr 26, 2020 at 6:07 PM Allan McRae wrote: > > On 24/4/20 2:41 pm, Anatol Pomozov wrote: > > It is similar to _alpm_filecache_find() but does not return a > > dynamically allocated memory to user. Thus the user does not need to > > free this resource. >

Re: [pacman-dev] [PATCH] Add a helper macro to free() dload_payload structure

2020-04-26 Thread Anatol Pomozov
Hi On Sun, Apr 26, 2020 at 7:18 PM Allan McRae wrote: > > On 27/4/20 11:54 am, Anatol Pomozov wrote: > > Hi > > > > On Sun, Apr 26, 2020 at 4:54 PM Allan McRae wrote: > >> > >> On 24/4/20 2:40 pm, Anatol Pomozov wrote: > >>> It frees all t

Re: [pacman-dev] Planning the move to the Arch Linux Gitlab instance

2020-05-03 Thread Anatol Pomozov
Hi On Sat, May 2, 2020 at 1:29 AM Allan McRae wrote: > > Hi all, > > Arch Linux is setting up its own Gitlab instance. I have been playing > around with it for the day and I think pacman should transition there. Yay!!! Finally. Thank you Sven-Hendrik and others for your work! > Note: the curr

Re: [pacman-dev] [PATCH] Add str_endswith() utility function

2020-05-05 Thread Anatol Pomozov
Hi On Tue, Apr 28, 2020 at 8:43 PM Allan McRae wrote: > > On 22/4/20 4:42 am, Anatol Pomozov wrote: > > It provides an easy way to check whether a string ends with a given > > suffix. > > > > Note: "pkg.sig" is a valid package name with signature file >

Re: [pacman-dev] [PATCH] Add a helper macro to free() dload_payload structure

2020-05-05 Thread Anatol Pomozov
Hi On Tue, Apr 28, 2020 at 5:56 PM Allan McRae wrote: > > On 27/4/20 12:24 pm, Anatol Pomozov wrote: > > Hi > > > > On Sun, Apr 26, 2020 at 7:18 PM Allan McRae wrote: > >> > >> On 27/4/20 11:54 am, Anatol Pomozov wrote: > >>> Hi > >

Re: [pacman-dev] [PATCH] Introduce event types for start/end database list download

2020-05-05 Thread Anatol Pomozov
Hello On Tue, Apr 28, 2020 at 6:31 PM Allan McRae wrote: > > On 17/4/20 12:31 pm, Anatol Pomozov wrote: > > Multiplexed database/files downloads will use multiple progress bars. > > The UI logic is quite complicated and printing error messages while > > handling multipl

[pacman-dev] [PATCH v2] Introduce event types for start/end database list download

2020-05-05 Thread Anatol Pomozov
download process. Use on_progress variable that blocks error messages printing. Signed-off-by: Anatol Pomozov --- lib/libalpm/alpm.h| 18 -- lib/libalpm/be_sync.c | 7 +++ lib/libalpm/sync.c| 6 +++--- src/pacman/callback.c | 15 --- 4 files changed, 34

[pacman-dev] [PATCH v2] Extend download callback interface with start/complete events

2020-05-05 Thread Anatol Pomozov
events - download started and completed. 'Download started' events appear in the same order as in the list given by a client. Signed-off-by: Anatol Pomozov --- lib/libalpm/alpm.h| 35 --- lib/libalpm/dload.c | 19 +++ src/pacma

Re: [pacman-dev] [PATCH] Convert download packages logic to multiplexed API

2020-05-06 Thread Anatol Pomozov
Hello On Tue, Apr 28, 2020 at 9:36 PM Allan McRae wrote: > > On 19/4/20 12:04 pm, Anatol Pomozov wrote: > > Create a list of dload_payloads and pass it to the new _alpm_multi_* > > interface. > > > > Signed-off-by: Anatol Pomozov > &

[pacman-dev] [PATCH v2] Convert download packages logic to multiplexed API

2020-05-06 Thread Anatol Pomozov
Create a list of dload_payloads and pass it to the new _alpm_multi_* interface. Signed-off-by: Anatol Pomozov --- README| 11 +++ lib/libalpm/alpm.h| 9 -- lib/libalpm/sync.c| 73 +++ src/pacman/callback.c | 4 --- 4

Re: [pacman-dev] [PATCH] Remove alpm_db_update() function

2020-05-06 Thread Anatol Pomozov
Hi On Tue, Apr 28, 2020 at 6:57 PM Allan McRae wrote: > > On 19/4/20 12:22 pm, Anatol Pomozov wrote: > > This function got replaced by its multiplexed couterpart alpm_dbs_update(). > > If one needs to reproduce alpm_db_update() functionality then create a > > single

  1   2   >