[pacman-dev] [PATCH] '-Spp and -Supp' options were added to generate uri list without the downloaded package uris
Signed-off-by: Laszlo Papp <djszapi2@gmail.com> --- src/pacman/pacman.c | 2 +- src/pacman/sync.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 25647b5..00b14f5 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -485,7 +485,7 @@ static int parseargs(int argc, char *argv[]) case 'o': config->op_q_owns = 1; break; case 'p': config->op_q_isfile = 1; - config->op_s_printuris = 1; + config->op_s_printuris++; config->flags |= PM_TRANS_FLAG_NOCONFLICTS; config->flags |= PM_TRANS_FLAG_NOLOCK; break; diff --git a/src/pacman/sync.c b/src/pacman/sync.c index dc93621..b4e2eac 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -678,6 +678,9 @@ static int sync_trans(alpm_list_t *targets) pmpkg_t *pkg = alpm_list_getdata(i); pmdb_t *db = alpm_pkg_get_db(pkg); const char *dburl = alpm_db_get_url(db); + if ((config->op_s_printuris >= 2) && !alpm_pkg_download_size(pkg)) { + continue; + } if(dburl) { printf("%s/%s\n", dburl, alpm_pkg_get_filename(pkg)); } else { -- 1.6.4.1
On Fri, Aug 28, 2009 at 12:31 AM, Laszlo Papp<djszapi2@gmail.com> wrote:
Signed-off-by: Laszlo Papp <djszapi2@gmail.com> --- src/pacman/pacman.c | 2 +- src/pacman/sync.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 25647b5..00b14f5 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -485,7 +485,7 @@ static int parseargs(int argc, char *argv[]) case 'o': config->op_q_owns = 1; break; case 'p': config->op_q_isfile = 1; - config->op_s_printuris = 1; + config->op_s_printuris++; config->flags |= PM_TRANS_FLAG_NOCONFLICTS; config->flags |= PM_TRANS_FLAG_NOLOCK; break; diff --git a/src/pacman/sync.c b/src/pacman/sync.c index dc93621..b4e2eac 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -678,6 +678,9 @@ static int sync_trans(alpm_list_t *targets) pmpkg_t *pkg = alpm_list_getdata(i); pmdb_t *db = alpm_pkg_get_db(pkg); const char *dburl = alpm_db_get_url(db); + if ((config->op_s_printuris >= 2) && !alpm_pkg_download_size(pkg)) { + continue; + } if(dburl) { printf("%s/%s\n", dburl, alpm_pkg_get_filename(pkg)); } else { -- 1.6.4.1
I wonder if we could generalize this to my --print patch : http://code.toofishes.net/cgit/xavier/pacman.git/commit/?h=working&id=c225948b5ba70993277faa4dff4f312459af7965 it might make sense to make this possible for both --print and --print-uris operation, but then the command line becomes difficult :(
+ if ((config->op_s_printuris >= 2) && !alpm_pkg_download_size(pkg)) { + continue; +}
This means that -Sp prints everything, -Spp prints only the to-be-download URIs. This is good for backward compatibility, but for my taste -Sp should print only the to-be-download URIs, and -Spp all. (In pacman convention, duplicated switch means 'all/everything', see -Scc, -Syy, -Suu) Opinions? Bye ------------------------------------------------------ SZTE Egyetemi Konyvtar - http://www.bibl.u-szeged.hu This message was sent using IMP: http://horde.org/imp/
On Fri, Aug 28, 2009 at 11:34 AM, Nagy Gabor <ngaba@bibl.u-szeged.hu> wrote:
+ if ((config->op_s_printuris >= 2) && !alpm_pkg_download_size(pkg)) {
+ continue; +}
This means that -Sp prints everything, -Spp prints only the to-be-download URIs. This is good for backward compatibility, but for my taste -Sp should print only the to-be-download URIs, and -Spp all. (In pacman convention, duplicated switch means 'all/everything', see -Scc, -Syy, -Suu) Opinions?
Bye
Hello! Yeah, you're right, sorry. I didn't follow the 'print thread' from Xavier, but I will check it at the weekend. I don't think It's a point against it so that the command line command will be difficult, I would say that rather It has got more facilities. Thank the replies, Laszlo Papp
+ if ((config->op_s_printuris >= 2) && !alpm_pkg_download_size(pkg)) {
+ continue; +}
This means that -Sp prints everything, -Spp prints only the to-be-download URIs. This is good for backward compatibility, but for my taste -Sp should print only the to-be-download URIs, and -Spp all. (In pacman convention, duplicated switch means 'all/everything', see -Scc, -Syy, -Suu) Opinions?
Bye
Hello!
Yeah, you're right, sorry.
I didn't follow the 'print thread' from Xavier, but I will check it at the weekend. I don't think It's a point against it so that the command line command will be difficult, I would say that rather It has got more facilities.
One more thing I forgot to mention. The patch should update the documentation too (most boring part of a patch...): 1. doc/pacman.8.txt 2. -Sh output (hint: try to be terse, the --print-uri line should fit in 80 chars) Bye ------------------------------------------------------ SZTE Egyetemi Konyvtar - http://www.bibl.u-szeged.hu This message was sent using IMP: http://horde.org/imp/
On Fri, Aug 28, 2009 at 12:52 AM, Xavier <shiningxc@gmail.com> wrote:
On Fri, Aug 28, 2009 at 12:31 AM, Laszlo Papp<djszapi2@gmail.com> wrote:
Signed-off-by: Laszlo Papp <djszapi2@gmail.com> --- src/pacman/pacman.c | 2 +- src/pacman/sync.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 25647b5..00b14f5 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -485,7 +485,7 @@ static int parseargs(int argc, char *argv[]) case 'o': config->op_q_owns = 1; break; case 'p': config->op_q_isfile = 1; - config->op_s_printuris = 1; + config->op_s_printuris++; config->flags |= PM_TRANS_FLAG_NOCONFLICTS; config->flags |= PM_TRANS_FLAG_NOLOCK; break; diff --git a/src/pacman/sync.c b/src/pacman/sync.c index dc93621..b4e2eac 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -678,6 +678,9 @@ static int sync_trans(alpm_list_t *targets) pmpkg_t *pkg = alpm_list_getdata(i); pmdb_t *db = alpm_pkg_get_db(pkg); const char *dburl = alpm_db_get_url(db); + if ((config->op_s_printuris >= 2) && !alpm_pkg_download_size(pkg)) { + continue; + } if(dburl) { printf("%s/%s\n", dburl, alpm_pkg_get_filename(pkg)); } else { -- 1.6.4.1
I wonder if we could generalize this to my --print patch :
it might make sense to make this possible for both --print and --print-uris operation, but then the command line becomes difficult :(
Hello Xavier! I didn't have so much time at the weekend, but as I saw maybe it would be better to choose a more talkative name for it, e.g. --print-package or something (it's just an example). What will happen if there will be new similar future in the future when the developers or users would like to implement a feature to print out another information, will you choose the name for --print2 or more reasonlable name ? In the second case It would be nice to start it now :) Mabe I'm wrong with it. Nevertheless It's a very good feature, thanks in fact :) Best Regards, Laszlo Papp
On Mon, Aug 31, 2009 at 5:45 AM, Laszlo Papp<djszapi2@gmail.com> wrote:
Hello Xavier!
I didn't have so much time at the weekend, but as I saw maybe it would be better to choose a more talkative name for it, e.g. --print-package or something (it's just an example).
What will happen if there will be new similar future in the future when the developers or users would like to implement a feature to print out another information, will you choose the name for --print2 or more reasonlable name ? In the second case It would be nice to start it now :) Mabe I'm wrong with it.
Nevertheless It's a very good feature, thanks in fact :)
--print-pkg and --print-uris looks good to me but would you keep your new feature on top of these two options : --print-pkg and --print-uris only show non-download packages --print-pkg --print-pkg and --print-uris --print-uris show all ? an alternative : what if we added the download size when ShowSize is used? pacman -Sp fontconfig ftp://ftp.archlinux.org/extra/os/i686/fontconfig-2.4.2-1.pkg.tar.gz [1234] pacman -Spq fontconfig ftp://ftp.archlinux.org/extra/os/i686/fontconfig-2.4.2-1.pkg.tar.gz pacman -Sp ... | grep -v "\[0\]" | cut -d' ' -f1 ftp://ftp.archlinux.org/extra/os/i686/fontconfig-2.4.2-1.pkg.tar.gz
Best Regards, Laszlo Papp On Mon, Aug 31, 2009 at 10:59 AM, Xavier <shiningxc@gmail.com> wrote:
Hello Xavier!
I didn't have so much time at the weekend, but as I saw maybe it would be better to choose a more talkative name for it, e.g. --print-package or something (it's just an example).
What will happen if there will be new similar future in the future when
On Mon, Aug 31, 2009 at 5:45 AM, Laszlo Papp<djszapi2@gmail.com> wrote: the
developers or users would like to implement a feature to print out another information, will you choose the name for --print2 or more reasonlable name ? In the second case It would be nice to start it now :) Mabe I'm wrong with it.
Nevertheless It's a very good feature, thanks in fact :)
--print-pkg and --print-uris looks good to me
Me too, but it would be nice to keep the older -Sp option for --print-uris, because everybody know it so :) but would you keep your new feature on top of these two options :
--print-pkg and --print-uris only show non-download packages --print-pkg --print-pkg and --print-uris --print-uris show all ?
I think -Sp/-Spp is good for the uris related.
an alternative : what if we added the download size when ShowSize is used?
I think it's a good idea, more information is better generally :)
pacman -Sp fontconfig ftp://ftp.archlinux.org/extra/os/i686/fontconfig-2.4.2-1.pkg.tar.gz [1234] pacman -Spq fontconfig ftp://ftp.archlinux.org/extra/os/i686/fontconfig-2.4.2-1.pkg.tar.gz
pacman -Sp ... | grep -v "\[0\]" | cut -d' ' -f1 ftp://ftp.archlinux.org/extra/os/i686/fontconfig-2.4.2-1.pkg.tar.gz
Best Regards, Laszlo Papp
On Mon, Aug 31, 2009 at 8:47 PM, Laszlo Papp<djszapi2@gmail.com> wrote:
--print-pkg and --print-uris looks good to me
Me too, but it would be nice to keep the older -Sp option for --print-uris, because everybody know it so :)
I didn't mean to drop it
but would you keep your new feature on top of these two options :
--print-pkg and --print-uris only show non-download packages --print-pkg --print-pkg and --print-uris --print-uris show all ?
I think -Sp/-Spp is good for the uris related.
I don't think you got it. What I was saying is that --print-pkg and --print-uris are very similar options. So it would be quite strange to not apply the same behavior to both. But since --print-pkgs is only a long option, we would need to use --print-pkg --print-pkg which is very ugly ... Is it clearer now ?
an alternative : what if we added the download size when ShowSize is used?
I think it's a good idea, more information is better generally :)
With alternative, I meant alternative. i.e. I would not take your -Sp/-Spp patch, but only add the download size when ShowSize is used. Would you be fine with that?
On Mon, Aug 31, 2009 at 9:04 PM, Xavier <shiningxc@gmail.com> wrote:
On Mon, Aug 31, 2009 at 8:47 PM, Laszlo Papp<djszapi2@gmail.com> wrote:
--print-pkg and --print-uris looks good to me
Me too, but it would be nice to keep the older -Sp option for --print-uris, because everybody know it so :)
I didn't mean to drop it
but would you keep your new feature on top of these two options :
--print-pkg and --print-uris only show non-download packages --print-pkg --print-pkg and --print-uris --print-uris show all ?
I think -Sp/-Spp is good for the uris related.
I don't think you got it. What I was saying is that --print-pkg and --print-uris are very similar options. So it would be quite strange to not apply the same behavior to both.
Yeah, I agree with you.
But since --print-pkgs is only a long option, we would need to use --print-pkg --print-pkg which is very ugly ... Is it clearer now ?
--print-pkgs seems fine for me, the later one isn't so beautiful in fact, but when i say this i see the point of user, not the view from programmer/developer, because i'm not professional now in details.
an alternative : what if we added the download size when ShowSize is used?
I think it's a good idea, more information is better generally :)
With alternative, I meant alternative. i.e. I would not take your -Sp/-Spp patch, but only add the download size when ShowSize is used. Would you be fine with that?
Ah-so, I think it would be better to add it as a new feature, not an alternative. Maybe I'm wrong with my answers, because I don't know pacman in details so, like you, but i try to improve this feature from me, thanks :)
On Mon, Aug 31, 2009 at 9:15 PM, Laszlo Papp<djszapi2@gmail.com> wrote:
But since --print-pkgs is only a long option, we would need to use --print-pkg --print-pkg which is very ugly ... Is it clearer now ?
--print-pkgs seems fine for me, the later one isn't so beautiful in fact, but when i say this i see the point of user, not the view from programmer/developer, because i'm not professional now in details.
This time, I meant very ugly from a user point of view. If you agree, we need to find alternatives (apparently my ShowSize alternative does not suit you)
On Mon, Aug 31, 2009 at 9:19 PM, Xavier <shiningxc@gmail.com> wrote:
On Mon, Aug 31, 2009 at 9:15 PM, Laszlo Papp<djszapi2@gmail.com> wrote:
But since --print-pkgs is only a long option, we would need to use --print-pkg --print-pkg which is very ugly ... Is it clearer now ?
--print-pkgs seems fine for me, the later one isn't so beautiful in fact, but when i say this i see the point of user, not the view from programmer/developer, because i'm not professional now in details.
This time, I meant very ugly from a user point of view.
If you agree, we need to find alternatives (apparently my ShowSize alternative does not suit you)
Maybe I'm not understanding something well, but I think printuri can stay in its form like now, There can be a new print-pkg too, and config->printpkg || config->printuri can be written where config->printuri is now. I think your ShowSize is a good idea, but not in this format.
--print-pkg and --print-uris looks good to me
but would you keep your new feature on top of these two options : --print-pkg and --print-uris only show non-download packages --print-pkg --print-pkg and --print-uris --print-uris show all ?
an alternative : what if we added the download size when ShowSize is used?
pacman -Sp fontconfig ftp://ftp.archlinux.org/extra/os/i686/fontconfig-2.4.2-1.pkg.tar.gz [1234] pacman -Spq fontconfig ftp://ftp.archlinux.org/extra/os/i686/fontconfig-2.4.2-1.pkg.tar.gz
pacman -Sp ... | grep -v "\[0\]" | cut -d' ' -f1 ftp://ftp.archlinux.org/extra/os/i686/fontconfig-2.4.2-1.pkg.tar.gz
I'm trying to follow this right now but I haven't understood what "non-download packages" vs "all" means. Can someone please refer me to the discussion about this? I tried grepping the list but didn't find anything. Instead of adding several options, wouldn't it be possible to let "-p" accept a string argument with formatting information similar to the way the date command works. This would be extensible in the future and could include the following interpretted sequences (among others) %u - url %n - pkgname %v - pkgver-pkgrel %s - size I don't know how difficult it would be to code but that seems the most elegant to me, rather than hardcoding the output format and having to worry about extensibility and breakage in the future. This might not make sense though in terms of "non-download" vs "all" but as pointed out, "-yy" and "-cc" mean "all", so "-pp" should too. I'm not sure how the double flag would work with accepting an argument. Maybe there should be an additional argument "--print-format" which accepts the string, but then we're back to extra argument silliness again (although that would enable "-p" to easily default to printing URLs). As far as backwards compatibility with "--print-uris" goes, I would suggest breaking it if a better solution is found. Holding back better design because people can't slightly modify a few simple scripts is not a valid justification imho. Xyne
On Wed, Sep 2, 2009 at 5:16 AM, Xyne<xyne@archlinux.ca> wrote:
--print-pkg and --print-uris looks good to me
but would you keep your new feature on top of these two options : --print-pkg and --print-uris only show non-download packages --print-pkg --print-pkg and --print-uris --print-uris show all ?
an alternative : what if we added the download size when ShowSize is used?
pacman -Sp fontconfig ftp://ftp.archlinux.org/extra/os/i686/fontconfig-2.4.2-1.pkg.tar.gz [1234] pacman -Spq fontconfig ftp://ftp.archlinux.org/extra/os/i686/fontconfig-2.4.2-1.pkg.tar.gz
pacman -Sp ... | grep -v "\[0\]" | cut -d' ' -f1 ftp://ftp.archlinux.org/extra/os/i686/fontconfig-2.4.2-1.pkg.tar.gz
I'm trying to follow this right now but I haven't understood what "non-download packages" vs "all" means. Can someone please refer me to the discussion about this? I tried grepping the list but didn't find anything.
it just means package already downloaded, so packages for which the download size is 0.
Instead of adding several options, wouldn't it be possible to let "-p" accept a string argument with formatting information similar to the way the date command works. This would be extensible in the future and could include the following interpretted sequences (among others)
%u - url %n - pkgname %v - pkgver-pkgrel %s - size
I don't know how difficult it would be to code but that seems the most elegant to me, rather than hardcoding the output format and having to worry about extensibility and breakage in the future.
This might not make sense though in terms of "non-download" vs "all" but as pointed out, "-yy" and "-cc" mean "all", so "-pp" should too. I'm not sure how the double flag would work with accepting an argument. Maybe there should be an additional argument "--print-format" which accepts the string, but then we're back to extra argument silliness again (although that would enable "-p" to easily default to printing URLs).
As far as backwards compatibility with "--print-uris" goes, I would suggest breaking it if a better solution is found. Holding back better design because people can't slightly modify a few simple scripts is not a valid justification imho.
hmm I think I like all these suggestions, I will give it a try :) It should indeed not break too much all scripts using -Sp. They might just need to switch to -Spp if they want all packages. and for a different output one could use -Sp or -Spp with an additional --print-format '%n' (then probably -p --print-uris needs to be renamed to -p --print)
Instead of adding several options, wouldn't it be possible to let "-p" accept a string argument with formatting information similar to the way the date command works. This would be extensible in the future and could include the following interpretted sequences (among others)
%u - url %n - pkgname %v - pkgver-pkgrel %s - size
I don't know how difficult it would be to code but that seems the most elegant to me, rather than hardcoding the output format and having to worry about extensibility and breakage in the future.
This might not make sense though in terms of "non-download" vs "all" but as pointed out, "-yy" and "-cc" mean "all", so "-pp" should too. I'm not sure how the double flag would work with accepting an argument. Maybe there should be an additional argument "--print-format" which accepts the string, but then we're back to extra argument silliness again (although that would enable "-p" to easily default to printing URLs).
As far as backwards compatibility with "--print-uris" goes, I would suggest breaking it if a better solution is found. Holding back better design because people can't slightly modify a few simple scripts is not a valid justification imho.
hmm I think I like all these suggestions, I will give it a try :)
It should indeed not break too much all scripts using -Sp. They might just need to switch to -Spp if they want all packages. and for a different output one could use -Sp or -Spp with an additional --print-format '%n' (then probably -p --print-uris needs to be renamed to -p --print)
1. Yeah, it's a good idea I think, I thought for something similar with -Si, -Qi, to print out the given line with an option instead of the all, like -Si --packager, --depends, etc.. 2. -p --print doesn't seem so good for me, because it would be more talative like -p --print-uris. But in generally, it would be a good idea to keep -p option as a general printer option with more suboption to it.
Instead of adding several options, wouldn't it be possible to let "-p" accept a string argument with formatting information similar to the way the date command works. This would be extensible in the future and could include the following interpretted sequences (among others)
%u - url %n - pkgname %v - pkgver-pkgrel %s - size
%r - repo I think the repo would be very useful as well.
On Fri, Sep 4, 2009 at 3:50 AM, Xyne<xyne@archlinux.ca> wrote:
Instead of adding several options, wouldn't it be possible to let "-p" accept a string argument with formatting information similar to the way the date command works. This would be extensible in the future and could include the following interpretted sequences (among others)
%u - url %n - pkgname %v - pkgver-pkgrel %s - size
%r - repo
I think the repo would be very useful as well.
btw the copy/paste were my previous --print patch which did not have the --print-format option. my new patch has %u %n %v, and adding %s and %r will be easy as well. one problem is that url and repo are only available for the -S operation. or maybe url could just be replaced by the filename for -U and -R. and repo by 'local'
On Fri, Sep 4, 2009 at 3:50 AM, Xyne<xyne@archlinux.ca> wrote:
Instead of adding several options, wouldn't it be possible to let "-p" accept a string argument with formatting information similar to the way the date command works. This would be extensible in the future and could include the following interpretted sequences (among others)
%u - url %n - pkgname %v - pkgver-pkgrel %s - size
%r - repo
I think the repo would be very useful as well.
my new patch already has %u %n %v, and adding %s and %r will be easy as well. one problem is that url and repo are only available for the -S operation. or maybe url could just be replaced by the filename for -U and -R. and repo by 'local'
Instead of adding several options, wouldn't it be possible to let "-p" accept a string argument with formatting information similar to the way the date command works. This would be extensible in the future and could include the following interpretted sequences (among others)
%u - url %n - pkgname %v - pkgver-pkgrel %s - size
%r - repo
I think the repo would be very useful as well.
btw the copy/paste were my previous --print patch which did not have the --print-format option. my new patch has %u %n %v, and adding %s and %r will be easy as well. one problem is that url and repo are only available for the -S operation.
or maybe url could just be replaced by the filename for -U and -R. and repo by 'local'
I think using "local" for "%r" is a good idea. As for "%u", maybe it should be changed to "% l" for "location". It could return the full path to the package archive when using -U. It's relatively useless for "-R" but I agree that it should return something for the sake of uniformity. Maybe the full path to the local database entry would be useful, e.g. /var/lib/pacman/local/foo-3.5-1 On a tangent, thinking about the printed output of "-U", Is there any reason that it doesn't resolve dependencies?
On Sat, Sep 5, 2009 at 10:16 PM, Xyne<xyne@archlinux.ca> wrote:
I think using "local" for "%r" is a good idea. As for "%u", maybe it should be changed to "% l" for "location". It could return the full path to the package archive when using -U. It's relatively useless for "-R" but I agree that it should return something for the sake of uniformity. Maybe the full path to the local database entry would be useful, e.g. /var/lib/pacman/local/foo-3.5-1
I will see what I can do, but for example, I am not sure it is easy to get the full path, afaik we only record the filename. About the local database for -R %l , it looks a bit inconsistent with the rest (there is a local database entry also with -S and -U operations), but on the other hand we have no filename and no url there ... So maybe ..
On a tangent, thinking about the printed output of "-U", Is there any reason that it doesn't resolve dependencies?
I guess mainly because the code was quite bad, and there was not much code in common between -U and -S operations Nagy fixed that in the following patch : http://code.toofishes.net/cgit/xavier/pacman.git/commit/?h=universal&id=06478bc904b45e542065faf04bec8b3f98b1c587
On Fri, Sep 4, 2009 at 3:50 AM, Xyne<xyne@archlinux.ca> wrote:
Instead of adding several options, wouldn't it be possible to let "-p" accept a string argument with formatting information similar to the way the date command works. This would be extensible in the future and could include the following interpretted sequences (among others)
%u - url %n - pkgname %v - pkgver-pkgrel %s - size
%r - repo
I think the repo would be very useful as well.
Here are some output of the patch just sent to the ML. $ pacman -Sp --print-format "%r/%n-%v : %l [%s]" kdelibs extra/qt-4.5.2-6 : http://mir1.archlinuxfr.org/archlinux/extra/os/i686/qt-4.5.2-6-i686.pkg.tar.... [28914122] extra/ilmbase-1.0.1-1 : http://mir1.archlinuxfr.org/archlinux/extra/os/i686/ilmbase-1.0.1-1-i686.pkg... [0] extra/openexr-1.6.1-1 : http://mir1.archlinuxfr.org/archlinux/extra/os/i686/openexr-1.6.1-1-i686.pkg... [0] $ pacman -Up --print-format "%r/%n-%v : %l [%s]" /var/cache/pacman/pkg/bash-4.0.028-1-i686.pkg.tar.gz local/bash-4.0.028-1 : /var/cache/pacman/pkg/bash-4.0.028-1-i686.pkg.tar.gz [0,93] $ pacman -Sp --print-format "%r/%n-%v : %l [%s]" bash core/bash-4.0.028-1 : http://mir1.archlinuxfr.org/archlinux/core/os/i686/bash-4.0.028-1-i686.pkg.t... [0,00] $ pacman -Rdp --print-format "%r/%n-%v : %l [%s]" bash local/bash-4.0.028-1 : bash-4.0.028-1 [2,60]
Here are some output of the patch just sent to the ML.
$ pacman -Sp --print-format "%r/%n-%v : %l [%s]" kdelibs extra/qt-4.5.2-6 : http://mir1.archlinuxfr.org/archlinux/extra/os/i686/qt-4.5.2-6-i686.pkg.tar.... [28914122] extra/ilmbase-1.0.1-1 : http://mir1.archlinuxfr.org/archlinux/extra/os/i686/ilmbase-1.0.1-1-i686.pkg... [0] extra/openexr-1.6.1-1 : http://mir1.archlinuxfr.org/archlinux/extra/os/i686/openexr-1.6.1-1-i686.pkg... [0]
$ pacman -Up --print-format "%r/%n-%v : %l [%s]" /var/cache/pacman/pkg/bash-4.0.028-1-i686.pkg.tar.gz local/bash-4.0.028-1 : /var/cache/pacman/pkg/bash-4.0.028-1-i686.pkg.tar.gz [0,93]
$ pacman -Sp --print-format "%r/%n-%v : %l [%s]" bash core/bash-4.0.028-1 : http://mir1.archlinuxfr.org/archlinux/core/os/i686/bash-4.0.028-1-i686.pkg.t... [0,00]
$ pacman -Rdp --print-format "%r/%n-%v : %l [%s]" bash local/bash-4.0.028-1 : bash-4.0.028-1 [2,60]
Wow, this is nice.
On Tue, Sep 8, 2009 at 1:19 PM, Nagy Gabor<ngaba@bibl.u-szeged.hu> wrote:
Here are some output of the patch just sent to the ML.
$ pacman -Sp --print-format "%r/%n-%v : %l [%s]" kdelibs extra/qt-4.5.2-6 : http://mir1.archlinuxfr.org/archlinux/extra/os/i686/qt-4.5.2-6-i686.pkg.tar.... [28914122] extra/ilmbase-1.0.1-1 : http://mir1.archlinuxfr.org/archlinux/extra/os/i686/ilmbase-1.0.1-1-i686.pkg... [0] extra/openexr-1.6.1-1 : http://mir1.archlinuxfr.org/archlinux/extra/os/i686/openexr-1.6.1-1-i686.pkg... [0]
$ pacman -Up --print-format "%r/%n-%v : %l [%s]" /var/cache/pacman/pkg/bash-4.0.028-1-i686.pkg.tar.gz local/bash-4.0.028-1 : /var/cache/pacman/pkg/bash-4.0.028-1-i686.pkg.tar.gz [0,93]
$ pacman -Sp --print-format "%r/%n-%v : %l [%s]" bash core/bash-4.0.028-1 : http://mir1.archlinuxfr.org/archlinux/core/os/i686/bash-4.0.028-1-i686.pkg.t... [0,00]
$ pacman -Rdp --print-format "%r/%n-%v : %l [%s]" bash local/bash-4.0.028-1 : bash-4.0.028-1 [2,60]
Wow, this is nice.
Of course, if you do interactive operations like pacman -Sp group or pacman -Rp group, or pacman -Rc, it looks less nice, but this is already the case (without my patch). And also the patch to achieve that has become quite bloated (11 files changed, 171 insertions, 37 deletions), but the big part of this code is concentrated in 3 new functions in util.c
Here are some output of the patch just sent to the ML.
$ pacman -Sp --print-format "%r/%n-%v : %l [%s]" kdelibs extra/qt-4.5.2-6 : http://mir1.archlinuxfr.org/archlinux/extra/os/i686/qt-4.5.2-6-i686.pkg.tar.... [28914122] extra/ilmbase-1.0.1-1 : http://mir1.archlinuxfr.org/archlinux/extra/os/i686/ilmbase-1.0.1-1-i686.pkg... [0] extra/openexr-1.6.1-1 : http://mir1.archlinuxfr.org/archlinux/extra/os/i686/openexr-1.6.1-1-i686.pkg... [0]
$ pacman -Up --print-format "%r/%n-%v : %l [%s]" /var/cache/pacman/pkg/bash-4.0.028-1-i686.pkg.tar.gz local/bash-4.0.028-1 : /var/cache/pacman/pkg/bash-4.0.028-1-i686.pkg.tar.gz [0,93]
$ pacman -Sp --print-format "%r/%n-%v : %l [%s]" bash core/bash-4.0.028-1 : http://mir1.archlinuxfr.org/archlinux/core/os/i686/bash-4.0.028-1-i686.pkg.t... [0,00]
$ pacman -Rdp --print-format "%r/%n-%v : %l [%s]" bash local/bash-4.0.028-1 : bash-4.0.028-1 [2,60]
Nice work. Thank you for implementing this.
participants (4)
-
Laszlo Papp
-
Nagy Gabor
-
Xavier
-
Xyne