Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deb-get update and deb-get list does not show installed package (0.3.8) #826

Closed
dnet890 opened this issue May 5, 2023 · 14 comments
Closed

Comments

@dnet890
Copy link

dnet890 commented May 5, 2023

Reporting a bug 🐛

Please make sure the version of deb-get you are using is up to date:

deb-get update
deb-get reinstall deb-get

Expected behavior

it should show list of the installed packages and update it properly

Actual behavior

it shows nothing

Steps to reproduce

sudo deb-get update and update does not work as intended

System information

Run the following a paste the output below:

/etc/os-release

PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

/etc/lsb-release

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"

deb-get version

deb-get version

deb-get update

deb-get update

image

@philclifford
Copy link
Member

philclifford commented May 5, 2023

don't sudo deb-get (we need to catch that - it breaks things! but not usually like this )

Presumably /etc/deb-get/installed has only deb-get 1 github in now...
Any hint as to how/when that happened, or does it list other apps?

@dnet890
Copy link
Author

dnet890 commented May 5, 2023

Thanks for your reply and here are my answers

  1. I just type sudo apt install curl lsb-release wget
    curl -sL https://raw.githubusercontent.com/wimpysworld/deb-get/main/deb-get | sudo -E bash -s install deb-get to upgrade my previous deb-get and then yeah. suddenly, the problems happened
  2. I checked on /etc/deb-get/installed and then this problem happens
    What do you think?
    2023-05-05_22-36

@philclifford
Copy link
Member

What you did should not have overwritten /etc/deb-get/installed so I'll take a look at that to make sure it is behaving reasonably or fix it. I presume your /etc/deb-get/aptrepos is also empty.

Upgrading deb-get if you have it installed should just happen normally with deb-get update ;deb-get upgrade . If the old version is failing to update and a newer release is available then deb-get install deb-get should get the newer version. You should not run the self-install script from the README.md again (although I'm pretty sure that should not wipe out the installed list and also that I have done it myself installing the latest deb-get on 22.04 and 22.10 without such problems - I'll check again later ...)

Meanwhile to recover the position of the files in /etc/deb-get here's how you could proceed.

If you only had a few apps installed with deb-get and can remember them just doing deb-get install should re-add them to /etc/deb-get/installed etc. and get you back on track. If you had more and/or cannot remember then for the most part you can use apt, dpkg and deb-get to get an idea of what should be installed with something like this:

# These apps are supported by deb-get 

for app in $(deb-get csvlist |grep -v -e apt -e ppa | cut -d\" -f2 ) ; do  apt-cache policy ${app} |grep -e ${app} -e 'Installed' |tee -a /tmp/deb-installed-check;done
# ones that have been installed directly from debs (e.g. from github of direct download from upstream) will have an installed version rather than "(none)"


# Next we look for configured app repo lists matching apps ..

for app in $(deb-get csvlist |grep -e apt -e ppa | cut -d\" -f2 ) ; do if [ -f /etc/apt/sources.list.d/${app}.list ] ; then echo ${app} |tee -a /tmp/app-aptlist-present; fi;done

You can then deb-get show ... ( or deb-get install ... ) from the /tmp/app-aptlist-present with something like deb-get show $(cat /tmp/app-aptlist-present) and get a list from the list directly installed from debs

sed  '/\(none\)/d' /tmp/deb-installed-check |grep -B1 Installed|grep '^[a-z,0-9]' |tr -d ':'

You might still need to check for shared repositories with ( e.g. glow, the winehq-{stable,devel,staging} variants etc.)

You also need to take care with the above as they may offer to have deb-get adopt apps you installed from the main distro repositories, which is useful if you want to do that, but could be annoying if you don't.

@dnet890
Copy link
Author

dnet890 commented May 7, 2023

Hi
Thanks for your reply and here are my answers:

  1. I checked on /etc/deb-get/aptrepos and the lists are still intact
    2023-05-08_08-24
    2023-05-08_08-20

  2. You mentioned that the workaround is just reinstall it back. But, it does not work and it just show me it is not supported. What do you think?
    image

@philclifford
Copy link
Member

Hmmm - that looks like you don't have /etc/deb-get/01-main.repo available

head -1 /etc/deb-get/01-main.repo 
https://raw.githubusercontent.com/wimpysworld/deb-get/main/01-main

If it has gone just creating the file with the one line above and doing an update should rebuild it .

@dnet890
Copy link
Author

dnet890 commented May 8, 2023

do you mean just copy that command line to the terminal? because it is 404
image

@philclifford
Copy link
Member

no : create the file /etc/deb-get/01-main.repo with that as the content:

echo "https://raw.githubusercontent.com/wimpysworld/deb-get/main/01-main" | sudo tee /etc/deb-get/01-main.repo

then deb-get update

@dnet890
Copy link
Author

dnet890 commented May 9, 2023

That is weird I typed deb-get list and it shows nothing. But on /etc/deb-get/01-main.repo. it seems populated. Is this okay?
2023-05-09_17-51
2023-05-09_17-52
2023-05-09_17-52_1

@philclifford
Copy link
Member

philclifford commented May 9, 2023

Utterly weird: I cannot reproduce your problem, but it is clearly broken for you somehow.
All I can think at the moment is to sudo rm /var/cache/deb-get/* then do a deb-get update and wait for the background refresh to complete (when there is a cache for zotero and no lock file ) . Beyond that I think we're looking at purging the current install and re-installing...

@dnet890
Copy link
Author

dnet890 commented May 9, 2023

understood, it's getting better. But, I need to reconnect everything from scratch. So, for deb-get everything begin with sudo is ill-advised. is that so?

@philclifford
Copy link
Member

Yes. It elevates when needed. You should always just use it without sudo.

@dnet890
Copy link
Author

dnet890 commented May 9, 2023

thank you

@dnet890
Copy link
Author

dnet890 commented May 16, 2023

Hi, Sorry, I reopened this case again. it looks like my repo list is gone from deb-get list again
So, when I try to sudo rm /var/cache/deb-get/* then do a deb-get update and wait for the background refresh to complete. I got this error and the list is incomplete.
What do you think?
image
image
image
image

@dnet890 dnet890 reopened this May 16, 2023
@dnet890 dnet890 closed this as completed May 16, 2023
@dnet890 dnet890 reopened this May 16, 2023
@philclifford
Copy link
Member

Still cannot replicate this here. 🤷 😕

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

No branches or pull requests

3 participants