Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
50appstream: Only run as root #28
Conversation
|
Interesting - can you give an example of which tools do that? (I'm just very curious) |
|
Heh, just found https://bugs.launchpad.net/ubuntu/+source/appstream/+bug/1547428 in my inbox. |
|
Someone just reported it with apport, and I have a script which makes a "fake" apt environment to test transitions (you can override the apt system directories by doing
That's why I decided to do a check for root - if you want we could do as you say and drop this check in favour of checking the target and then also add a corresponding What is your feeling? |
|
I would go for the write-test - having the data might be useful in those test and sandbox scenarios, and also we shouldn't request root permissions when we don't actually need it... |
|
Superseded by #29 |
iainlane commentedFeb 19, 2016
'appstreamcli refresh' only works when you are root. If you are running
'apt update' as a normal user (for example some sandboxed tools do
this), then the failure of this Post-Invoke-Success hook causes the
update to fail.
You could do this in some other ways too - adding
|| trueto allow the refresh to fail or making appstreamcli exit 0 in this case.