* query for package updates
@ 2020-03-07 7:50 Reza Alizadeh Majd
2020-03-07 8:34 ` Pierre Neidhardt
0 siblings, 1 reply; 7+ messages in thread
From: Reza Alizadeh Majd @ 2020-03-07 7:50 UTC (permalink / raw)
To: help-guix mailing list
Hi,
I'm working on a cron job to perform `guix pull` periodically and inform users
about available updates. previously it was suggested to use `guix package -u -n`
to find if any update is available.
the problem is that also when I run the `guix package -u` to update the profile
my cron job still informs me about existence of new updates and the result of
`guix package -u -n` doesn't change.
could anyone help me on this matter, or an alternate solution to check if any
update is available ( and get the list if it's possible )?
--
Regards
Reza Alizadeh Majd
PantherX Team
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: query for package updates
2020-03-07 7:50 query for package updates Reza Alizadeh Majd
@ 2020-03-07 8:34 ` Pierre Neidhardt
2020-03-07 9:55 ` Reza Alizadeh Majd
0 siblings, 1 reply; 7+ messages in thread
From: Pierre Neidhardt @ 2020-03-07 8:34 UTC (permalink / raw)
To: Reza Alizadeh Majd, help-guix mailing list
[-- Attachment #1: Type: text/plain, Size: 364 bytes --]
Hi,
`guix package -u` will keep updating ad-hoc profiles (those that where
not generated exclusively with a manifest) if they contain packages with
propagated inputs, even if the profile is already up-to-date.
This has been discussed in the past, but for now it's not clear if this
issue will be resolved.
--
Pierre Neidhardt
https://ambrevar.xyz/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: query for package updates
2020-03-07 8:34 ` Pierre Neidhardt
@ 2020-03-07 9:55 ` Reza Alizadeh Majd
2020-03-07 15:30 ` Pierre Neidhardt
0 siblings, 1 reply; 7+ messages in thread
From: Reza Alizadeh Majd @ 2020-03-07 9:55 UTC (permalink / raw)
To: Pierre Neidhardt, help-guix mailing list
Hi,
> `guix package -u` will keep updating ad-hoc profiles (those that where
> not generated exclusively with a manifest) if they contain packages with
> propagated inputs, even if the profile is already up-to-date.
>
so you mean that I can't rely on `guix package -u -n` command results to
determine if any new update is available for current user's profile?
> This has been discussed in the past, but for now it's not clear if this
> issue will be resolved.
>
is there any public reference available about this discussion?
--
Regards
Reza Alizadeh Majd
PantherX Team
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: query for package updates
2020-03-07 9:55 ` Reza Alizadeh Majd
@ 2020-03-07 15:30 ` Pierre Neidhardt
2020-03-11 21:30 ` Reza Alizadeh Majd
0 siblings, 1 reply; 7+ messages in thread
From: Pierre Neidhardt @ 2020-03-07 15:30 UTC (permalink / raw)
To: Reza Alizadeh Majd, help-guix mailing list
[-- Attachment #1: Type: text/plain, Size: 89 bytes --]
https://issues.guix.gnu.org/issue/31142
--
Pierre Neidhardt
https://ambrevar.xyz/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: query for package updates
2020-03-07 15:30 ` Pierre Neidhardt
@ 2020-03-11 21:30 ` Reza Alizadeh Majd
2020-03-14 6:33 ` Reza Alizadeh Majd
0 siblings, 1 reply; 7+ messages in thread
From: Reza Alizadeh Majd @ 2020-03-11 21:30 UTC (permalink / raw)
To: Pierre Neidhardt, help-guix mailing list
playing with the Guix sources, I wrote following Guile script in order to
check available updates for a profile.
Is it suitable for this purpose or I need to include additional checks
on my script?
(define-module (px tools updater)
#:use-module (guix profiles)
#:use-module (guix utils)
#:use-module (srfi srfi-1)
#:export (check-entry
check-manifest
check-profile))
(define (check-entry entry manifest)
"Recursive update check for a manifest entry"
(let* ((pattern (manifest-pattern
(name (manifest-entry-name entry))
(output (manifest-entry-output entry))))
(previous (manifest-lookup manifest pattern))
(newer? (and previous
(version>? (manifest-entry-version entry)
(manifest-entry-version previous)))))
(fold (lambda (child-entry result)
(or result
(check-entry child-entry manifest)))
newer? (manifest-entry-dependencies entry))))
(define (check-manifest manifest)
"Check if any update available for a manifest"
(fold (lambda (entry previous)
(or previous (check-entry entry manifest)))
#f (manifest-entries manifest)))
(define* (check-profile #:optional (profile %current-profile))
"Check if any update is available for a profile"
(let ((manifest (profile-manifest profile)))
(check-manifest manifest)))
--
Regards
Reza Alizadeh Majd
PantherX Team
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: query for package updates
2020-03-11 21:30 ` Reza Alizadeh Majd
@ 2020-03-14 6:33 ` Reza Alizadeh Majd
2020-03-14 15:26 ` Pierre Neidhardt
0 siblings, 1 reply; 7+ messages in thread
From: Reza Alizadeh Majd @ 2020-03-14 6:33 UTC (permalink / raw)
To: help-guix mailing list
Just wanted to ping this up/
does anyone have any suggestion about following script, that I wrote
to check about available package updates for a profile?
On Thu, Mar 12, 2020, at 1:00 AM, Reza Alizadeh Majd wrote:
> playing with the Guix sources, I wrote following Guile script in order to
> check available updates for a profile.
>
> Is it suitable for this purpose or I need to include additional checks
> on my script?
>
>
> (define-module (px tools updater)
> #:use-module (guix profiles)
> #:use-module (guix utils)
> #:use-module (srfi srfi-1)
> #:export (check-entry
> check-manifest
> check-profile))
>
> (define (check-entry entry manifest)
> "Recursive update check for a manifest entry"
> (let* ((pattern (manifest-pattern
> (name (manifest-entry-name entry))
> (output (manifest-entry-output entry))))
> (previous (manifest-lookup manifest pattern))
> (newer? (and previous
> (version>? (manifest-entry-version entry)
> (manifest-entry-version previous)))))
> (fold (lambda (child-entry result)
> (or result
> (check-entry child-entry manifest)))
> newer? (manifest-entry-dependencies entry))))
>
>
> (define (check-manifest manifest)
> "Check if any update available for a manifest"
> (fold (lambda (entry previous)
> (or previous (check-entry entry manifest)))
> #f (manifest-entries manifest)))
>
>
> (define* (check-profile #:optional (profile %current-profile))
> "Check if any update is available for a profile"
> (let ((manifest (profile-manifest profile)))
> (check-manifest manifest)))
>
>
> --
> Regards
> Reza Alizadeh Majd
> PantherX Team
>
>
--
Regards
Reza Alizadeh Majd
PantherX Team
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-03-14 15:27 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-07 7:50 query for package updates Reza Alizadeh Majd
2020-03-07 8:34 ` Pierre Neidhardt
2020-03-07 9:55 ` Reza Alizadeh Majd
2020-03-07 15:30 ` Pierre Neidhardt
2020-03-11 21:30 ` Reza Alizadeh Majd
2020-03-14 6:33 ` Reza Alizadeh Majd
2020-03-14 15:26 ` Pierre Neidhardt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).