[pacman-dev] [PATCH] Rework of check-for-new-pacman-version
shiningxc at gmail.com
Thu Feb 14 17:10:03 EST 2008
Chantry Xavier wrote:
> This patch is primarily a fix for FS#9228.
> The -Sy operation was moved to its own transaction, which allows us to do
> the following steps :
> 1) refresh the database if asked
> 2) check if a new pacman version if available
> if yes, initialize a "-S pacman" transaction.
> If no, initialize the original -S or -Su transaction.
> Note that the newversion check was extended to the "-S target" operation,
> which is helpful in case of syncdb syntax change (see versioned provisions
> for example)
> Original-work-by: Nagy Gabor <ngaba at bibl.u-szeged.hu>
> Signed-off-by: Chantry Xavier <shiningxc at gmail.com>
> src/pacman/sync.c | 129 +++++++++++++++++++++++++++--------------------------
> 1 files changed, 66 insertions(+), 63 deletions(-)
Here is a comment from Nagy in bug 9228 :
> Well, maybe a bit off here, this check-for-new-version could be more
> general, with simple "-S foo" can be useful imho (can be
> enabled/disabled in pacman.conf).
> So we could implement a check_for_new_version() function to the
> back-end [with parameters repo (or NULL for all), and pkgname]; and
> this could be called by the front-end before transaction start.
Dan seemed to think this was a good idea:
19:09 toofishes >> i guess i just don't like hardcoded things like this
19:10 toofishes >> and what if we (or someone else) has a libalpm
package and a pacman package
19:10 toofishes >> and only libalpm gets updated
19:10 toofishes >> then it wouldn't stop and say "do this alone"
19:10 toofishes >> like...maybe this should be a config file thing.
19:10 toofishes >> AlonePkg or some nonsense :P
Well, if we can find a decent config option name for that, I am willing
to implement it (by making the above patch more general).
More information about the pacman-dev