Merge ~sahnaseredini/ubuntu-cve-tracker:amir-dev into ubuntu-cve-tracker:master
Proposed by
Amir Naseredini
Status: | Merged |
---|---|
Approved by: | Amir Naseredini |
Approved revision: | 9b58c370f87ca2bc4f00668ffcbaeb8f8ca5cd66 |
Merged at revision: | 1203150c0f53fb1b33406914a010e05eef1d7036 |
Proposed branch: | ~sahnaseredini/ubuntu-cve-tracker:amir-dev |
Merge into: | ubuntu-cve-tracker:master |
Diff against target: |
72 lines (+16/-8) 2 files modified
scripts/pkg_history (+10/-5) scripts/pkg_status (+6/-3) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Spyros Seimenis | Approve | ||
Review via email: mp+444985@code.launchpad.net |
Commit message
Changing the relative addresses to absolute addresses
Description of the change
There are some cases where a relative address is used in scripts/pkg_history
and scripts/pkg_status which doesn't let the code to run correctly everywhere.
This PR proposes the changes required to change the relative addresses to
absolute addresses in order to solve the issue.
To post a comment you must log in.
Hey Amir, thanks for the fixes. pkg_history might need an extra change as as it is, it would break for people using it with shells that are not bash (due to "BASH_SOURCE" missing). For example I am on zsh and I get:
scripts/ pkg_history: 13: Bad substitution
dirname: missing operand
A workaround would be to simply change the shebang at the top of the pkg_history script to explicitly invoke #!/usr/bin/bash rather than #!/bin/sh (which is linked to dash in Ubuntu). pkg_status already uses #!/bin/bash and I see most scripts in UCT do the same so I guess that would be fine.
Apparently this seems like one of those rabbit-hole issues if you wanted to do that while still being POSIX compliant i.e check out https:/ /stackoverflow. com/questions/ 29832037/ how-to- get-script- directory- in-posix- sh