Ticket #1009 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

get_environment_variable is broken for EInstalledRepository

Reported by: chutz Owned by:
Priority: Sometime Milestone:
Component: core/paludis Version: 0.54.4
Keywords: Cc:
Blocked By: Blocking:
Distribution: Gentoo


There is no way currently to query environment variables for installed packages. Both "cave print-id-environment-variable" and "paludis --environment-variable" fail consistently for installed packages.

Steps to reproduce:

> cave print-id-environment-variable --variable-name PV app-shells/bash::installed
bash: ( bunzip2 < /var/db/pkg/app-shells/bash-4.0_p37/environment.bz2 ; echo echo \$PV ) | bash -O extglob 2>/dev/null: No such file or directory

  * In program cave print-id-environment-variable --variable-name PV app-shells/bash::installed:
  * When fetching environment variable 'PV' for 'app-shells/bash-4.0_p37::installed':
  * Could not load environment.bz2 (paludis::ActionFailedError)

Expected output:

> cave print-id-environment-variable --variable-name PV app-shells/bash::installed 

I already pushed the easy fix to github and the "expected output" above is produced with the patched version. If there was a test suite for the installed repository I would have gladly prepped a test for this function as well but I guess it is not a priority yet.

The following changes since commit 203a470e881a367029d3c82242305795a28b5c3e:

XFS fallocate clobbers set*id bits (2010-10-08 16:30:18 +0100)

are available in the git repository at:

 git://github.com/chutzimir/paludis.git print-id

Georgi Georgiev (1):

"bash -c" has no need for the extra quotes around the command

paludis/repositories/e/e_installed_repository.cc | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)

Change History

comment:1 Changed 9 years ago by ciaranm

  • Status changed from new to closed
  • Resolution set to fixed


The tests for those things are done in the VDBRepository and ExndbamRepository? subclasses. Coverage is unfortunately not entirely complete just now.

Note: See TracTickets for help on using tickets.