Skip to content

Commit

Permalink
api: add more helpful logs to developer diagnosis
Browse files Browse the repository at this point in the history
  • Loading branch information
theofficialgman committed Jun 19, 2024
1 parent 51849c4 commit ad58ff6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions api
Original file line number Diff line number Diff line change
Expand Up @@ -2134,6 +2134,12 @@ In any case, Pi-Apps cannot work until you solve this issue. Check around in the
grep -E "^Depends:" <<<"$errors" | cut -d' ' -f2- | sed "s/, /\n/g" | sed "s/| /\n/g" | sed "s/:any//g" | sed 's/([^)]*)//g;s/ / /g' | xargs -r apt-cache show >> "$logfile"
grep -E "^Depends:" <<<"$errors" | cut -d' ' -f2- | sed "s/, /\n/g" | sed "s/| /\n/g" | sed 's/:armhf\|:arm64\|:all//g' | sed 's/([^)]*)//g;s/ / /g' | sort -u | xargs -r apt list -a >> "$logfile"
grep -E "^Depends:" <<<"$errors" | cut -d' ' -f2- | sed "s/, /\n/g" | sed "s/| /\n/g" | sed "s/:any//g" | sed 's/([^)]*)//g;s/ / /g' | xargs -r apt install -fy --no-install-recommends --allow-downgrades --dry-run >> "$logfile"

# we also want to see the users apt sources (.list and .sources)
apt-get indextargets --no-release-info --format '$(SITE) $(RELEASE) $(COMPONENT) $(TARGET_OF) $(ARCHITECTURE)' | sort -u >> "$logfile"

# we also want to know what architectures the user has enabled on their system globally
echo "foreign architectures: $(dpkg --print-foreign-architectures)" >> "$logfile"
fi

if grep -q "The following packages have unmet dependencies:" <<<"$errors" ;then
Expand Down

0 comments on commit ad58ff6

Please sign in to comment.