[1/1] generate pkglist with query (not sync) operation

Message ID 20180706081536.30786-1-list@eworm.de
State New
Headers show
Series
  • [1/1] generate pkglist with query (not sync) operation
Related show

Commit Message

Christian Hesse July 6, 2018, 8:15 a.m. UTC
From: Christian Hesse <mail@eworm.de>

Using the sync operation with list option fails with --sysroot when
signed database files are around. Instead use the query operation, which
uses the local databases of installed pakages only.

The only downside is that we do no longer record the originating
repository.

Signed-off-by: Christian Hesse <mail@eworm.de>
---
 archiso/mkarchiso | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Ian Li via arch-releng July 6, 2018, 4:55 p.m. UTC | #1
I had thought about it, but I just did not change it for that same
reason of losing the repository information. But if sysroot, gives
problems as you say, then we will proceed with the change.

Thanks, have a nice weekend.


El 06/07/18 a las 05:15, Christian Hesse escribió:
> From: Christian Hesse <mail@eworm.de>
> 
> Using the sync operation with list option fails with --sysroot when
> signed database files are around. Instead use the query operation, which
> uses the local databases of installed pakages only.
> 
> The only downside is that we do no longer record the originating
> repository.
> 
> Signed-off-by: Christian Hesse <mail@eworm.de>
> ---
>  archiso/mkarchiso | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/archiso/mkarchiso b/archiso/mkarchiso
> index cc66df4..4d4db50 100755
> --- a/archiso/mkarchiso
> +++ b/archiso/mkarchiso
> @@ -266,8 +266,7 @@ command_pkglist () {
>      _show_config pkglist
>  
>      _msg_info "Creating a list of installed packages on live-enviroment..."
> -    pacman -Sl --sysroot "${work_dir}/airootfs" | \
> -        awk '/\[installed\]$/ {print $1 "/" $2 "-" $3}' > \
> +    pacman -Q --sysroot "${work_dir}/airootfs" > \
>          "${work_dir}/iso/${install_dir}/pkglist.${arch}.txt"
>      _msg_info "Done!"
>  
>

Patch

diff --git a/archiso/mkarchiso b/archiso/mkarchiso
index cc66df4..4d4db50 100755
--- a/archiso/mkarchiso
+++ b/archiso/mkarchiso
@@ -266,8 +266,7 @@  command_pkglist () {
     _show_config pkglist
 
     _msg_info "Creating a list of installed packages on live-enviroment..."
-    pacman -Sl --sysroot "${work_dir}/airootfs" | \
-        awk '/\[installed\]$/ {print $1 "/" $2 "-" $3}' > \
+    pacman -Q --sysroot "${work_dir}/airootfs" > \
         "${work_dir}/iso/${install_dir}/pkglist.${arch}.txt"
     _msg_info "Done!"