The officially official Devuan Forum!

You are not logged in.

#1 2018-04-24 00:09:24

Caluser2000
Member
Registered: 2018-04-24
Posts: 35  

A couple of issues apt-file and sudo

apt-file doesn't function.  It fails to make a contents cache it would seem.
I tried to make my user a member of the sudo group but it wouldn't take.
I'm using the 32-bit version.

Last edited by Caluser2000 (2018-04-24 00:29:09)

Offline

#2 2018-04-24 12:32:47

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,486  

Re: A couple of issues apt-file and sudo

I assume you're using jessie and using auto.mirror.devuan.org in your sources.list. Make sure you have the latest keyring installed and then switch to deb.devuan.org. apt-file should then work.

apt-get update
apt-get install devuan-keyring

# Then replace 'auto.mirror.devuan.org' with 'deb.devuan.org' in /etc/apt/sources.list

Then again:

apt-get update

To add your user to the sudo group:

adduser caluser sudo

Then log out and log in again.

Offline

#3 2018-04-24 20:27:40

Caluser2000
Member
Registered: 2018-04-24
Posts: 35  

Re: A couple of issues apt-file and sudo

Thanks very much. All fixed. Well sudo is. apt-file still doesn't work.

Last edited by Caluser2000 (2018-04-27 06:41:03)

Offline

#4 2018-05-01 09:05:17

devuser
Member
Registered: 2018-04-30
Posts: 176  

Re: A couple of issues apt-file and sudo

IIRC apt-file doesn't work because the devuan repos are missing some optional content description files. A (semi) workaround would be adding this to your shells resource file:

apt-file() {
	if [ ! "$1" = search ]; then
		echo "Usage: apt-file search [FILE]" >&2
		return 1
	fi
	wget -qO - "https://packages.debian.org/file:/$2" | tr -d '\n \t' | \
		sed 's|<tr>|\n|g' | sed 's|</tr>.*||' | grep '^<tdclass="file' | \
		sed -e 's|<spanclass="keyword">||g' -e 's|</span>||g' \
			-e 's|^<[^>]*>\([^<]*\)<.*<ahref="[^"]*">\([^<]*\).*|\2 \1|' | \
		column -t
	return 0
}

This isn't a 100% replacement though as it's very basic, actually searches debian and does not support partial matches (i think) but it's better than nothing.

Offline

#5 2018-05-01 11:59:21

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,486  

Re: A couple of issues apt-file and sudo

apt-file works for me in ascii, using pkgmaster.devuan.org or deb.devuan.org.

Did you run apt-file update?

Offline

#6 2018-05-01 12:08:32

devuser
Member
Registered: 2018-04-30
Posts: 176  

Re: A couple of issues apt-file and sudo

fsmithred wrote:

apt-file works for me in ascii, using pkgmaster.devuan.org or deb.devuan.org.

Did you run apt-file update?

It does? My bad then. I i think i didn't even check if it worked now after getting used to it being broken during jessie.

Offline

Board footer