if [[ "$cur" == -* ]]; then
case "${op}" in
- A|U|F)
+ A|U)
COMPREPLY=( $( compgen -W '
--asdeps
-d --nodeps
diff --git a/contrib/zsh_completion b/contrib/zsh_completion
index 4607bd7..566c39f 100644
--- a/contrib/zsh_completion
+++ b/contrib/zsh_completion
@@ -7,7 +7,6 @@ typeset -A opt_args
# options for passing to _arguments: main pacman commands
_pacman_opts_commands=(
'-A[Add a package to the system]'
- '-F[Upgrade an installed package]'
'-Q[Query the package database]'
'-R[Remove a package from the system]'
'-S[Synchronize packages]'
@@ -26,7 +25,7 @@ _pacman_opts_common=(
'--noconfirm[Do not ask for confirmation]'
)
-# options for passing to _arguments: options for --add, --freshen and --update commands
+# options for passing to _arguments: options for --add, and --update commands
_pacman_opts_pkgfile=(
'-d[Skip dependency checks]'
'-f[Overwrite conflicting files]'
@@ -85,13 +84,6 @@ _pacman_action_add() {
"$_pacman_opts_pkgfile[@]"
}
-# handles --freshen subcommand
-_pacman_action_freshen() {
- _arguments -s :
- "$_pacman_opts_common[@]"
- "$_pacman_opts_pkgfile[@]"
-}
-
# handles --help subcommand
_pacman_action_help() {
_arguments -s :
@@ -274,7 +266,6 @@ _pacman_get_command() {
_pacman() {
case $words[2] in
-A*) _pacman_action_add ;;
- -F*) _pacman_action_freshen ;;
-Qg) # ipkg groups
_arguments -s :
"$_pacman_opts_common[@]"
diff --git a/doc/pacman.8.txt b/doc/pacman.8.txt
index 7b10bc0..887f912 100644
--- a/doc/pacman.8.txt
+++ b/doc/pacman.8.txt
@@ -35,10 +35,6 @@ Operations
version is already installed. *NOTE*: please use '--upgrade' in place of
this option.
-*-F, --freshen*::
- This is like '--upgrade' except it will only upgrade packages already
- installed on the system.
-
*-Q, --query*::
Query the package database. This operation allows you to view installed
packages and their files, as well as meta-information about individual
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index e6efe2d..0b40f95 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -76,19 +76,10 @@ int _alpm_add_loadtarget(pmtrans_t *trans, pmdb_t *db, char *name)
pm_errno = PM_ERR_PKG_INSTALLED;
goto error;
}
- } else {
- if(trans->flags & PM_TRANS_FLAG_FRESHEN) {
- /* only upgrade/install this package if it is already installed and at a lesser version */
- pmpkg_t *dummy = _alpm_db_get_pkgfromcache(db, pkgname);
- if(dummy == NULL || _alpm_versioncmp(dummy->version, pkgver) >= 0) {
- pm_errno = PM_ERR_PKG_CANT_FRESH;
- goto error;
- }
- }
}
On Nov 21, 2007 12:27 PM, Dan McGee <dan@archlinux.org> wrote:
> This operation made sense in the days before sync DBs existed, but it no
> longer has the same usefulness it once did.
>
> Signed-off-by: Dan McGee <dan@archlinux.org>
> ---
> contrib/bash_completion | 6 ++----
> contrib/zsh_completion | 11 +----------
> doc/pacman.8.txt | 4 ----
> lib/libalpm/add.c | 13 ++-----------
> lib/libalpm/alpm.h | 2 +-
> pactest/tests/add030.py | 18 ------------------
> pactest/tests/add031.py | 18 ------------------
> pactest/tests/add032.py | 18 ------------------
> src/pacman/pacman.c | 12 +-----------
> 9 files changed, 7 insertions(+), 95 deletions(-)
> delete mode 100644 pactest/tests/add030.py
> delete mode 100644 pactest/tests/add031.py
> delete mode 100644 pactest/tests/add032.py
I'd love to have another sign-off or two from people on the list, so
when someone later goes "OMG Dan removed the -F operation!" I can at
least point at the sign-off lines and say "and so did all these
people".
Just let me know if you agree with the change, and I'll go ahead and
add your name as a sign-off.
-Dan
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
On Wed, Nov 21, 2007 at 12:31:08PM -0500, Dan McGee wrote:
> I'd love to have another sign-off or two from people on the list, so
> when someone later goes "OMG Dan removed the -F operation!" I can at
> least point at the sign-off lines and say "and so did all these
> people".
>
> Just let me know if you agree with the change, and I'll go ahead and
> add your name as a sign-off.
>
Ok for me.
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
On Nov 21, 2007 11:31 AM, Dan McGee <dan@archlinux.org> wrote:
> On Nov 21, 2007 12:27 PM, Dan McGee <dan@archlinux.org> wrote:
> > This operation made sense in the days before sync DBs existed, but it no
> > longer has the same usefulness it once did.
> >
> > Signed-off-by: Dan McGee <dan@archlinux.org>
> > ---
> > contrib/bash_completion | 6 ++----
> > contrib/zsh_completion | 11 +----------
> > doc/pacman.8.txt | 4 ----
> > lib/libalpm/add.c | 13 ++-----------
> > lib/libalpm/alpm.h | 2 +-
> > pactest/tests/add030.py | 18 ------------------
> > pactest/tests/add031.py | 18 ------------------
> > pactest/tests/add032.py | 18 ------------------
> > src/pacman/pacman.c | 12 +-----------
> > 9 files changed, 7 insertions(+), 95 deletions(-)
> > delete mode 100644 pactest/tests/add030.py
> > delete mode 100644 pactest/tests/add031.py
> > delete mode 100644 pactest/tests/add032.py
>
> I'd love to have another sign-off or two from people on the list, so
> when someone later goes "OMG Dan removed the -F operation!" I can at
> least point at the sign-off lines and say "and so did all these
> people".
>
> Just let me know if you agree with the change, and I'll go ahead and
> add your name as a sign-off.
I'll just say this - I didn't even know this op existed, and looking
at it, I'm still not even all that clear on what it does... looks to
be the same functionality as saying 'no' to the "local package is up
to date" question.
Looks good to me
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
> I'll just say this - I didn't even know this op existed, and looking
> at it, I'm still not even all that clear on what it does... looks to
> be the same functionality as saying 'no' to the "local package is up
> to date" question.
Are we sure that's what it does? That's not how I read it's description
in the man page.
I'm guessing you could use it if you had downloaded a repo locally to a
usbkey/cd (think broadband at work/school, dialup at home). You could
then change to that directory and do a pacman -F *.pkg.tar.gz to update
preexisting packages and not end up installing them all instead.
Dale
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
On Nov 21, 2007 12:32 PM, Dale Blount <dale@archlinux.org> wrote:
>
> > I'll just say this - I didn't even know this op existed, and looking
> > at it, I'm still not even all that clear on what it does... looks to
> > be the same functionality as saying 'no' to the "local package is up
> > to date" question.
>
> Are we sure that's what it does? That's not how I read it's description
> in the man page.
Rereading it, it's not sync related, it's a parallel to the -A and -U options.
> I'm guessing you could use it if you had downloaded a repo locally to a
> usbkey/cd (think broadband at work/school, dialup at home). You could
> then change to that directory and do a pacman -F *.pkg.tar.gz to update
> preexisting packages and not end up installing them all instead.
This is such an edge case though. Using repo-add foo.db.tar.gz
*.pkg.tar.gz and then adding a conf entry for that DB will cover this
case if it's needed, anyway
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
On Wed, Nov 21, 2007 at 01:32:33PM -0500, Dale Blount wrote:
>
> > I'll just say this - I didn't even know this op existed, and looking
> > at it, I'm still not even all that clear on what it does... looks to
> > be the same functionality as saying 'no' to the "local package is up
> > to date" question.
>
> Are we sure that's what it does? That's not how I read it's description
> in the man page.
>
I'm sure that's not what it does. It does as described in the man page, or as
I tried to explain a few posts above.
> I'm guessing you could use it if you had downloaded a repo locally to a
> usbkey/cd (think broadband at work/school, dialup at home). You could
> then change to that directory and do a pacman -F *.pkg.tar.gz to update
> preexisting packages and not end up installing them all instead.
>
>
I see, that's useful in that case indeed. I'm probably lucky I never had to
do that.
But if you downloaded the whole repo, you will also have the db.tar.gz,
right? So you can always extract that, and then use -Su. But that's less
nice.
/me thinks ..
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
On Nov 21, 2007 1:47 PM, Xavier <shiningxc@gmail.com> wrote:
> On Wed, Nov 21, 2007 at 01:32:33PM -0500, Dale Blount wrote:
> >
> > > I'll just say this - I didn't even know this op existed, and looking
> > > at it, I'm still not even all that clear on what it does... looks to
> > > be the same functionality as saying 'no' to the "local package is up
> > > to date" question.
> >
> > Are we sure that's what it does? That's not how I read it's description
> > in the man page.
> >
>
> I'm sure that's not what it does. It does as described in the man page, or as
> I tried to explain a few posts above.
>
> > I'm guessing you could use it if you had downloaded a repo locally to a
> > usbkey/cd (think broadband at work/school, dialup at home). You could
> > then change to that directory and do a pacman -F *.pkg.tar.gz to update
> > preexisting packages and not end up installing them all instead.
> >
> >
>
> I see, that's useful in that case indeed. I'm probably lucky I never had to
> do that.
> But if you downloaded the whole repo, you will also have the db.tar.gz,
> right? So you can always extract that, and then use -Su. But that's less
> nice.
> /me thinks ..
Make a DB in that case- thats what repo-add is for. Sync repos
actually allow you to resolve dependencies anyway.
Executive decision has been made- I'm killing this (and a lot of
others signed off). I can't think of a use case where creating a sync
DB won't solve the problem. Think of it this way- if you want it to
stay, you'll have to justify it like you submitted it in a patch.
-Dan
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
On Wed, Nov 21, 2007 at 01:32:33PM -0500, Dale Blount wrote:
>
> > I'll just say this - I didn't even know this op existed, and looking
> > at it, I'm still not even all that clear on what it does... looks to
> > be the same functionality as saying 'no' to the "local package is up
> > to date" question.
>
> Are we sure that's what it does? That's not how I read it's description
> in the man page.
>
> I'm guessing you could use it if you had downloaded a repo locally to a
> usbkey/cd (think broadband at work/school, dialup at home). You could
> then change to that directory and do a pacman -F *.pkg.tar.gz to update
> preexisting packages and not end up installing them all instead.
>
Hm, there is something I overlooked earlier. You actually can't even use it
like that, because pacman will fail on the first target that is either not
installed, or already up to date.
So you can't run it on *.pkg.tar.gz , you would have to select manually the
targets which are outdated. Which makes the -F option in its current state
totally pointless.
Now, it probably wouldn't be too hard to change -F to skip these targets
instead of just failing. But then there is a bigger problem of dependencies
resolving. If a target you are updating gets a new dependency, the dependency
will be skipped by -F because it's not installed. And only after that, it'll
check the dependencies of the remaining targets, and will just fail there.
We could probably take care of that in the code, but that would result in a
more complex implementation of -F, totally different than the current one.
And ok, now you have updated all your existing packages. A few days later,
you want to install a new package. How do you do that? It's a pita, you would
have to do all the dependencies resolving manually.
I first thought that the little overhead of building a repo again with
repo-add (or getting the db.tar.gz from the mirror and extracting it
manually) was not worth it, but not anymore.
It's very easy/simple/fast to do, and then has many advantages :
* easy upgrade of the existing package with dependencies resolving via -Su
* easy install of new packages with dep resolving via -S
* -F can be removed
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev