Skip to content

Fix debtap package database check to support updated pkgfile cache filenames#99

Open
Laksh-Mendpara wants to merge 1 commit intohelixarch:masterfrom
Laksh-Mendpara:fix-timestamp
Open

Fix debtap package database check to support updated pkgfile cache filenames#99
Laksh-Mendpara wants to merge 1 commit intohelixarch:masterfrom
Laksh-Mendpara:fix-timestamp

Conversation

@Laksh-Mendpara
Copy link
Copy Markdown

PR Description:
This PR addresses an issue where debtap fails with the misleading error:
"Error: You must run at least once 'debtap -u' with root privileges..."
even when debtap -u has already been run successfully.

Problem:
Github Issue - #92

Fix:
Replaced the strict glob pattern with a more flexible expression using grep -E:

if [[ ! $(ls /var/cache/pkgfile 2> /dev/null | grep -E '.*\.files(\.[[:digit:]]{3})?') ]] ...

This allows the check to recognize both unsuffixed and suffixed .files entries.

Notes:

  • Ensures compatibility with updated versions of pkgfile that store cache files with numeric suffixes.
  • Only affects the initial environment check; other parts of debtap are unaffected.
  • Solves the issue for systems using the new cache structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant